Reputation: 1
I am using the YouTube Data API v3 for my work, but it does not get the right subscribers count when I ask for that.
In my code I use this URL:
https://www.googleapis.com/youtube/v3/channels?part=statistics&forUsername=" + MY_USERNAME + "&key=" + MY_KEY
and I get this JSON back:
{
"kind": "youtube#channelListResponse",
"etag": "jEJnVwl_Vgc3tM1asn0kb2Mu7as",
"pageInfo": {
"totalResults": 1,
"resultsPerPage": 5
},
"items": [
{
"kind": "youtube#channel",
"etag": "CcPFuF-ke8OIYEvfXXCaktL89BA",
"id": "UC-lHJZR3Gqxm24_Vd_AJ5Yw",
"statistics": {
"viewCount": "26294085594",
"commentCount": "0",
"subscriberCount": "107000000",
"hiddenSubscriberCount": false,
"videoCount": "4223"
}
}
]
}
What is good for me is subscriberCount
in the items
. This JSON result is a test I did for PewDiePie's channel, but I expect the number change every time I refresh due to his fame; and if you look carefully you know it is not even the right number.
Is there a way to get the full number?
Upvotes: 0
Views: 807
Reputation: 316
A while back Google changed how it's APIs worked on YouTube to prevent drama.
In other words, all subscriber counts are rounded to prevent "sub battles", live count streams and websites that would show the decline of a creator. Sorry about this!
Upvotes: 3