Reputation: 427
I'm using youtube api v3 and want to retrieve more than 50 results from a query. I already read Is youtube data api paging consistent if you use pagetokens? (v3 data api) that was very similar to my question, but it didn't give all I wanted to know.
Anyway, here is what I want to know:
so you can use pagetoken to page through the results and the ordering is not guaranteed. But what does that exactly mean: if i make a query for the most viewed videos for "obama", I'll get the 50 first results and then a token to the next page.
Imagine the view count changes in the meanwhile, what will be listed in the page using pagetoken? The 50 next results corresponding to the first query? 50 results that comes "after" the last video item after the view count changes ?
Also, when retrieving the next page, do i need to keep the keyword field or is the pagetoken enough ?
Upvotes: 7
Views: 15034
Reputation: 12877
Even though it's not a 100% guarantee, pagetokens will give you consistent results.
It will be 50 next results corresponding to first query.
You still need to keep the keywords but also add the pagetoken "https://developers.google.com/youtube/v3/docs/search/list#pageToken"
Upvotes: 12