关于 YouTube API 配额的进一步解释:例如。 `search?maxResults` 加起来了吗?

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

所以,我有点困惑 youtube API 查询对配额的影响。他们都列出了请购单的“组成”方面:

Quota calculator显示各种资源的成本。 例如 search.list = 100videos.list = 1.

虽然我不清楚其中的一个方面。它如何根据 'multi-results' 单个请求进行计算?

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?


一开始以为真的很简单:1 call, 1 quota "package"。这个计算器的引用似乎支持了这一点:

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.

但是在开发一个简单的视频列表时,我的每日配额很快就爆炸了。所以不确定了。

每次调用相关方法都会产生配额成本

例如:

search.list 100

当您调用 search.list 时,它会花费 100,如果您再次调用它以获得下一页结果,它将再花费您 100 积分。

请问我们检查了您试图取回两个视频的那个。

/videos?id=A,B

同样如此,它将是对服务器的单个请求,因此配额成本将为一个。

字段不影响它。这只是您提出的要求。批处理也不会为您节省配额成本。如果您批量处理这些请求,您将对后面的每个任务收费。

Intro to YouTube API and cost based quota for beginners

很多信息都在 Quota cost 页面上。

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.