I want to do pagination with youtube api v3 (/videos?).
My request uri - https://www.googleapis.com/youtube/v3/videos?key={APP_KEY}&part=snippet&maxResults=50&chart=mostPopular&videoCategoryId=10
But in response I didn't see nextPageToken
field.
If I send maxResult
field which set in 49 (not 50 like first request). In response I can find nextPageToken
field and count of items in search - 200. BUT, when I send new request for second part of search - in response I have only 15 items (must be 49) and haven't nextPageToken
field, only previousPageToken
.
Thank.
Not an answer, but too much to put into a comment:
Using
https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.videos.list?part=snippet&chart=mostPopular&maxResults=20
to collect the nextPageToken
, then doing a second and finally third time, the same is happening to me.
I then removed the maxResults param, thinking this might not be doing what I thought, and patiently worked through until I hit the same place as before (was using maxResults = 20)..and no more nextPageToken
, even though the "totalResults": 200
Can only think:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With