search api - since date format

103 views
Skip to first unread message

arian

unread,
Sep 9, 2010, 11:15:49 AM9/9/10
to Twitter Development Talk
hi guys, I have a question about search api
about 'until' parameter to be more exactly

according to documentation until is "Optional. Returns tweets
generated before the given date. Date should be formatted as YYYY-MM-
DD.
example: http://search.twitter.com/search.json?until=2010-03-28"

I need to know if its possible to set datetime, for example
http://search.twitter.com/search.json?until=2010-09-08-19:00" or
something like this.

according to doc date should be formatted as YYYY-MM-DD, but I need
inform time, if its possible what would be the string format in this
case?

is it possible? or how could I get a similar result?

Arian

Taylor Singletary

unread,
Sep 9, 2010, 11:23:21 AM9/9/10
to twitter-deve...@googlegroups.com
Hi Arian,

A date string really is the only valid format for this function. If you want to cut the search off by certain times of day, you're best off post-processing your results for that kind of resolution.

Thanks,
Taylor


--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: http://groups.google.com/group/twitter-development-talk?hl=en

arian

unread,
Sep 9, 2010, 12:32:07 PM9/9/10
to Twitter Development Talk

here is my problem
I need to catch some tweets since yesterday 20pm until this morning
8am.
the problem is that there is more than 1500 tweets that I need, and
according to search api docs, I can get a max of roughly 1500 tweets
per search query.

[...]
rpp
The number of tweets to return per page, up to a max of 100.
http://search.twitter.com/search.json?rpp=100
page
The page number (starting at 1) to return, up to a max of roughly 1500
results (based on rpp * page).
http://search.twitter.com/search.json?page=10
[...]

from http://dev.twitter.com/doc/get/search

i'm struggling to build a query where I can get my tweets since
yesterday night.

any idea?

Arian

On 9 set, 12:23, Taylor Singletary <taylorsinglet...@twitter.com>
wrote:

Taylor Singletary

unread,
Sep 9, 2010, 12:45:35 PM9/9/10
to twitter-deve...@googlegroups.com
This sort of scenario is better served with advance preparation, rather than relying on the Search API to excavate the tweets after the fact, it would be more advantageous to utilize the Streaming API, tracking and storing all relevant tweets during your period of interest. Is this a one-off task you're trying to accomplish or something more general you're looking to accomplish?

Taylor 
Reply all
Reply to author
Forward
0 new messages