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
Just Copy the URL of the Channel From YouTube.com And Paste It Into Your Reader. Or you can just navigate to the channel on the YouTube website, copy the URL, and paste that into your RSS reader. As an example, here is my own YouTube channel URL: This is the same channel ID you'd use above.
An RSS (Really Simple Syndication) feed is an online file that contains details about every piece of content a site has published. Each time a site publishes a new piece of content, details about that content—including the full-text of the content or a summary, publication date, author, link, etc.
Import this file into your favorite RSS feed reader and the content of your favorite channels will be synced directly there. To create a RSS feed for a playlist, you need to know its ID number. You can find it at the end of its URL on YouTube when you visit it on the web.
Enabling great features to content creators as well as content viewers. Either to enable integration to websites or just to view videos in people’s favorite feed reader. Also, YouTube RSS feeds can be added to any feed reader or podcast player.
Currently, we can get a feed from a YouTube channel, playlist, and search query. Just in case you didn't know. FetchRSS can parse any web page and convert it to RSS.
To retrieve YouTube Playlist videos, we need API key as well as YouTube Playlist ID. We can find YouTube Playlist Id simply by clicking the Playlist link in YouTube. The URL of that page contains Playlist Id. The following PHP code makes API request to fetch playlist videos from YouTube.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With