Alex Rivera | Logout

How get all videos from a playlist using youtube api?

Asked 2012-11-13T09:32:00.027
10

Now i am using this link

http://gdata.youtube.com/feeds/api/playlists/plalistID

to retrieve video from YouTube playlist. but the problem is only getting 25 video. but the playlist contains 100 videos. How get all video from playlist?

Edit
Report

1 Answer

9

Youtube let's you fetch up to 50 entries per request.
The response contains some <link> elements. And if there are still more records to fetch one of it is of the form <link rel='next' ... e.g.

<link
  rel='next'
  type='application/atom+xml'
  href='https://gdata.youtube.com/feeds/api/playlists/plalistID?start-index=26&amp;max-results=25&amp;v=2'
/>

Search for this element and retrieve the document that the href attribute points to until the repsonse has no <link rel='next' element.

answered 2012-11-13T09:49:25.980

Your Answer