skip to Main Content
# Initiate the connection to Twitter
twitter = Twitter(auth=oauth)

# Search for latest tweets about "pakistan"
results = twitter.search.tweets(q='pakistan',until=2008 - 08 - 19, )

print results

I am trying to retrieve tweets that are earlier than this date by one week. It does not return anything. However, I have searched manually on twitter and found that tweets exist.

2

Answers


  1. When you use the Twitter API to download tweets you will have access to tweets back to roughly one week old. This is despite the fact that you can see tweets older than one week on Twitter’s website. This is a built-in limitation of the API.

    Login or Signup to reply.
  2. To have access to a bigger time span you can do the following ways:

    • download everyday data and add up gradually.
    • you can search on the web to find a dataset
    • The best way is to ask Twitter to give you the data for a specific time span while you have an API developer account. You have asked for a quote using this address:
      https://www.trackmyhashtag.com/twitter-dataset#request-data-form
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search