This question is NOT about the YouTube API 500-1000 meaningful results question. The way I thought YouTube API nextPageTokens worked were that they would be null once there are no more results to return. However, I am seeing that there are results returned to begin with, but sometimes even after only 8 items (for a single request, maxResults = 50) it will include a nextPageToken but this only returns an empty 'items' list. The subsequent nextPageToken leads to more empty lists until the 1000 max is reached and then the nextPageToken becomes null.
Also concerning is that the page_info['totalResults'] shows as 1000000 but is only returning less than 200 in many cases.
So it may happen:
- Make an initial request, get 50 results
- query the nextPageToken, get another 50 results AND nextPageToken
- query the nextPageToken, get another 8 results AND nextPageToken
- query the nextPageToken, get an empty list AND nextPageToken
- query the nextPageToken, get an empty list AND nextPageToken
- etc.
Is this normal? Or do I have to look for partial 'items' lists to determine if the results are finished?