Youtube API V3: How to Find a List of Each 'Videocategoryid'

YouTube API V3: Where can i find a list of each 'videoCategoryId'?

Video categories are region specific -- that's why the category list service requires either a category ID or a region, but not both. This endpoint:

https://www.googleapis.com/youtube/v3/videoCategories?part=snippet®ionCode={two-character-region}&key={YOUR_API_KEY}

will return all categories, along with their ids, for a given region. So as Ikai Lan pointed out in the comments, the ID for music is '10' in the US and, in fact, in all regions where this category is allowed; but there may be some regions where it isn't allowed, or some regions that aren't supported at all.

YouTube Data API V3: Fetch multiple videoCategoryId videos

  1. You need to have 5 queries for that. Even if you were able to give 5 category ids, it wouldn't understand to pick up one video data for each one.
  2. Search doesn't return videoCategory right now, videos->list has it.
  3. There is no problem going through OAuth2, you can just ask read-only permission, and should be fine. Users can pick their already stored accounts easily.

How to get list of videos from Category in YouTube Api

The request below returns all videos within the Category "10" - you need to set the type to video

https://www.googleapis.com/youtube/v3/search?part=snippet&type=video&videoCategoryId=10&key={YOUR_API_KEY}

See https://developers.google.com/apis-explorer/#p/youtube/v3/youtube.search.list?part=snippet&type=video&videoCategoryId=10&_h=1&



Related Topics



Leave a reply



Submit