通过 YouTube 数据 API 列出视频的配额成本和 ID 限制是多少?
我正在使用 YouTube 数据 API 列出视频: https://developers.google.com/youtube/v3/docs/videos/ list
在文档中,它指出此调用会产生 1 个配额单位。 它还指出“id”字段是一个以逗号分隔的视频 ID 列表。
“id”字段中可以放入多少个视频 ID? 无论“id”字段中有多少视频ID,配额成本仍然只是1吗?
I am listing videos using the YouTube Data API:
https://developers.google.com/youtube/v3/docs/videos/list
In the documentation it states that this call incurs 1 unit of quota.
It also states that the "id" field is a comma-separated list of video IDs.
How many video IDs can be put in the "id" field?
Is the quota cost still just 1 no matter how many video IDs is in the "id" field?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
配额费用取决于您提出的请求数量。如果您对 videos.list 进行一次调用,则会产生费用一点。
添加 ids 不会影响您发出的请求数量,它仍然只是一个请求。
至于你可以过滤的 id 数量。文档没有说明有限制。
尝试一下,看看您可以添加多少个。老实说,限制可能只是谷歌方面数组大小的限制。
Quota cost is based upon the number of requests you make. If you make a single call to videos.list its going to cost one point.
Adding ids does not effect the number of requests you are making its still just going to be one request.
As for the number of ids you can filter on. The documentation doesn't state there is a limit.
Give it a try see how many you can add. TBH the limit may be just by the limit of the size of the array on googles side.