Reputation: 271
The new Google Sheets API v4 currently has an unlimited read/write quota per day (which is fantastic), but restricted to 500 reads/writes per account per 100 seconds, and 100 read/writes per key per 100 seconds (or, I have found, multiple keys coming from the same IP). This is probably plenty for most use cases, but I have an edge case that requires bringing a frequently-updated Google Sheet with 70 tabs down to a node.js server that distributes these to user's clients every ~30-60 seconds or so (users are data annotators who are student research assistants). This wasn't so bad early in the project when there were only 20-30 tabs, but now that the data is large the server is blowing through the 100 quota and returning errors every 10-15 minutes.
The problem is such that:
Are there settings/methods suggested to achieve the full 500 calls/100 seconds for a server?
Upvotes: 27
Views: 32104
Reputation: 3773
You can use spreadsheets.get to read the entire spreadsheet in a single call, rather than 1 call per request. Alternately, you can use spreadsheets.values.batchGet to read multiple different ranges in a single call, if all you need are the values.
spreadsheets.values.update
, we can use spreadsheets.values.batchUpdate
across multiple cell ranges even across different sheets.The Drive API offers "push notifications", so you can get notified when changes occur and react to those, instead of polling for them. The latency of the notifications is a little on the slow side, but it gets the job done.
Upvotes: 11
Reputation: 141
You can request quota update in Google Cloud Platform and it will be increased to 2500 per account an 500 per user. (about your #4)
Upvotes: 11