Hello. I’m using the premium package and they said tweets per request 500, but it only works with 100 tweets per request now. So I ran a lot of expensive queries. How can I solve this part?

What code / library are you using? When using paid premium you have to set this parameter manually, it’s not the default. Default is always 100 results per call.

Thank you very much.

auth.set_access_token(access_token, access_token_secret)

api = tweepy.API(auth, wait_on_rate_limit=True)
tweepy_cursor = tweepy.Cursor(api.search_full_archive, label=‘crawling’, query=keyword, fromDate = ‘202202150000’, toDate = ‘202203092359’)

here are some of my code. how can I change my code?!

Unrelated but:

For premium API, only Bearer Token (API Key + Secret) is valid. You can’t use an Access token & secret. Tweepy usually picks the correct authentication if you specify everything however, but this is just another thing to potentially make more explicit.

maxResults sets how many results per page like this: Premium search APIs | Docs | Twitter Developer Platform

tweepy.Cursor(api.search_full_archive, label='crawling', query=keyword, fromDate = '202202150000', toDate = '202203092359', maxResults=500)
1 Like

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