date field

62 views
Skip to first unread message

TFXR

unread,
Oct 31, 2011, 4:15:41 PM10/31/11
to Otter API to Topsy
Hi. We have what is a very simple question.

When using the API how do we limiit the returns to a time window like
day, week, month, etc ?

As an example, with the google blog search API, you just pass the
string &tbs=qdr:m to constrain results to the last month &tbs=qdr:w
for the last week, etc.

We'd like to be able to do this w/o specifing the exact calendar date
for "oldest"


We are pretty experienced with implementing search API's. We must be
missing someting very simple in the documentation.



Can someone shed some light on this?

Thanks,

Tom

Vipul Ved Prakash

unread,
Oct 31, 2011, 4:21:12 PM10/31/11
to otte...@googlegroups.com
Tom, 

You can use mintime & maxtime parameters on search.json to restrict results to a time-period. 


cheers,
vipul

TFXR

unread,
Nov 1, 2011, 8:37:18 PM11/1/11
to Otter API to Topsy, tom.r...@cithread.com
Thank you Vipul.

Can we use the window= operater (window=w, window=d6, etc)
parameter as well

From the link you provided:"

"mintime optional

earliest date/time to restrict a result set. unix-timestamp format.
( Note - search.json can be used with either "window" or "mintime" and/
or "maxtime" but not both. Using "window" as well as
"mintime"/"maxtime" can provide 0 or incorrect results) "

Vanessa Hsu

unread,
Dec 8, 2011, 7:25:35 PM12/8/11
to otte...@googlegroups.com, tom.r...@cithread.com
Tom,
yes, window is an optional parameter for /search and /searchdate as shown in our documentation here: http://code.google.com/p/otterapi/wiki/Resources

This is the specific documentation on the window param:
"Time window for results. (Options: dynamic - will pick the most relevant window. Possible responses are 1-23 hours or 1-100 days. (For example: h6 or d10). h last hour, dlast day, w last week, m last month, a all time. (DEPRECATED: auto - automatically pick the most relevant window. This will return one of the standard h,d,w,m,a window values.)."

-vh
Reply all
Reply to author
Forward
0 new messages