How to perform pagination in the YouTube API?

33 Views Asked by At

I'm trying to perform pagination on the YouTube API, but I can't get more than 12 pages.

I am making the following request: https://www.googleapis.com/youtube/v3/search?part=snippet&q=podcast&type=playlist&key={key}&relevanceLanguage=pt-BR&maxResults=50&regionCode=BR&snippet.categoryId=92

From this request, I obtain the nextPageToken and make a next request, just adding the pageToken parameter to the query. The problem is that when I reach the twelfth request, the nextPageToken field is no longer returned, and so I can no longer obtain the next pages.

I'm performing a for loop in Java to add the pageToken to each request. Until the twelfth, everything happens correctly, but from then on, what I mentioned above happens.

Could you help me with this?

0

There are 0 best solutions below