Reputation: 11
I am a beginner when it comes to programming and have never used a YouTube api key. I am trying to create a live YouTube subscriber counter that i can put into my website that will show how many subscribers I have on my channel. Not sure exactly what to do or where to start. Does anybody have an easy and simple code i can put into my website to show this subscriber counter? Also what type of API key do I need for this? Data or analytics? Any help would be greatly appreciated!! Thanks in advance -Mahdi
Upvotes: 0
Views: 2166
Reputation: 8599
You have just to use the YouTube Data API and query your Channel
resource. In the statistics.subscriberCount section of the response, you can find the number you need. Remember to trigger HTTP calls after the page has been loaded by the client for refreshing data and working with a live fashion.
You just need a Data API Key for that kind of use case.
Upvotes: 1