Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

Youtube Data API v3 Paging through results without wasting quota units

$
0
0

I am new to the YouTube Data API and I am using the search.list method to get results. The goal of the application is to return results containing a keyword with low view count. I havent found any way to sort by lowest view count to highest (only highest to lowest) so I realized I have to basically keep running the search query past many pages, feeding the resultset's nextPageToken member into the query parameters through each cycle. I found out that I cant skip pages either. :(

The problem with this is that it's using up quotas quickly. Each call to search takes 100 units which, and since I have to do a lot of search calls for each page I have to go through. I keep hitting the quota limit.

Is there any way to accomplish this without iterating through a whole lot of calls to searchlist? I cant apply for a quota extension because Im not a real business, I dont have an organization and my application is basically a dumpster filled with loose test files.

I repeating calls to search.list and passing the nextPageToken to the searchlist query parameters. Obviously, as I expected, it worked but ate through a lot of units. For example, to reach the 20th page of Youtube search results, I have to run the searchlist method 20 times, each call costs 100 units, so that's about 2000 credits used up right there.


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>