I am using the search api to find some tweets. The max return range is 10 days. I signed up for the premium subscription and connected my app to “Search Tweets: 30-Days / Sandbox”. But still only max 10 days of tweets are returned, in my case 714 tweets where upto 2000 or more are possible. Am I using the correct API to do more than a 10 days search?
Below the example code in python:
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)
tweets = tweepy.Cursor(api.search, q = “stroomstoring”, count = 2000, result_type = “recent”,
include_entities = True, lang = “nl”).items()
df_api = []
for t in tweets:
df_api.append({‘datetime’: t.created_at, ‘tweet’: t.text})
df_api = pd.DataFrame(df_api)