i searching channels against youtube api v3:
/search?part=id&type=channel&q=searchquery
problem: returns channels contain 0 (0) videos.
i can see 2 possible approaches:
- use
&order=videocount
parameter, sorts desc returned channels number of videos contain. - run second query search videos in each channel, limit
&maxresults=1
returned amount of videos one, , parse result.
i don't want take approach 1, changes default &order=relevance
, believe fine-tuned youtube return relevant channels first [still, result may contain channels without videos, makes youtube's algorithm calculating relevance questionable].
approach 2 causes lot of additional load, isn't i'd want do.
is there way solve in elegant way don't see right now?
approach 2 makes sense , assuming you'll use paging, can run second query need, instead of trying run query against whole result set. should fine.