Retrieve all videos from youtube playlist using youtube v3 API

youtubeyoutube-apiyoutube-data-api

I'm retrieving videos of a playlist using youtube v3 API and getting 50 items without any problem with this link:-

https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=50&playlistId=PLB03EA9545DD188C3&key=MY_API_KEY

But the video count is 100 and I'm only getting 50. How can I get the next 50 items?
I tried start-index but it does not work for v3 API.
Any help is appreciated.

Best Answer

YouTube Data API v3 results are paginated. So you need to get the next page of results for the others.

Basically in the response you have nextPageToken.

To get the remaining results, do the same exact call but setting pageToken into that token you received.

Related Topic