Reputation: 13
i can get number subscribe channel but by difficult method and i don't if this method is right.
first i send GET https://www.googleapis.com/youtube/v3/search?part=snippet&q=socre&type=channel&key={YOUR_API_KEY}
then i make for loop to get number subscribe for every channel after get channel id
GET https://www.googleapis.com/youtube/v3/channels?part=statistics&id=UCblf4qm9ZhXD7sS_rZLTIOQ&key={YOUR_API_KEY}
then i get subscribe number for my result channels.
is it right method ? or there are easy?
Upvotes: 0
Views: 388
Reputation: 1415
I think it is the right way, except that you should use a channel-id list in the second request (a comma delimited list of channel-id's). Max 50 id's per request. And check that your connection allows long url's.
Upvotes: 0