Hello
I set up dashboard - Search Tweets: 30-Days / Sandbox
which is connected to my apps
purpose is to get tweets older then 30 days by code below

auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)

Open/Create a file to append data

csvFile = open(‘test.csv’, ‘a’)
#Use csv Writer
csvWriter = csv.writer(csvFile)

for tweet in tweepy.Cursor(api.search
,q=“test”
,lang=“pl”
,until=“2019-10-17”).items(): # date to set up

print (tweet.created_at)
#csvWriter.writerow([tweet.created_at, tweet.text.encode('utf-8')])

when I set up date 6 days back working as expected but above 7 days im getting nothing
in this case i assume it must be issue with my account however no idea what it can be can somone could list me potential problems ?

Thank you in advance!!!

tweepy is still using the Standard search API, to use Premium search, you need to make calls to different endpoints, with different parameters. Search API | Twitter API | Docs | Twitter Developer Platform is a good place to start and this is a good python tool to try: GitHub - twitterdev/search-tweets-python: Python client for the Twitter 'search Tweets' and 'count Tweets' endpoints (v2/Labs/premium/enterprise). Now supports Twitter API v2 /recent and /all search endpoints.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.