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.
To get the video title, you will NOT need an API key, and you'll need to make a request to:
https://noembed.com/embed?url=https://www.youtube.com/watch?v=dQw4w9WgXcQ
Change the YouTube URL for the video that you need.
It also works with Vimeo and many other supported sites with URLs like:
https://noembed.com/embed?url=https://vimeo.com/45196609
It is not possible to get the video title using the video ID with API v3 without the API key if you use the API directly. The YouTube Data API v2 is deprecated (see: YouTube Data API v2 Deprecation: Frequently Asked Questions) and currently the YouTube API doesn't support oEmbed with JSONP as it should (see Issue 4329: oEmbed callback for JSONP).
But fortunately there is the Noembed service that lets you get the titles (and other data) of YouTube videos with JSONP and without the API key.
Here is a simple demo to get the title with jQuery:
var id = 'dQw4w9WgXcQ';
var url = 'https://www.youtube.com/watch?v=' + id;
$.getJSON('https://noembed.com/embed',
{format: 'json', url: url}, function (data) {
alert(data.title);
});
See DEMO on JS Bin.
See also these questions: