Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get youtube video info with new APIs v3

Usually I retrieved clip's info by YouTube Data API V2, but now this version(v2) has been officially deprecated.

I used this URL to get video info:

'http://gdata.youtube.com/feeds/api/videos/'+ VIDEO_ID +'?v=2&alt=jsonc'

How to get info for a video in JSON format with new APIs v3?

like image 575
ilDug Avatar asked May 28 '15 12:05

ilDug


People also ask

How do I find video details on YouTube API?

Just filter it down using the id query parameter to the video id. See the Below URL: for example using the video id 4Y4YSpF6d6w and setting part to id,snippet you will receive channelId, title, description, tags, and categoryId properties.

Is YouTube Data API v3 free?

Yes, using the YouTube API does not incur any monetary cost for the entity calling the API. If you go over your quota an 403 Error will be returned by the API.

What data can I get from YouTube API?

The API provides the ability to retrieve feeds related to videos, users, and playlists. It also provides the ability to manipulate these feeds, such as creating new playlists, adding videos as favorites, and sending messsages.


1 Answers

Depending on the information you should be able to use the following endpoint to gain the information about the video you require. Just filter it down using the id query parameter to the video id.

https://developers.google.com/youtube/v3/docs/videos/list

See the Below URL: for example using the video id 4Y4YSpF6d6w and setting part to id,snippet you will receive channelId, title, description, tags, and categoryId properties. The above documentation contains all of the part parameters depending on the information you require about the video.

GET https://www.googleapis.com/youtube/v3/videos?part=id%2C+snippet&id=4Y4YSpF6d6w&key={YOUR_API_KEY}

like image 117
StackRewind Avatar answered Oct 11 '22 05:10

StackRewind