Search code examples
ruby-on-railsrubyapitwittertwitter-search

why do i only see one tweet in the search from API Query?


I'm using the following query:

https://twitter.com/search.json?callback=?&q=from:_adeel&count=5&include_entities=true&include_rts=true

and I would like to see the last 5 tweets from this user. You can see that the user has many more than 2 tweets yet the query only returns 2 tweets. I'm following the twitter search API and I fail to see what I'm doing wrong. I prefer to use the twitter search API because I want to perform the search on the client side without authentication and rate limits.

Do you see what I am doing wrong?


Solution

  • As indicated here in the documentation, the search API is an index of recent tweets, between 6-9 days old. It looks like the other tweets from the user you linked to are just outside this window.

    So to summarize - you are not doing anything wrong. This is simply a limitation of the Twitter API.