Youtube Video title with API v3 without API key?

前端 未结 4 1306
猫巷女王i
猫巷女王i 2020-12-03 03:03

Is it possible to get the video title using the video ID with API v3 without the API key? I could not find any information or example of getting the title i

4条回答
  •  误落风尘
    2020-12-03 03:38

    To get the video title, you will need an API key, and you'll need to make a request to:

    https://www.googleapis.com/youtube/v3/videos?part=snippet&id={COMMA_DELIMITED_LIST_OF_IDS}&key={YOUR_API_KEY}
    

    In the returned packet, the title will be at items.snippet.title

    You can't retrieve any API data without an API key; all API requests are on a quota system, and the key is used to determine how much to charge your app's daily limit. A call like the above, however, is quite inexpensive; it's a total of 3 units (2 for the snippet and 1 for the request itself). Since you get 50,000,000 units a day and can retrieve up to 50 snippets for that same 3 units, it's not much of a burden to use the API key.

提交回复
热议问题