Skip to content

Commit 20f13a4

Browse files
committed
Saved README.md with Dillinger.io [skip ci]
1 parent 9e5356b commit 20f13a4

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,30 @@ The API also allows you to create aggregations on authors so you can quickly see
213213
**Show the top authors mentioning the term "Trump" over the past 24 hours**
214214
https://api.pushshift.io/reddit/search/comment/?q=trump&after=24h&aggs=author&size=0
215215

216+
```
217+
{
218+
"aggs": {
219+
"author": [
220+
{
221+
"doc_count": 605,
222+
"key": "grrrrreat"
223+
},
224+
{
225+
"doc_count": 329,
226+
"key": "AutoModerator"
227+
},
228+
{
229+
"doc_count": 168,
230+
"key": "autotldr"
231+
},
232+
{
233+
"doc_count": 73,
234+
"key": "SnapshillBot"
235+
},
236+
```
237+
238+
The author aggregation will show you which authors make the most comments containing a specific query term. From the example above, a lot of the top authors mentioning the term "Trump" are actually bots.
239+
216240
## Combining multiple aggregations at once
217241

218242
Using the aggs parameter, you can combine multiple aggregations and get a lot of facet data for a specific term. Using the examples above, we can combine all of the calls into one call and show the top submissions over the past 24 hours, the frequency of comments per hour mentioning Trump, the top authors posting about Trump and the top subreddits that have had comments made mentioning Trump.

0 commit comments

Comments
 (0)