ryanmcgrath / twython

Actively maintained, pure Python wrapper for the Twitter API. Supports both normal and streaming Twitter APIs.
http://stackoverflow.com/questions/tagged/twython
MIT License
1.85k stars 397 forks source link

API V1.1 rate limit behavior suddenly changed? Or this is from the Twython library? #548

Open CQHofsns opened 1 year ago

CQHofsns commented 1 year ago

Hi everyone,

I registered a Twitter API back in 3/2022 for tweets search, my program uses Twython and works properly. But recently I discovered something odd with the runtime.

I use one API to search tweets related to specific 7600 keywords, each keyword searched 10 times. The total runtime is merely 3.5 hours, but the runtime has recently increased significantly to 6.5 hours. Since my program deployed on AWS so when I check the log on the Cloud Watch, I noticed that there is something unusual with the API rate limit. Before 2022/12/25 after around 600 keywords, the rate limit is triggered and my program was delayed 15 minutes, but since 2022/12/26 just only after around 300 keywords, the rate limit is triggered so that is why my program runtime is doubled.

For the rate limit triggered mechanism, my program uses the Twython exception class TwythonRateLimitError.

My question is why in the same program with the same source code, the behavior of the API rate limit is not the same?

ryanmcgrath commented 1 year ago

So... the answer here is: I got absolutely no clue. Nothing has changed in Twython nor have there been any new releases for awhile.

I do know there were some changes to the API that caused 3rd party clients to get turned off abruptly, so it wouldn't surprise me if there's some additional throttling going on somewhere. That said, I'm not Twitter and can't do much more than speculate here. :(

CQHofsns commented 1 year ago

@ryanmcgrath Thanks for your reply.

I do know there were some changes to the API that caused 3rd party clients to get turned off abruptly,

Can you elaborate for me more on this, who are the 3rd party clients, and can you please provide me any changelog about those changes? I need to provide my customer evidence to show that my program does not cause the runtime to slow down but from the APIs.

Thank you very much

ryanmcgrath commented 1 year ago

Google Twitterific and Tweetbot being cut off, it's been in the news for the past week so should be easy to find records of.

Past that, this is a Twitter issue and you'll have to try and take it up with them.