0
votes

According to YouTube's docs: https://developers.google.com/youtube/2.0/developers_guide_protocol_playlists

I can go to the following URL to retrieve a list of videos in a youtube playlist: https://gdata.youtube.com/feeds/api/playlists/8BCDD04DE8F771B2?v=2

Works well right? Well no... I've been unable to find a single playlist that actually works besides the one supplied by youtube. I have a playlist here: http://www.youtube.com/playlist?list=PLABD2A8CE079F70FA. It would be logical that if I simply take the ID of the playlist and plug it into the gdata URL, it should return valid data, correct? Nope... doesn't work:

https://gdata.youtube.com/feeds/api/playlists/PLABD2A8CE079F70FA

It appears that the API doesn't work with any playlist that starts with their new "PLA" format. What do I need to do, to get the youtube API working with the new playlist system?

3
this is public playlist or you created with your user accountSam Arul Raj T
so here you are using it as public PLABD2A8CE079F70FA right?Sam Arul Raj T
Yes... its a public playlist.Jason Axelrod
use your username in the place of usersSam Arul Raj T

3 Answers

0
votes

Well I figured it out. The playlist API is designed with the OLD Youtube Playlist IDs in mind, the ones without the "PL" at the start. So if you want to retrieve information about the videos in a playlist, you need to drop the PL from the Playlist ID and then it will work fine...

Example: https://gdata.youtube.com/feeds/api/playlists/ABD2A8CE079F70FA

VS: https://gdata.youtube.com/feeds/api/playlists/PLABD2A8CE079F70FA

0
votes

You can add query parameters to the url. With the max-results query you can fetch a maximum of 50 results. If you want more than 50 requests, you need to call this multiple times with start-index query.

https://gdata.youtube.com/feeds/api/playlists/PLABD2A8CE079F70FA?v=2&max-results=50 will give maximum of 50 results. Fetch the next 50 results by adding the query start-index=51&max-results=50. Currently this is the only way you can achieve it.