Michael Updike
Michael Updike

Reputation: 654

Quota Limits with Google Photos API

I am hitting the daily quota limits of the API, but my usage of the API does not correspond with the quota counts as listed by Google.

Here is my usage for 12 hours, started at the reset time of midnight PST:

> google.photos.library.v1.PhotosLibrary.BatchGetMediaItems 3,816
> google.photos.library.v1.PhotosLibrary.GetMediaItem  2,659
> google.photos.library.v1.PhotosLibrary.ListAlbums 701
> google.photos.library.v1.PhotosLibrary.SearchMediaItems 1,331

Here is what the quota page in the dashboard lists:

All requests per day Global 8,658 out of 10,000
Download requests per day 67,184 out of 75,000

Now, the global requests of 8,658 is about right for the sum of all the API calls. However, the documentation states that BatchGetMediaItems and GetMediaItem count against the 75,000 download limit (it used to be unlimited, but Google added this new limit about a week ago).

The 67,184 download requests per day, doesn't correspond at all to my usage of the API.

Is there any documentation on what the quotas actually include? Does this implementation of the quotas seem correct? I don't see how it can be.

Upvotes: 0

Views: 858

Answers (1)

Michael Updike
Michael Updike

Reputation: 654

I received clarification from Google on this:

Two separate quotas apply when using the Google Photos Library API to protect the systems and its users: - A quota for API requests, which includes uploads, listing, filtering, creating of albums and loading a media item via get or batchGet - this does not include accessing base URLs to read the bytes of a media item - A quota for accessing the bytes of the media item via a base URL

We will improve the wording on the "API limits and quotas" page to make this a bit clearer.

So, all API calls count against the 10,000 limit and every access of a baseUrl counts against the 75,000 limit.

Upvotes: 2

Related Questions