Search code examples
youtubeyoutube-apigoogle-analytics-api

Get youtube channel analytics data


enter image description here

I want to fetch public youtube analytics data for any channel like Social Blade https://socialblade.com/youtube/user/tseries.

The only API I could find is the reports API providing similar data https://developers.google.com/youtube/reporting/v1/reports but the API uses OAuth 2.0 and does not work with the API key.

Is there any other youtube API I can use to get time-series subscriber count and video view count for any channel on youtube?


Solution

  • YouTube analytics data is private user data.

    API keys can only be used to access public data. Inorder to access private user data you will need to use Oauth2 an request authorization of the owner of the channel.

    Socal blade is probably scraping YouTube directly (which is against YouTube TOS) or IMO they are probably doing a daily scan of public channel data from there YouTube Data API using an api key or maybe both we will never know as I don't think they are going to tell us.