Retrieving a list of videos from a Youtube playlist via RSS does not return more than 15 results

I use the following API to get a list of videos in a playlist:

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

The problem is that there are more than 15 videos in the playlist, the answer is only the first 15. I thought that there was a search call algorithm, but there was no link rel="next" in the answer and the ?page added to the end of the link 404.

thanks

+5
source share
1 answer

First, the call to the YouTube Data API v2 is already outdated and encourages the use of the YouTube Data API (v3).

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

The old API uses max-results and start-index to get more results, but it doesn't work anymore when I try.

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

We hope this information helps you.

+3
source

Source: https://habr.com/ru/post/1264268/


All Articles