Stefan Velikov
Stefan Velikov

Reputation: 83

Google Sheets API Quota Exceeding

I am creating a Python script that gets information from one API and after some formatting and etc it writes the data in a spreadsheet in Google Sheets. I am using the Gspread library and the script is working tho there is one issue that is actually a 'dealbreaker'. The G Sheets API has limitations of read and write requests per minute or per 100 seconds. The limit is 100 requests per 100 seconds per user. I've been monitoring my request and I have never exceeded this limitation but I get the 429 error - "requests quota exceeded".

So my question would be, could it be the case that 100 request per 100 seconds resonates to 1 request per 1 second so that when my script does 2 or more request in 1 second the 429 error is raised?

What lead me to the thought this could be the case is that I tried using time.sleep with many different values so that I make sure I never exceed even 60 requests per minute but I am still getting the 429 error raised.

Upvotes: 0

Views: 1759

Answers (1)

zamp
zamp

Reputation: 51

It has a spam protection system which limits to 10 requests per second. I found out after hours of searching, I was stuck at the same.

You can delay your calls and prevent that.

Upvotes: 0

Related Questions