Twitter rate limit is unstable


#1

I am playing around with Twitter API and found an issue. I use python and twitter-python library to connect. When I do

status = client.GetRateLimitStatus()
print status[‘resources’][‘search’][’/search/tweets’][‘remaining’]

Sometimes I get output like:
152
151
150
66
65
It randomly jumps between numbers, higher and lower. When it resets to 180, it makes sense, reset time was hit. But why did it go from 150 to 66? I made only 1 call in that period. Then it jumped again
32
31
150
29

After which it got reset after few more prints, and error out at 150

152
151
150
With
twitter.TwitterError: [{u’message’: u’Rate limit exceeded’, u’code’: 88}]
Yet rate limit is at 150. 150 seems to be the magic number for some reason that causes issues. Thoughts? I am trying to prevent rate limit exceeding but to be honest, it is kind of impossible with such results