Reputation: 670
I am new to Youtube API and I am wondering if it's possible to select or better find a Youtube channel by different criterias and not by its name.
So for example if I want to know if there is a channel that opend 5 years and has at 50 videos by today with out knowing the name.
Is this something that is possible with api?
Any help or hint is very appreciated.
Upvotes: 0
Views: 43
Reputation: 1632
Unfortunately, There's no API that would directly give you that data. However, you can create a function that would return you that data by using the Search endpoint of the YouTube Data API. This API allows you to search for videos uploaded with publishedBefore
and publishedAfter
options. Using these, you could query the results for their Channel ID and check for the number of items[]
returned for each ID.
Please note, depending on your use case, this could drastically increase the usage of the API. Hence, I would use a HashMap(if using Java or something similar, if not) to keep track of Channel IDs you've already queried for along with their results and only call the API if the Hashmap doesn't already have a value for that ID.
Hope this helps.
Upvotes: 1