Search code examples
javapythontwittertwitter4jtweets

Retrieve all tweets ever posted


Is there a chance I can get ALL the tweets ever posted on Twitter (I want to extract only those that contain a specific keyword)? I tried a lot of codes. For example this one https://www.socialseer.com/twitter-programming-in-java-with-twitter4j/how-to-retrieve-more-than-100-tweets-with-the-twitter-api-and-twitter4j/ but it only download maximum from 30 nov (so 10-11 days ago). I also tried in pyhton, but with the same result.


Solution

  • If you pay for Enterprise-tier access you can search the entire tweet archive going back to 2006.

    Assuming you don't want to do that, search is restricted to the last 7 days (with Standard-tier access) or 30 days (with Premium-tier access). Timelines are generally restricted to the most recent 3,200 tweets.