Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tweepy: get old tweets now possible with Twitter search api?

Accoring to http://www.theverge.com/2014/11/18/7242477/twitter-search-now-lets-you-find-any-tweet-ever-sent Twitter search now lets you find any tweet ever sent.

But when i am trying to get tweets from 2014 to 2015 using tweepy it gets only recent:

    query = 'Nivea'
    max_tweets = 1000
    searched_tweets = [json.loads(status.json) for status in tweepy.Cursor(api.search,
                                                                           q=query,
                                                                           count=100,
                                                                           #since_id="24012619984051000",
                                                                           since="2014-02-01",
                                                                           until="2015-02-01",
                                                                           result_type="mixed",
                                                                           lang="en"
                                                                           ).items(max_tweets)]

I tried since="2014-02-01", and since_id but no matter.

like image 758
Vic Nicethemer Avatar asked Feb 01 '15 20:02

Vic Nicethemer


1 Answers

Unfortunately, you cannot access past data from Twitter. Is not a problem of what library you're using: Tweepy, Twitter4J, whatever, is just that Twitter won't provide any data that is older than more or less 2 weeks.

To get historical data you'll need access to firehose, directly through Twitter or third-party resellers like GNIP.

like image 58
AlejandroVK Avatar answered Oct 11 '22 16:10

AlejandroVK