Get LIKED YouTube videos via API

I know how to get the liked score from the youtube API, but I want to get the liked list. Reading the docs, I thought it could be done by getting a playlist I like or something.

Can I get a list of my favorite videos using the Javascript API?

+3


source to share


1 answer


If you are using the v3 API you can get your favorite video list. First, make a call for your channel, for example:

https://www.googleapis.com/youtube/v3/channels?part=contentDetails&mine=true&key={YOUR_API_KEY}

      

Then, in the response, you will have a list of related playlists - one called "likes". Take the playlist ID and request its feed:



https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId={PLAYLIST_ID}&key={YOUR_API_KEY}

      

Unless you are using the v3 API, you probably won't have much success getting the videos you like.

+17


source







All Articles