YouTube data API cost per request or per object?

2020-03-31 11:14发布

I get that there is a cost incurred when I use YouTube API service, but what I would like to know is if the cost is per request or not. For example, when I query the meta data of 3 videos, would the cost be tripled for that one request, or would the cost be the same as if I query the meta data for 1 video?

1条回答
唯我独甜
2楼-- · 2020-03-31 12:13

I assume you talk about the quota with the YouTube API v3, i can suggest you to visit this link, a quota calculator:

This tool lets you estimate the quota cost for an API query. All API requests, including invalid requests, incur a quota cost of at least one point.

https://developers.google.com/youtube/v3/determine_quota_cost COST 3

  • would the cost be tripled for that one request, or would the cost be the same as if I query the meta data for 1 video?

We can assume "cost be the same as if I query the meta data for 1 video" because they speaks about "request" like this :

The request for multiple videos is like this :

Which is also one request, so it's also a cost of 3 !

The real deal is when you have multiple pages:

Note: 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 will incur the estimated quota cost.

查看更多
登录 后发表回答