How get all CategoryId for youtube video?

Hello,
Reading youtube sarch docs at https://developers.google.com/youtube/v3/docs/search/list
I read :

The videoCategoryId parameter filters video search results based on their category. If you specify a value for this parameter, you must also set the type parameter’s value to video.

  1. But I suppose that there must be ids of all youtube categories?
    Where can I get it?

2)Using axios for youtube search I use code :

                let params= {  
                    part:       'snippet',
                    key:        this.youtubeApiKey,
                    q:          this.searchString,
                    maxResults: this.youtubeMaxResults,
                    type:       'video'
                }


                axios.get('https://www.googleapis.com/youtube/v3/search', {params})
                    .then(response => {

And I got results like :
{ "kind": "youtube#video", "videoId": "1_5sGUfqDWY" }, "snippet": { "publishedAt": "2020-10-03T18:44:26Z", "channelId": "UCoIVwPsLF7iAgUg-9Y3u9Cg", "title": "logo! am Samstagabend, 3. Oktober 2020", "description": "Folgen Sie uns auf Social Media Youtube : https://www.kisa.link/NnTN Twitter: https://bit.ly/2CxcJHT Facebook: https://bit.ly/3avlb79 Abonnieren ...", "thumbnails": { "default": { "url": "https://i.ytimg.com/vi/1_5sGUfqDWY/default.jpg", "width": 120, "height": 90 }, "medium": { "url": "https://i.ytimg.com/vi/1_5sGUfqDWY/mqdefault.jpg", "width": 320, "height": 180 }, "high": { "url": "https://i.ytimg.com/vi/1_5sGUfqDWY/hqdefault.jpg", "width": 480, "height": 360 } }, "channelTitle": "logo! Kinder Nachrichten", "liveBroadcastContent": "none", "publishTime": "2020-10-03T18:44:26Z" } }

But how to get like/dislike and authors for this videos?

Thanks!

Seems you are currently using the /search path.

In the videos docs you will find the statistics property that includes likeCount and dislikeCount.

1 Like

Could, you please, give a link to this docs?

Hey there,

I’ve already linked it in my previous post, it is the blue part.

1 Like

Reading the docs I see that as I make search with request like:
https://www.googleapis.com/youtube/v3/search

It does not return statistics property, including likeCount/dislikeCount
These statistics can be read only with request like
https://www.googleapis.com/youtube/v3/video/VideoUniquId
so if I if upload 10 videos in request in search request I have to make additive 10 requests for statistics of any video. There is no any other way?

I’ve never built an app with the YT API, but that could be a viable approach.

Yes, I just want to be sure that I can not avoid additive 10 requests

If you got no metrics that support your concerns,
e.g. that these 10 small (?) requests are slower than 1 big(?) request,
I’d call this “premature optimization”.