Sometimes we need YouTube channels Total Subscriber, Total videos, total views, this will help you to find those details.
GET https://www.googleapis.com/youtube/v3/channels?part=statistics&id=$[channelID]]&key=${API KEY}
Parameter | Type | Description |
---|---|---|
API KEY |
string |
Required. Your API key |
channelID |
string |
Required. Your YouTube Channel ID |
https://raj-khan.github.io/youtube-subscribers/
You need to create a google developers account, then craete a project using YouTube API v3. In credential section you can generate API.
While playing any youtube video if you click on this YouTube channel you can find the user ID in the browser url section.
JavaScript, HTML, Google Developers API
For support, email [email protected].
fetch(`https://www.googleapis.com/youtube/v3/channels?part=statistics&id=['CHANNEL ID']&key=[API KEY]`)
.then(response => {
return response.json()
})
.then(data => {
console.log(data);
})