0

I am working on a project in which I want to show the stats of the competitor's youtube channels.

I need to show views per day, subscribers per day, videos per day from the date when the competitor's channel is created to the current date.

Because I don't have any permission of competitor's channel so I can't use youtube analytics Api directly.

But I know this is possible because socialblade website is showings stats of channel (without permission because I checked with my own channel on socailblade and I didn't give any permission). https://socialblade.com/youtube/channel/UCAiKrZDrrSJnLpDM-zEVyng

I tried with youtube analytics API but FORBIDDEN error is coming and that is obvious I can't access private data without permission

So is there any way to fetch stats of youtube channel without access permission?

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
Rahul Saini
  • 216
  • 1
  • 16

2 Answers2

2

So is there any way to fetch [private] stats of YouTube channel without access permission?

No you cant. You need still need to understand the difference between private and public data. Public data is data that can be accessed by anyone. Public videos on YouTube for example

Private data is data that is owned by a user. A good example of that would be the analytics for a channel on YouTube. You cant access this kind of information without the permission of the user who owns it. Google giving you access to private user data without the user having granted access would completely negate the term private.

socialblade and my guess

The socialblade website is probably doing their own internal analytics using public data available from the YouTube data api. I suggest you do the same. It looks to me like they are just scanning all videos and ranking them by subscriber count, then by votes probably.

Duplicate question

This is almost the same answer I gave you last week when you asked this worded slightly different Youtube.analytics.query api giving forbidden error Asking the same thing twice isn't really going to get you a better outcome.

Linda Lawton - DaImTo
  • 106,405
  • 32
  • 180
  • 449
  • @DalmTo thanks for replying me again, I just want to know approach how they(socailblade) used the available public data. Do you have any Idea which public APIs they have used to find out view and subscribers for a specific day? – Rahul Saini Mar 28 '19 at 11:55
  • probably [videos list](https://developers.google.com/youtube/v3/docs/videos/list) but i dont think that will get you by day they are probably doing a regular pull and have the data cached then they can see the difference over days. – Linda Lawton - DaImTo Mar 28 '19 at 12:00
  • I also thought that they are doing regular pull but I checked with a new channel which was created recently and never used on socialblade. But they are showing full analytics of that channel from created date. – Rahul Saini Mar 28 '19 at 12:11
  • It wouldnt be hard to run a script everyday looking for new channels and then store the data on it in the event someone wants that data. Its just a question of having the computer power to do the requests and the database storage. You can do what ever you want with public data – Linda Lawton - DaImTo Mar 28 '19 at 12:15
  • If I make a script with the use of [channel.list](https://developers.google.com/youtube/v3/docs/channels/list) to get stats of all youtube channel on a daily basis will get data onwards. Do you know any way to get past days data? – Rahul Saini Apr 01 '19 at 05:37
0

You can use this to get a subscriber count in python.

channel_id = input("what channel do you want to find the subscribers for? (please enter channel id, not username) >> ")

channel_url = "https://www.youtube.com/channel/" + channel_id
    
read_channel_info = str(uopen(channel_url).read())
    
print("The user you are searching for has",find("[0-9|\.]+[M|K]? subscriber",read_channel_info)[0][:-11], "subscribers.")
Nimantha
  • 6,405
  • 6
  • 28
  • 69