6
votes

I have more than 100 videos uploaded in a youtube channel. I get the xml of channel as: https://gdata.youtube.com/feeds/api/users/UserId/uploads , it only returns xml with id's for only 25 videos. How can i get xml of all uploaded videos on particular channel

2

2 Answers

4
votes

By default the APi only returns 25, you have to add on a max results parameter to get more, but then sadly this only allows you up to 50.

https://gdata.youtube.com/feeds/api/users/UserId/uploads?&max-results=50

What you have to do is the keep requesting for more using an offset to say you want to start from a certain value, in this case you would do something like:

https://gdata.youtube.com/feeds/api/users/UserId/uploads?&max-results=50&start-index=51

have a look at https://developers.google.com/youtube/2.0/developers_guide_protocol_video_feeds for more information.

4
votes

I know this is an old question, but since it's the top result when googling Youtube channel xml feed, I feel like answering anyway.

The example from the accepted answer is no longer supported since Youtube has changed to API v3 and deprecated v2 in February 2014. Since API v3, you need to use the following:

Channel

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

Username

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

The above examples (if you replace the words in capital letters) output an XML file.

Source with a link to the new API