REST API v1
I am developing an application to guess locations of tornadoes by analyzing twitter data. For this, I would first need to train a neural network on some manually annotated tweets. To begin with, I am trying to get tweets from last year which have the word 'tornado' in them. This is a part of my code below :-
Query query = new Query("tornado");
QueryResult queryResult = instance.search(query);
tweetList = queryResult.getTweets();
I am able to retrieve tweets from periods closer to now such as last week and such, but am unable to get any results for periods such as the one listed above. Any clues, suggestions would be of help. Thanks in advance.
Looks like you won't be able to go further back than a week...on the Search API documentation, it says:
- The Search API is not complete index of all Tweets, but instead an index of recent Tweets. At the moment that index includes between 6-9 days of Tweets.
- You cannot use the Search API to find Tweets older than about a week.
You might try iterating through a list of users' timelines that you know will at some point talk about tornado (you can go through 3200 tweets per user I believe...) and do your own check if it includes the word you're looking for.
Otherwise you could try the real-time streaming API and query on that word and stockpile tweets, I'm sure it would file up quickly.
Hey Sanjay -
Twitter search isn't quite there yet.. the main focus in social media is "real time"
If you don't need thousands of tweets (max. 1000), Google is (still) your friend:
This topic is now closed. New replies are no longer allowed.