'Further explanations on YouTube API quota: eg. does `search?maxResults` add up?

So, i'm a bit confused how youtube API queries impact on quota. They all lay out on a "composition" aspec of requisitions:

The Quota calculator show the cost of various resources. For example search.list = 100 and videos.list = 1.

One aspect of it is not clear to me though. How it calculates on a 'multi-results' single request?

query quota doubt
/search?maxResults=10 is it one 100 quota, or ten 100 (1000) quotas?
/videos?id=A,B is it one quota, or two quotas?
/video?part=A,B is this adding two quotas? (each video??) Since no ?part= returns only id related data
/...?fields=A,B(C) is fields query impacting the request quota anyhow?


I first thought it was really straightforward: 1 call, 1 quota "package". And that seemed to be supported by this calculator's quote:

If your application calls a method, such as search.list, that returns multiple pages of results, each request to retrieve an additional page of results incurs the estimated quota cost.

But while developing a simple video list, my daily quota blew up pretty damn fast. So not sure anymore.



Solution 1:[1]

Every time you call the method in question you incure the quota cost

For example:

search.list 100

WHen you call search.list it costs 100 if you call it again to get the next page of results it will cost you another 100 points.

Ig we check this one where you are trying to get back two videos.

/videos?id=A,B

The same is true it will be a single request to the server so the quota cost will be one.

Fields does not effect it. Its just the request you make. Batching will also not save you from quota cost. If you batch these requests you will be charged for each of the quests within the back.

Intro to YouTube API and cost based quota for beginners

A lot of this information is on the Quota cost page.

The table below shows the quota cost for calling each API method. All API requests, including invalid requests, incur a quota cost of at least one point.

  • If your application calls a method, such as search.list, that returns multiple pages of results, each request to retrieve an additional page of results incurs the estimated quota cost.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 DaImTo