Google sheets API v4: HttpError 429. "Resource has been exhausted (e.g. check quota)."

10,109

Solution 1

The Google Sheets API has a below limits

  • 500 requests per 100 seconds per project,
  • 100 requests per 100 seconds per user.

Note that-

  • Limits for reads and writes are tracked separately.
  • There is no daily usage limit.

Reference: https://developers.google.com/sheets/api/limits

Solution 2

Sheets API has a quota limit of 40,000 queries per day. You can see that in Usage Limits docs:

This version of thea Google Sheets API has a default limit of 40,000 queries per day.

To view or change usage limits for your project, or to request an increase to your quota, do the following:

If you don't already have a billing account for your project, then create one. Visit the Enabled APIs page of the API library in the API Console, and select an API from the list. To view and change quota-related settings, select Quotas. To view usage statistics, select Usage.

Share:
10,109
jason
Author by

jason

Updated on June 09, 2022

Comments

  • jason
    jason almost 2 years

    I have been updating about 1000 sheets using Python. Each takes about 2-3 minutes to update. The job ran most of the day yesterday (~8hrs). And when I look at my quotas for Google Sheets API in console.developers.google.com, I have used about 3k in the read group and 4k in the write group. Not nearly close to the 40k quota that is given.

    Now all of the 1000 sheets interact with one sheet because all of the keys are on that one sheet.

    In fact, I have tried using 2 different project sign ins, one through my company domain and one through my gmail, that both have access to these files. When I run it with the company credentials. It also gives me a HttpError 429, and 0 requests have been made with that credential.

    Is there some hidden quota I don't know about? Like calls to one spreadsheet? That's what it seems like. Google, are you cutting me off to the spreadsheet because I accessed it for 8hrs yesterday?

    It is bombing on spreadsheets().values().update and spreadsheets().batchUpdate