Mentions
The number of times the term has been mentioned, total volume includes RTs.
All day counts return in GMT format
URL: http://api.peoplebrowsr.com/mentions
Request - Required Parameters
- app_id (STRING) - Eight Digit ID [ex: 84d8620b]
- app_key (STRING) - Thirty-two digit key [ex: 281014ad8b0fba5adcc88fac7d79999c]
Post app registration, your app id and key can be viewed by going to https://developer.peoplebrowsr.com/admin/applications and clicking "view"
Time Period - Only two of three of these need to be used in a string. First & Last, First & Count, or Last & Count. Last & Count will return results the easiest.
- first (STRING) - Defines the start of the time period. If January 1 2012 to February 21, 2012 was the specification required, start with specifying the the first time point with first=2011-01-01. Alternatively, say the specification was between yesterday and today.
- Example(s): first=2011-01-01 first=1323466328 or first=yesterday
- last (STRING) - Defines the end of a time period. To continue the example above, if the date range specified is January 1, 2012 to February 21, 2011, specify last=2011-02-21. Alternatively say the time period you always wanted to measure was today. One could specify last=today, and then use count to specify 14, 30, up to 1000 days back relative to the time range enabled for the account on the API.
- Example: last=2012-02-21 or last=1318195928 OROR last=yesterday OR last=today
- count (STRING) - Count is used as a period proxy to specified time periods. The standard time period is a day, so using count, you would specify the last 30, 60, 90, 100, to 1000 days by specifying last=today & count=30 (or another period length).
- Example: count=1 OR 10 OR 100 OR 1000 to specify the time period backward or forward
Request - Option Parameters
- period (STRING) - Integer of the number of seconds that a period constitutes if account is specified rather than a start/end date.
- Default setting: period=86400 (24 hours x 60 minutes x 60 seconds) or one Day
- Day: Count=30 (30 days)
- Example: &last=yesterday&count=30 - Specifies chart or histogram to return 30 days (periods) of data with reference to default period setting
- Hour: Specify period=3600 (60 minutes x 60 seconds) & Count=24 (hours)
- Example date setting: &last=1323468000&count=24&period=3600 - Returns 1 day of data by hour
- limit (STRING)- Limit search results to the specified number. Limit=20 will only return 20 data points and can be used in histograms or charts.
- number (STRING) - Specifies number of items in non-histogram queries. If the parameter &number=10, the query will only return 10 data points.
- reverse (STRING) - When set to reverse=true, this will reverse the order of the histograms, charts.
Request - Sample URL
http://api.peoplebrowsr.com/mentions?last=yesterday&count=30&source=twitter&term=Pepsi&app_id=84d8620b&app_key=281014ad8b0fba5adcc88fac7d79999c
Response
Histogram; relational to date range defined. Returns in JSON format.
Response - Fields
- date (STRING) - Reference time period. Reference "Period" above for how this can be specified.
- frequency (STRING) - Frequency of term mention (including RTs) relative to specification within call.
- status (STRING) - The status of your request (values: submitted, processing, complete).
Sample Response
{
"data": [
[
"2012-02-13",
51251
],
[
"2012-02-14",
12354
],
[
"2012-02-15",
12681
],
[
"2012-02-16",
14632
],
[
"2012-02-17",
12472
],
[
"2012-02-18",
11782
],
[
"2012-02-19",
13219
],
[
"2012-02-20",
13457
],
[
"2012-02-21",
13111
],
[
"2012-02-22",
15184
],
[
"2012-02-23",
16535
],
[
"2012-02-24",
20479
],
[
"2012-02-25",
15020
],
[
"2012-02-26",
16722
],
[
"2012-02-27",
15652
],
[
"2012-02-28",
15472
],
[
"2012-02-29",
14543
],
[
"2012-03-01",
12985
],
[
"2012-03-02",
12747
],
[
"2012-03-03",
13319
],
[
"2012-03-04",
13311
],
[
"2012-03-05",
15332
],
[
"2012-03-06",
15715
],
[
"2012-03-07",
11290
],
[
"2012-03-08",
7655
],
[
"2012-03-09",
63349
],
[
"2012-03-10",
41089
],
[
"2012-03-11",
22980
],
[
"2012-03-12",
15776
],
[
"2012-03-13",
17820
]
],
"id": "999-38ed7c6419871c9938dc4e413f4a5313",
"request": {
"app_id": "*****2b5",
"app_key": "******a29958d5f29a3624c7845f20ab",
"count": 30,
"external": true,
"last": 1331596800,
"name": "mentions",
"source": "twitter",
"term": "pepsi"
},
"status": "complete"
}
PHP Code Sample
Python Code Sample
Ruby Code Sample