Reputation: 51
Im trying to get all of a user's tweets for a 2 month time period. In search I see results but this code returns an empty array. Why?
results = api.GetSearch(raw_query="q=&from=yikyakapp&since=2014-09-24&until=2014-11-24")
print(results)
Upvotes: 1
Views: 1480
Reputation: 5794
This is because Twitter search API has a limit of 7 days. Check the API documentation
The Twitter Search API searches against a sampling of recent Tweets published in the past 7 days.
There is a detailed explanation here https://dev.twitter.com/rest/reference/get/search/tweets
Keep in mind that the search index has a 7-day limit. In other words, no tweets will be found for a date older than one week.
In summary, you can't use Twitter API to search for tweets beyond 7 days. Of course, in the website they can show you whatever they want. They hold all the data.
Upvotes: 1