Search code examples
androidiphoneyoutubeyoutube-apigdata

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


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


Solution

  • 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.