How can get all results from Youtube API (search API) response -


like title. request :

https://www.googleapis.com/youtube/v3/search?key=aizasyduxczhyyvhwfxkuf3ygw9p0gwmklvwlyc&part=id,snippet&publishedafter=2014-12-09t00:00:00z&publishedbefore=2014-12-11t00:00:00z&videocategoryid=gcsg93lxrvicygrelz&type=video&maxresults=50&pagetoken= 

total result 1000000. can 500 results maximum (10 page, 50 results/page). @ 10th page, don't see nextpagetoken property go next page. ??? don't know why. how can of result.

youtube imposes soft limit of 500. there no direct way more through api.

full details: https://code.google.com/p/gdata-issues/issues/detail?id=4282

relevant excerpt:

"we can't provide more ~500 search results arbitrary youtube query via api without quality of search results severely degrading (duplicates, etc.).

the v1/v2 gdata api updated in november limit number of search results returned 500. if specify start-index of 500 or more, won't results.

this supposed have gone effect v3 api (which uses different method of paging through results) apparently not pushed out, still possible retrieve 1000 search results in v3—the last 500 of of bad quality.

the change limit v3 500 search results pushed out sometime in near future. there no longer nextpagetokens returned once hit 500 results.

i understand totalresults returned higher 500 in of these cases, not same thing saying can return x million possible results. it's meant estimate of total size of set of videos match query , isn't useful."

updated - how around 500 result max soft limit

use filters 'publishedafter' , 'publishedbefore' break query loops of queries day/week/month until no more results returned. each periodic query should return less 500 results each, you'll them all.


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -