问题
I was wondering if the use of the YouTube Data Api gerneate any costs(money which must be payed to google).
I was only able to find the "unit-system" which is used by youtube to limit the amount of requests?
回答1:
In addition to the answer by DaImTo I can add that if you don't need all of the YouTube API functionality (e.g. you only need to get video titles and thumbnails or something like that) then you don't need to be worried about the API restrictions at all, and you don't even need to use an API key.
I add this because a lot of people only need to get some basic data and get confused by all of the crazy API limits restrictions that keep changing all the time to make things worse, when you can get the same data without using the YouTube API directly.
You can get oEmbed data from YouTube:
http://www.youtube.com/oembed?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ
Or you can access it via Noembed:
https://noembed.com/embed?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ
which (unlike YouTube) also supports JSONP:
https://noembed.com/embed?callback=example&url=https://www.youtube.com/watch?v=dQw4w9WgXcQ
so that you can use it on the client-side with no need for server-side proxies.
See also those answers for more info:
- Youtube Video title with API v3 without API key?
- Get Youtube information via JSON for single video (not feed) in Javascript
- Response for JSONp request to youtube oembed call giving "invalid label" error
回答2:
The YouTube Data API uses a quota to ensure that developers use the service as intended and do not create applications that unfairly reduce service quality or limit access for others. All API requests, including invalid requests, incur at least a one-point quota cost.
The cost they are referring to is the cost against your quota.
- 1,000,000 read operations that each retrieve two resource parts.
- 50,000 write operations and 450,000 additional read operations that each retrieve two resource parts.
- 2000 video uploads, 7000 write operations, and 200,000 read operations that each retrieve three resource parts.
There are a limited number of requests you are allowed to make against the API each day. This is free for you to use it does not cost you any money
to use this. Some of the Google APIs may allow you to extend this quota but will charge you for the extension but this depends upon the API.
Info from the Youtube API Quota documentation
来源:https://stackoverflow.com/questions/27225044/does-using-the-youtube-data-api-generate-any-cost