How to get the total number of videos in a YouTube channel?

user2252365 picture user2252365 · Feb 24, 2014 · Viewed 8.8k times · Source

I want to get the count of the total no of video uploaded to a YouTube channel using YouTube analytics API. Can any one please tell me the correct metric and dimension combination for this?

Answer

Artefacto picture Artefacto · Nov 21, 2015

You can use the following URL for the Data API:

https://www.googleapis.com/youtube/v3/channels?part=statistics&forUsername=VideoLecturesChannel&key={YOUR_API_KEY}

Look for statistics.videoCount in the response. The docs for the endpoint are here.