Search API returning invalid since_id and max_id? (9223372036854775807)


#1

Anyone else noticing the max big int being returned on some search requests?

curl -v -H 'Authorization: Bearer MYTOKEN' "https://api.twitter.com/1.1/search/tweets.json?q=%23hashtag&count=100&since_id=386217550998405120"
* About to connect() to api.twitter.com port 443 (#0)
*   Trying 199.59.148.20...
* connected
* Connected to api.twitter.com (199.59.148.20) port 443 (#0)
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using RC4-SHA
* Server certificate:
*    subject: C=US; ST=California; L=San Francisco; O=Twitter, Inc.; OU=Twitter Security; CN=api.twitter.com
*    start date: 2013-04-08 00:00:00 GMT
*    expire date: 2013-12-31 23:59:59 GMT
*    subjectAltName: api.twitter.com matched
*    issuer: C=US; O=VeriSign, Inc.; OU=VeriSign Trust Network; OU=Terms of use at https://www.verisign.com/rpa (c)09; CN=VeriSign Class 3 Secure Server CA - G2
*    SSL certificate verify ok.
> GET /1.1/search/tweets.json?q=%23hashtag&count=100&since_id=386217550998405120 HTTP/1.1
> User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0 OpenSSL/0.9.8y zlib/1.2.5
> Host: api.twitter.com
> Accept: */*
> Authorization: Bearer MYTOKEN
> 
< HTTP/1.1 200 OK
< cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0
< content-length: 307
< content-type: application/json;charset=utf-8
< date: Fri, 04 Oct 2013 19:55:59 GMT
< expires: Tue, 31 Mar 1981 05:00:00 GMT
< last-modified: Fri, 04 Oct 2013 19:55:59 GMT
< pragma: no-cache
< server: tfe
< set-cookie: guest_id=v1%3A11111111111111; Domain=.twitter.com; Path=/; Expires=Sun, 04-Oct-2015 19:55:59 UTC
< status: 200 OK
< strict-transport-security: max-age=631138519
< x-access-level: read
< x-frame-options: SAMEORIGIN
< x-rate-limit-limit: 450
< x-rate-limit-remaining: 409
< x-rate-limit-reset: 1380917043
< x-transaction: 11628be0f6f96841
< 
* Connection #0 to host api.twitter.com left intact
{"statuses":[],"search_metadata":{"completed_in":0.004,"max_id":9223372036854775807,"max_id_str":"9223372036854775807","query":"%23hashtag","refresh_url":"?since_id=9223372036854775807&q=%23hashtag&include_entities=1","count":100,"since_id":386217550998405120,"since_id_str":"386217550998405120"}}* Closing connection #0
* SSLv3, TLS alert, Client hello (1):

#2

I have seen this quite frequently as well.


#3

I have seen this, and i “solved” this problem by checking if maxId = MaxBIgInt, if it matches i don’t save it as for next iteration. I also tried to ask about problem got no answer about why that happends.

Regards
Nemanja


#4

I reported three times over last two years and got no proper answer. The last few days it’s been doing it a huge amount. I wish Twitter would solve this issue.