Getting all videos by user name using youtube data API V3

Categories: Development Notes; Tagged with: ; @ November 12th, 2015 22:32

I managed to retrieve all videos by user name using v2:

https://gdata.youtube.com/feeds/api/users/GoogleDevelopers/uploads?alt=json&start-index=1&max-results=50&v=2

I haven’t find an API to get all videos directly, however it can be done by two steps (thanks to http://stackoverflow.com/questions/22613903/youtube-api-v3-get-list-of-users-videos) :

Step 1: get the user’s relatedPlaylist (uploads) id by:

GET https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=GoogleDevelopers&key={YOUR_API_KEY}

Step 2: get all videos by the id retrieved in step 1:

GET https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=UU_x5XG1OV2P6uZZ5FSM9Ttw&key={YOUR_API_KEY}

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.