Abuse detection mechanism after 5 searches

I’m trying to search github with a python script using

self.auth = HTTPBasicAuth('user','token')
requests.get('https://api.github.com/search/code?q=foo', auth=self.auth)

I request pages consecutively.

After 5 searches github responds with:

{‘documentation_url’: ‘https://developer.github.com/v3/#abuse-rate-limits’, ‘message’: ‘You have triggered an abuse detection mechanism. Please wait a few minutes before you try again.’}

I have 24 search requests remaining according to

requests.get('https://api.github.com/rate_limit', auth=self.auth)

I can avoid this by waiting 10 seconds between searches, but what is the point of allowing 30 req/min if i can only do 6?

Does anyone know why i’m triggering the abuse detection mechanism?

1 Like

Hey @baconian,

The quickest way for us to figure out what’s making you hit the limits would be to take a look at your logs, would you mind sending a message to support@github.com to get a ticket started.

1 Like

Thank you, I did.

1 Like