Retrieve all videos from youtube playlist using youtube v3 API
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.
There are three tokes
- pageToken
- nextPageToken
- prevPageToken
and also you can set max page size using
maxResults=50 {allowed Values 1 to 50 }
if you are on page 1 you won't get prevPageToken
but you get nextPageToken
pass this token to next request's
pageToken = {nextPageToken get from last request}
this way you can navigate to next page Try it Your Self
Edited
Ok, for other scenarios
If you are on First Page then
- pageToken = 'Some values'
- nextPageToken = 'Some values'
- prevPageToken = null
If you are on neither the first nor last page then
- pageToken = 'Some values'
- nextPageToken = 'Some values'
- prevPageToken = 'Some values'
@Manoj: you can find your answer below
if you are on the last page
- pageToken = 'Some values'
- nextPageToken = null
- prevPageToken = 'Some value'
Even the field may not be present.