What do the response fields {w, h, a, d, m} for for Resource /searchcount mean?

63 views
Skip to first unread message

Ed

unread,
Mar 21, 2012, 5:00:21 AM3/21/12
to Otter API to Topsy
Hello

I am wanting to find out the total number of Topsy Response objects
from /search for a given time period, defined by query parameters
[minTime,maxTime].

In looking at the API docs for the /searchcount Resource, I am left
with a few questions:

1) Will this call be able to take the time window for the search based
on a [minTime, maxTime] ?

2) What do the fields {w,h,a,d,m} mean in the response?

Thanks in advance for any help you can offer !

Ed

{
"request" : {
"parameters" : {
"q" : "Barack Obama"
},
"response_type" : "json",
"resource" : "searchcount",
"url" : "http://otter.topsy.com/searchcount.json?q=Barack+Obama"
},
"response" : {
"w" : 2085,
"h" : 6,
"a" : 572027,
"d" : 330,
"m" : 9122
}
}

Ed MacKerrow

unread,
Mar 21, 2012, 12:09:46 PM3/21/12
to Otter API to Topsy
When I run this query:

http://otter.topsy.com/searchcount.json?mintime=1288591200&maxtime=1298962800&q=egypt&perpage=100

It seems like the /searchcount Resource returned does not take into account the [mintime,maxtime] window, and instead returns

a = all tweets from the current time
m = the tweets from the last month
w = the tweets from the last week
d = the tweets from the last day
h = the tweets from the last hour

Not 100% sure that /searchcount does indeed ignore any [mintime, maxtime] though, but I think so at this point...

Thanks
Ed

vanessa

unread,
Mar 21, 2012, 8:31:50 PM3/21/12
to otte...@googlegroups.com
Correct, /searchcount does not take regular list parameters that a lot of other calls do, so it will ignore mintime and maxtime. Instead, it does the different time windows. You can also get a dynamic window that will pick the best window based on recent activity spikes.

Reply all
Reply to author
Forward
0 new messages