当前位置: 动力学知识库 > 问答 > 编程问答 >

youtube api v3 - How to get any page of results in one request?

问题描述:

I am exploring this function: search.list

Is it possible to get any page of results without iterating through nextPageToken?

E.g. if I display 20 items per page, how do I get items 180-200 for the tenth page without retrieving all the pages inbetween?

On what does the token value for next page depend?

网友答案:

It looks like page tokens can be cached. The value of the page tokens doesn't seems to change with time and with the query term. It depends on the maxResults parameter (how many results to retrieve per page). So if you use the same page size for your queries hardcoding the values in the source seems like a working solution.

分享给朋友:
您可能感兴趣的文章:
随机阅读: