需要帮助才能使用YouTube搜索API获得超过100个结果

use*_*724 3 youtube youtube-api youtube.net-api

有什么方法可以使用YouTube API检索超过100个结果吗?

我可以使用此查询字符串检索最多100个结果:https://gdata.youtube.com/feeds/api/videos?q=football&orderby=relevance&start-index=1&max-results =10&v=2

但是当我尝试 https://gdata.youtube.com/feeds/api/videos?q=football&orderby=relevance&start-index=101&max-results=10&v=2

我得到:http://www.w3.org/2005/Atom'xmlns:openSearch =' http://a9.com/-/spec/opensearch/1.1/'xmlns :gd =' http:// schemas. google.com/g/2005'gd:etag ='W /"C0YFQHg9fyp7I2A9WhBVGUk."'> tag:youtube.com,2008:videos2013-04-26T01:51:51.667Zhttp://schemas.google.com/g/ 2005#kind'term =' http : //gdata.youtube.com/schemas/2007#video'/ >视频匹配:足球http://www.youtube.com/img/pic_youtubelogo_123x63.gif https:// www. youtube.com'/> http://schemas.google.com/g/2005#feed'type ='application/atom + xml'href =' https://gdata.youtube.com/feeds/api/videos? v = 2 '/> http://schemas.google.com/g/2005#batch'type ='application/atom + xml'href =' https: //gdata.youtube.com/feeds/api/videos/ 批量?v = 2 '/> https://gdata.youtube.com/feeds/api/videos?q=football&start-index=101&max-results=10&orderby=relevance&v=2'/>https://gdata.youtube. COM /馈送/ API /视频?ALT =原子服务&v = 2 '/> https://gdata.youtube.com/feeds/api/videos?q=football&start-index=91&max-results=10&orderby=relevance&v=2' /> YouTube http://www.youtube.com/ h ttp://gdata.youtube.com'> YouTube数据API10010110

据我了解,您可以使用YouTube搜索API获得999个结果.为什么这里限制为100?我有一个解决方法可以获得超过100个结果吗?

谢谢!

jlm*_*ald 6

我无法谈论内部是否发生了一些变化,现在将总结果限制在100,但这似乎是一个非常普遍的问题.但是,如果您尝试使用API​​的v3,这不会是一个问题:例如,此查询:

https://www.googleapis.com/youtube/v3/search?q=football&part=id&key=YOUR_DEVELOPER_KEY

会给你更多,更多的总结果.使用v3,您可以为每个响应设置最多返回50个视频的maxResults参数,然后通过将pageToken参数设置为给定响应的"nextPageToken"属性来对参数进行分页.