Get XML with id's of all uploaded videos on youtube channel
Asked Answered
P

2

7

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

Petronel answered 7/11, 2012 at 21:30 Comment(0)
K
4

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.

Kerri answered 7/11, 2012 at 21:39 Comment(0)
S
5

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

Siclari answered 20/7, 2015 at 10:31 Comment(0)
K
4

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.

Kerri answered 7/11, 2012 at 21:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.