No API search results more than 5 days back


Hi all,

I’m trying to collect tweets surrounding historical events. To test the system, I’m using the following type of query (using today’s date) with the search API:

Obama since:2013-05-02 until:2013-05-03

The above type of query works fine returning the expected kinds of results. The following query, just a few days earlier does not work:

Obama since:2013-04-24 until:2013-04-25

I thought this might be because Twitter only indexes the most popular historical tweets, but it appears that when I perform the exact same search on twitter’s website:

I get tons of results. The JSON I get back when the search is empty is this:

<code>{u'search_metadata': {u'count': 20, u'completed_in': 0.015, u'max_id_str': u'9223372036854775807', u'since_id_str': u'0', u'refresh_url': u'?    since_id=9223372036854775807&q=Obama%20since%3A2013-04-24%20until%3A2013-04-25&lang=en&result_type=mixed&include_entities=1', u'since_id': 0, u'query': u'Obama+since%3A2013-04-24+until%3A2013-04-25', u'max_id': 9223372036854775807}, u'statuses': []}</code>

I tried looking around in the documentation to see if there were any blatant historical search restrictions, and there don’t seem to be any. I’m kind of scratching my head here.

Thanks in advance!


Wow totally missed this…


Question is why does twitter search API return 9223372036854775807 sometimes… clearly a bug unless this return code has a special meaning that isn’t that clear in documentation… MAXINT?