Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube - how to get a list of videos in youtube channel and display them as a list?

I am browsing the YouTube API here: https://developers.google.com/youtube/v3/guides/working_with_channel_ids

And I don't quite see a way to get all of a channel's videos. Is that not a common thing people do? And you need the channel id which I am not sure how to get. It is not my channel.

Would anyone please be able to point me in the right direction here. It seems that if I can embed a video into a website, I should be able to get the full channel list of videos. Or am I missing something?

like image 544
Genadinik Avatar asked Oct 04 '22 16:10

Genadinik


1 Answers

You can do this to retrieve the channel id:

Retrieve Youtube Channel info for "Vanity" channel

And later, with channel id you can retrieve the channel's playlists:

https://developers.google.com/youtube/v3/docs/playlists

And then you can use each playlist id to retrieve the PlayListItems, and in this way retrieve all the videoIds in the channel:

https://developers.google.com/youtube/v3/docs/playlistItems

like image 151
Matias Molinas Avatar answered Oct 06 '22 07:10

Matias Molinas