youtube videos views api code example
Example 1: api to get youtube info
GET
https://www.googleapis.com/youtube/v3/videos?part=id%2C+snippet&id=4Y4YSpF6d6w&key={YOUR_API_KEY}
Example 2: How to get Youtube video details using video id Json
[STEP 1] Go to Youtube API : which is shows direct result just doing one time Authentication with google.
In “Try this API” section make sure this fields are there,
part : snippet
id : TTc6Rk0pblU // Enter youtube video ID
Done, now click on "Execute" button
//You can find publish date under Youtube API on below path :
items --> snippet --> publishedAt
//You can find it under Youtube API on below path
items --> snippet --> channelId
//You can find it under Youtube API on below path
items --> snippet --> title
//You can find it under Youtube API on below path :
items --> snippet --> description
//You can find it under Youtube API on below path
items --> snippet --> thumbnails