Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

How to get artist name and title from youtube video with YouTube Data API?

$
0
0

I saw similar questions, but they are already many years old, maybe something has changed?
I make a request to youtube to get video data.

(async () => {   const url = `https://www.googleapis.com/youtube/v3/videos?id=${ID}&key=${API_KEY}&part=snippet,contentDetails`;   const response = await axios.get(url);   console.log(response.data.items[0]);})();

I am getting the following object (part of it):

..."snippet": {"publishedAt": "2015-05-18T04:00:00Z","channelId": "UCANLZYMidaCbLQFWXBC95Jg","title": "Taylor Swift - Bad Blood ft. Kendrick Lamar","description": "►Exclusive Merch: https://store.taylorswift.com\n \n►Follow Taylor Swift Online\nInstagram: http://www.instagram.com/taylorswift\nFacebook: http://www.facebook.com/taylorswift\nTumblr: http://taylorswift.tumblr.com\nTwitter: http://www.twitter.com/taylorswift13\nWebsite: http://www.taylorswift.com\n \n►Follow Taylor Nation Online\nInstagram: http://www.instagram.com/taylornation\nTumblr: http://taylornation.tumblr.com\nTwitter: http://www.twitter.com/taylornation13","thumbnails": {"default": {"url": "https://i.ytimg.com/vi/QcIy9NiNbmo/default.jpg","width": 120,"height": 90        },...

Title, description and data response for this part:enter image description here

But below is exactly the part that I need:enter image description here

Is there any way to get this data?


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>