8

I'm using the following API to fetch a list of the videos in a playlist:

https://www.youtube.com/feeds/videos.xml?playlist_id=

The problem is if the playlist has more than 15 videos, the response is only the first 15. I thought there is a paging algorithm, but there is no link rel="next" in the response and appending ?page to the end of the link returns 404.

Thanks

1 Answer 1

8

First, the YouTube Data API v2 call is already deprecated and encourage you to use the YouTube Data API (v3).

I found in this thread that https://www.youtube.com/feeds/videos.xml?playlist_id=xxxxx is only limited to 15 videos or results.

The old API use max-results and start-index to get more results but it is not working anymore when I try.

If you want more results than 15, I suggest you to use the PlaylistItems: list of the YouTube Data API (v3). It has a parameter maxResults that you can set to maximum of 50. To get the another or next 50 results, you can use the parameter pageToken for it.

Hope this information helps you.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.