youtubeyoutube-apiyoutube-data-api

Youtube Video title with API v3 without API key?


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 in the API documentation.


Solution

  • 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.