What is the limit on Google Drive API usage?
Asked Answered
B

7

59

Because this product is new, I am looking forward to develop an app on it so is there any limit on the API usage such as:

  • upload and download quota
  • requests per app
  • etc
Blackshear answered 25/4, 2012 at 8:25 Comment(1)
there must be some limit to prevent misuse. and option for paid usage.Unbuild
S
78

To view your allowed quota please create a project in the Google APIs Console. In the "Service" tab, the default quota allowed for each service is indicated.

Currently for the Drive API it reads "Courtesy limit: 1,000,000,000 queries/day". It's a per app quota.

After you've enabled the Drive API you can also set a per user rate limit (by default 1000 req per 100 sec) to prevent one user from depleting your app's quota. That's available in the "Quotas" tab.

View of the cloud console, showing 1B requests per app per day, and 1000 requests per 100 seconds per user.

There is also a link to request more quota in the "Quotas" tab in case you need more than the default 10M req/day such requests will go through a (light) manual review process.

Also files have per-files playback limit which depends on many factors (Is the file shared publicly or just to your domain/users? Is it a video? An audio file? etc...). These rules are not disclosed at this point unfortunately but for instance a publicly shared video can't be viewed by millions of anonymous sessions per day (use Youtube for that). Nor can an image be used on a high traffic website. Google Drive cannot be used as a Web scale CDN, it is scaled for personal content sharing (you share files with friends/work group/company).

Staggard answered 25/4, 2012 at 10:2 Comment(6)
If I publish the file in google doc, is that also limited in 500,000 download/day?Illuminator
I understand the limit per user, but why is there a limit per app? How can you build a free app for a large audience if there's such limit?Dex
You ask for the free quota which we will grant you. We need to keep control of who is using our APIs and to foresee huge quota requests. This allows us to: provision server resources in advance to handle the load for huge quota request, disable misbehaving apps, get in touch with developers of popular apps, etc... and importantly this makes developers aware of the amount of requests they do and pushes them to optimise their code.Staggard
What exactly is one request? I'm seeing high numbers even when very little is happening. The App Engine pages clearly state doing what costs what, while with Drive I'm not sure at all. I'm even seeing users go over a 4k request/second limit when uploading a series of files. Does each chunk count as one request?Fugleman
@nivco What would be an example of a misbehaving app?Amman
hey, what about non-logged users limit? i cannot make queries on public folder with more than one ID. getting an error. no doc on this. please adviceErmelindaermengarde
G
15

I'm getting a message saying "Sorry, you can't view or download this file at this time. Too many users have viewed or downloaded this file recently. Please try accessing the file again later. If the file you are trying to access is particularly large or is shared with many people, it may take up to 24 hours to be able to view or download the file. If you still can't access a file after 24 hours, contact your domain administrator."

so there IS a limit, just undocumented :e this is a file only i downloaded about 50 times in the last hour (testing some stuff)

Gazebo answered 21/8, 2012 at 15:3 Comment(1)
Did you got any documents stating this limit?Inkwell
J
7

There's no mention of rate limiting on the best practices page, or in the performance tips but—most conspicuously of all—the documentation on handling errors does not contain any errors for going over rate limits.

Jarrad answered 25/4, 2012 at 22:4 Comment(1)
We haven't listed the out-of-quota error on that page as typically apps don't have to programmatically handle it: developers should just watch their quota on the Quota section of the Google APIs console of their project and make sure they always have enough quota granted to their app to function properly.Staggard
D
3

I seen the free request quota as for Google Drive Api's is. 1,000,000,000 requests/day.

and Default Per-user limit is:(you can increase it) 10 requests/second/user

you can visit this and login with valid account for more information https://console.developers.google.com/project/bionic-path-686/apiui/apiview/drive/quotas

Deflected answered 14/9, 2015 at 9:23 Comment(0)
O
3

It's not only about API-Queries .. there is also a Download-Limit, i always ran into .. But Google doesn't publish the allowed amount

Oxa answered 21/9, 2017 at 13:17 Comment(0)
F
2

There are some types of limits which exists in addition to "Quotas". Error ex.:

code=403
reason=subscriptionRateLimitExceeded
message=Rate limit exceeded for creating file subscriptions.

Similar rate limits are not well documented and can make some pain to app developers.

Foghorn answered 15/6, 2018 at 14:25 Comment(0)
G
0

Read the documentation and you should find what you're looking for.

"Any type of file can be stored in Drive, up to the user's storage limit or maximum file size of 10GB"

https://developers.google.com/drive/

Galbreath answered 25/4, 2012 at 8:28 Comment(3)
The Insert method of the API only states this: "Inserts a file, and any settable metadata or blob content sent with the request." so I assume the upload limit of 10GB applies here too. They don't state otherwise. It would be easy to verify.Galbreath
@tomasmcguinness, I think Radi is asking how many api requests you are allowed to make in a set time period. Other api's e.g. Twitter, set limits on how many requests you can make per hour.Jarrad
Oh, sorry Radi. I cannot find anything in the docs regarding request limits.Galbreath

© 2022 - 2024 — McMap. All rights reserved.