Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
236 views
in Technique[技术] by (71.8m points)

javascript - How to find out the exact number of followers on YouTube?

I need to find out the exact number of subscribers on the channel via API.

The channel is not on my account, but I have the rights to watch. I need the exact amount shown on studio.youtube.com.

I use:

https://www.googleapis.com/youtube/v3/channels?part=statistics,snippet&mine=true&access_token=[your_access_token].

But it shows only a personal account, and if you replace mine with managedByMe, I will see an error:

Img error

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

According to the official YouTube Data API docs, the only way to obtain the subscriber count of a given channel is through the following properties:

statistics.subscriberCount (unsigned long)
The number of subscribers that the channel has. This value is rounded down to three significant figures. Please see the Revision History or the YouTube Help Center for more details about how subscriber counts are rounded.

statistics.hiddenSubscriberCount (boolean)
Indicates whether the channel's subscriber count is publicly visible.

The number provided is rounded -- thus is not exact. Consequently, however unfortunate, is true that you cannot obtain the info you're looking for from the YouTube Data API.


According to this support post (the emphasis below is mine):

To create more consistency everywhere that we publicly display subscriber counts, starting in August 2019, we’ll begin showing the abbreviated subscriber number across all public YouTube surfaces. Third parties that use YouTube’s API Services will also access the same public facing counts you see on YouTube. Creators will still be able to see their exact number of subscribers in YouTube Studio.

The change will take place across YouTube and the public YouTube Data API Service. Creators will continue to see their full subscriber counts privately in YouTube Studio and YouTube Analytics.

Indeed exact numbers are shown only to creators within YouTube Studio or YouTube Analytics only.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...