youtube-apiyoutube-data-api

Youtube subscriber count with Youtube Data Api V3


So previously i was getting a youtube channel subscriber count with youtube data api v2.

I used the following (I am using TED channel for demo purposes)

http://gdata.youtube.com/feeds/api/users/TEDtalksDirector?alt=json&callback=jQuery111202977260369807482_1433828589506&jsonp&_=1433828589507

However with the new v3 api, there is no subscriber count in the result.

https://www.googleapis.com/youtube/v3/subscriptions?part=snippet%2CcontentDetails&channelId=UCAuUUnT6oDeKwE6v1NGQxug&key=fhjfshdjfhsjdhfjshdjfhsjdfhsjdhfjshdjfhsjdhs

Is there a way in which I can get the subscriber count value?


Solution

  • Use it like this:

    https://www.googleapis.com/youtube/v3/channels?part=statistics&id=channel_id&key=your_key
    

    You can try your API request here: https://developers.google.com/youtube/v3/docs/channels/list#try-it

    Important: channel_id refers to the unique channel ID and not your channel name.

    Here's how to find your channel's ID easily:

    How to get YouTube channel ID