So I have been getting youtube channel subscriber count with Youtube Data Api V3 for one channel. Right now I would like to get the live subscriber count of 50 YouTube channels.
Does Youtube allow sending a request with multiple channel ids? Or is there any approach that should be used to give live subscriber count for multiple channels with jQuery?
Example of what I'm looking for: https://www.youtube.com/watch?v=ftMnmPC82qM&ab_channel=MDM
CodePudding user response:
Once you have your YouTube Data API v3 key then use Channels: list endpoint this way: https://www.googleapis.com/youtube/v3/channels?part=statistics&id=UCq-Fj5jknLsUf-MWSy4_brA,UCbCmjCuTUZos6Inko4u57UQ&key=YOUR_API_KEY then in the answer the field subscriberCount
is what you are looking for.
You can add up to 50 YouTube channels ids in the id
parameter.
Furthermore as pointed out by stdvar the subscriberCounter
is an approximation: https://stackoverflow.com/a/63537230/7123660