Search code examples
youtubeyoutube-apiyoutube-analyticsyoutube-analytics-api

Is there any limit to the number of rows returned by API?


I am making a bulk call with 30 posts and daily data of all. Is there any limits to the number of rows that will be returned by the API? I am having problem getting the results.

Can anyone please help.


Solution

  • YouTube doesn't return any rows ... it's not relational data. That may sound like a pedantic thing to point out, but it's crucial for this next point; the API will return 50 videos at a time, along with tokens to get more results based on the same query, up to a total of 500 ... because the data isn't relational, you can't just "select all rows" that match a certain criteria. Rather, it is probabilistically determining relevance to your search parameters, and after about 500 results the algorithms don't have enough certainty to make additional results relevant.

    So in your case, where you can change the date as needed (to allow the algorithms to be more specific), you'll want to do a series of calls; perhaps one at a time (since you have to paginate anyway to get more than 50 results, it's probably not that much more expensive in terms of network bandwidth).