Search code examples
youtubeyoutube-apiyoutube-data-apigoogle-apis-explorer

How to get any Youtube channel's subscribed users list and their details using YouTube Analytics API?


I am trying to get any youtube channel's subscribed users list and their detail(analysis), like the XYZ channel has 45% male users subscriber and 55% female users subscriber, this channel was subscribed by this top 5 countries subscriber and the channel Audience Demography related information.

For this, I use YouTube Analytics API v3 and my URL is like

https://www.googleapis.com/youtube/v3/subscriptions?part=snippet,contentDetails,subscriberSnippet&key=APIKEY&id=CHANNELID

but this URL return below code in response

{
    {
      "kind": "youtube#SubscriptionListResponse",
      "etag": "TOmVRCZpu2meG82Dv9k7Y-QQ8t888",
      "pageInfo": {
      "totalResults": 0,
      "resultsPerPage": 5
   },
   "items": []
}

I don't know I'm right or wrong for the use of this URL for getting the above detail. I did read all the questions about youtube data API but I did not find my question's answer on those questions.

Thanks in advance.


Solution

  • The kind of data you are requesting falls under the private data of a channel. You can only access such data if you are the owner of that channel (by authorizing - Oauth2) or if the channel owner lets you access that data (after going through authorization) through a publicly available application.