YouTube Data API - How to get “Saved playlists” vi

2019-06-24 07:23发布

I'm trying to get all of my playlists through YouTube Data API including the public playlist that I have created and playlists that I liked from YouTube. The playlists that I have liked from YouTube are in separate section which call "Saved playlists". I'm using

https://www.googleapis.com/youtube/v3/playlists?part=snippet&channelId={ChannelID}&maxResults=50&key={YOUR_API_KEY}

But I'm getting only the playlist that I have created. How can I get the "Saved playlists"?

2条回答
Explosion°爆炸
2楼-- · 2019-06-24 08:02

I cannot add a comment, so I'm writing as an answer. (I hope I'm not doing anything against Stackoverflow Terms of Service)

If you would like to retrieve a spesific Playlist, i.e. "Saved Playlist", you should remove the Channel ID from your request and add Playlist ID ...

For example;

GET https://www.googleapis.com/youtube/v3/playlists?part=snippet&id={PlaylistID}&maxResults=50&key={YOUR_API_KEY}

I hope it helps.

查看更多
贪生不怕死
3楼-- · 2019-06-24 08:24

Unfortunately this endpoint only retrieves user created playlists, the ability to retrieve "Saved Playlists" it is not implemented yet.

As can be seen here: https://code.google.com/p/gdata-issues/issues/detail?id=6836

查看更多
登录 后发表回答