Accessing an item beyond start_index=1000 in a YouTube user upload feed

后端 未结 1 1881
有刺的猬
有刺的猬 2021-02-08 12:36

I am currently trying to pull data about videos from a YouTube user upload feed. This feed contains all of the videos uploaded by a certain user, and is accessed from the API by

相关标签:
1条回答
  • 2021-02-08 12:56

    Getting all the videos for a given account is supported, but you need to make sure that your request for the uploads feed is going against the backend database and not the search index. Because you're including orderby=published in your request URL, you're going against the search index. Search index feeds are limited to 1000 entries.

    Get rid of the orderby=published and you'll get the data you're looking for. The default ordering of the uploads feed is reverse-chronological anyway.

    This is a particularly easy mistake to make, and we have a blog post up explaining it in more detail:

    http://apiblog.youtube.com/2012/03/keeping-things-fresh.html

    The nice thing is that this is something that will no longer be a problem in version 3 of the API.

    0 讨论(0)
提交回复
热议问题