Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

YouTube API Return List of All Videos from Specific Category

Tags:

youtube

video

get

I'm new to the YouTube Rest API v3 and I'm trying to see if there's a way to list every video in a specific category. The best I've been able to get is this:

https://www.googleapis.com/youtube/v3/videos?part=snippet&chart=mostPopular&regionCode=US&videoCategoryId=17&key={MY API KEY}

category ID 17 is equal to 'Sports' (and of course there is pagination on the API response which is fine). The problem is that in order to use the parameter 'videoCategoryID', I also am required to use the parameter 'chart' and then only acceptable value for 'chart' is 'mostPopular' according to this page:

https://developers.google.com/youtube/v3/docs/videos/list

I'm wondering if there is a way to get a list of the videos in a specific category (all videos not just Most Popular)?

There was this Stack Overflow post but it's for YouTube API v2 (Getting a complete list of all YouTube videos in a given category).

Thanks for your help!

like image 448
MillerMedia Avatar asked Dec 09 '25 23:12

MillerMedia


1 Answers

Try search and add type=video in order to list just videos https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&videoCategoryId=17&key={YOUR API KEY}

like image 71
Pooya Avatar answered Dec 13 '25 12:12

Pooya



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!