Skip to content

Instantly share code, notes, and snippets.

@dgp
Created June 11, 2015 05:57
Show Gist options
  • Save dgp/1b24bf2961521bd75d6c to your computer and use it in GitHub Desktop.
Save dgp/1b24bf2961521bd75d6c to your computer and use it in GitHub Desktop.
youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
23 - Comedy
24 - Entertainment
25 - News & Politics
26 - Howto & Style
27 - Education
28 - Science & Technology
29 - Nonprofits & Activism
30 - Movies
31 - Anime/Animation
32 - Action/Adventure
33 - Classics
34 - Comedy
35 - Documentary
36 - Drama
37 - Family
38 - Foreign
39 - Horror
40 - Sci-Fi/Fantasy
41 - Thriller
42 - Shorts
43 - Shows
44 - Trailers
From youtube upload page
2 - Cars & Vehicles
23 - Comedy
27 - Education
24 - Entertainment
1 - Film & Animation
20 - Gaming
26 - How-to & Style
10 - Music
25 - News & Politics
29 - Non-profits & Activism
22 - People & Blogs
15 - Pets & Animals
28 - Science & Technology
17 - Sport
19 - Travel & Events
@sanbnl
Copy link

sanbnl commented Sep 6, 2016

I am interested in documentaries and i would like to know if there is a way to get subcategories id for example documentaries about econmy, nature, history... ??

i would be very appreciated if someone could help.

@arjunkori
Copy link

how do get this categories via youtube api.

@shakee93
Copy link

shakee93 commented Mar 8, 2017

@arjunkori take look at this stack question here

@diogobruni
Copy link

Thank you!

@ishaqashraf
Copy link

how to get all channels of particular category and country ?using API

@edithconner
Copy link

These are only categories, but we have more topics to record! I prefer to use kparser.com/youtube-video-ideas for understanding what the YouTube tags my competitors have, and then I can see all the suggested ideas based on my personal goals! That's amazing!

@arduino731
Copy link

arduino731 commented May 31, 2018

some of those are wrong videocategoryid here new id number updated see as id number
/**

  • API response
    */
    {
    "kind": "youtube#videoCategoryListResponse",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/E-Ds3ITKSrXDUMT84TJGPhLUbjw"",
    "items": [
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/Xy1mB4_yLrHy_BmKmPBggty2mZQ"",
    "id": "1",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Film & Animation",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/UZ1oLIIz2dxIhO45ZTFR3a3NyTA"",
    "id": "2",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Autos & Vehicles",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/nqRIq97-xe5XRZTxbknKFVe5Lmg"",
    "id": "10",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Music",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/HwXKamM1Q20q9BN-oBJavSGkfDI"",
    "id": "15",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Pets & Animals",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/9GQMSRjrZdHeb1OEM1XVQ9zbGec"",
    "id": "17",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Sports",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/FJwVpGCVZ1yiJrqZbpqe68Sy_OE"",
    "id": "18",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Short Movies",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/M-3iD9dwK7YJCafRf_DkLN8CouA"",
    "id": "19",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Travel & Events",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/WmA0qYEfjWsAoyJFSw2zinhn2wM"",
    "id": "20",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Gaming",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/EapFaGYG7K0StIXVf8aba249tdM"",
    "id": "21",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Videoblogging",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/xId8RX7vRN8rqkbYZbNIytUQDRo"",
    "id": "22",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "People & Blogs",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/G9LHzQmx44rX2S5yaga_Aqtwz8M"",
    "id": "23",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Comedy",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/UVB9oxX2Bvqa_w_y3vXSLVK5E_s"",
    "id": "24",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Entertainment",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/QiLK0ZIrFoORdk_g2l_XR_ECjDc"",
    "id": "25",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "News & Politics",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/r6Ck6Z0_L0rG37VJQR200SGNA_w"",
    "id": "26",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Howto & Style",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/EoYkczo9I3RCf96RveKTOgOPkUM"",
    "id": "27",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Education",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/w5HjcTD82G_XA3xBctS30zS-JpQ"",
    "id": "28",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Science & Technology",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/SalkJoBWq_smSEqiAx_qyri6Wa8"",
    "id": "29",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Nonprofits & Activism",
    "assignable": true
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/lL7uWDr_071CHxifjYG1tJrp4Uo"",
    "id": "30",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Movies",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/WnuVfjO-PyFLO7NTRQIbrGE62nk"",
    "id": "31",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Anime/Animation",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/ctpH2hGA_UZ3volJT_FTlOg9M00"",
    "id": "32",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Action/Adventure",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/L0kR3-g1BAo5UD1PLVbQ7LkkDtQ"",
    "id": "33",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Classics",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/pUZOAC_s9sfiwar639qr_wAB-aI"",
    "id": "34",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Comedy",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/Xb5JLhtyNRN3AQq021Ds-OV50Jk"",
    "id": "35",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Documentary",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/u8WXzF4HIhtEi805__sqjuA4lEk"",
    "id": "36",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Drama",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/D04PP4Gr7wc4IV_O9G66Z4A8KWQ"",
    "id": "37",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Family",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/i5-_AceGXQCEEMWU0V8CcQm_vLQ"",
    "id": "38",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Foreign",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/rtlxd0zOixA9QHdIZB26-St5qgQ"",
    "id": "39",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Horror",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/N1TrDFLRppxZgBowCJfJCvh0Dpg"",
    "id": "40",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Sci-Fi/Fantasy",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/7UMGi6zRySqXopr_rv4sZq6Za2E"",
    "id": "41",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Thriller",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/RScXhi324h8usyIetreAVb-uKeM"",
    "id": "42",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Shorts",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/0n9MJVCDLpA8q7aiGVrFsuFsd0A"",
    "id": "43",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Shows",
    "assignable": false
    }
    },
    {
    "kind": "youtube#videoCategory",
    "etag": ""DuHzAJ-eQIiCIp7p4ldoVcVAOeY/x5NxSf5fz8hn4loSN4rvhwzD_pY"",
    "id": "44",
    "snippet": {
    "channelId": "UCBR8-60-B28hp2BmDPdntcQ",
    "title": "Trailers",
    "assignable": false
    }
    }
    ]
    }

@ErturkOzturk
Copy link

ErturkOzturk commented Sep 23, 2018

1 Film & Animation
2 Autos & Vehicles
10 Music
15 Pets & Animals
17 Sports
18 Short Movies
19 Travel & Events
20 Gaming
21 Videoblogging
22 People & Blogs
23 Comedy
24 Entertainment
25 News & Politics
26 Howto & Style
27 Education
28 Science & Technology
29 Nonprofits & Activism
30 Movies
31 Anime/Animation
32 Action/Adventure
33 Classics
34 Comedy
35 Documentary
36 Drama
37 Family
38 Foreign
39 Horror
40 Sci-Fi/Fantasy
41 Thriller
42 Shorts
43 Shows
44 Trailers

And this is array for query:

let cats = ['', 'Film & Animation', 'Autos & Vehicles', '', '', '', '', '', '', '', 'Music', '', '', '', '', 'Pets & Animals', '', 'Sports', 'Short Movies', 'Travel & Events', 'Gaming', 'Videoblogging', 'People & Blogs', 'Comedy', 'Entertainment', 'News & Politics', 'Howto & Style', 'Education', 'Science & Technology', 'Nonprofits & Activism', 'Movies', 'Anime/Animation', 'Action/Adventure', 'Classics', 'Comedy', 'Documentary', 'Drama', 'Family', 'Foreign', 'Horror', 'Sci-Fi/Fantasy', 'Thriller', 'Shorts', 'Shows', 'Trailers']

console.log(cats[10]); // Music

@mayeaux
Copy link

mayeaux commented Jul 23, 2019

I'm surprised Beauty and Fashion doesn't show up as a Category Id while it shows up here: https://www.youtube.com/channels

Does anyone know if it does in fact have its own Category Id?

@j33tmane
Copy link

j33tmane commented Sep 5, 2019

{
"kind": "youtube#guideCategoryListResponse",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/a-cAGBlUieMWfqnewFVcxp13-bo"",
"items": [
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/fnL4T7wf3HKS8VCeb2Mui5q9zeM"",
"id": "GCQmVzdCBvZiBZb3VUdWJl",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Best of YouTube"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/ImrTevQ0UvryyOmvjPFFu85AKCU"",
"id": "GCQ3JlYXRvciBvbiB0aGUgUmlzZQ",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Creator on the Rise"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/mbUaBJAZzQQXrUy_F02c8idvkek"",
"id": "GCTXVzaWM",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Music"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/dhUpBnIOaCoCDniv0ZybQIGWa8k"",
"id": "GCQ29tZWR5",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Comedy"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/nPXKSW3gvbE_IGO9kQ0pVWWIX3E"",
"id": "GCRmlsbSAmIEVudGVydGFpbm1lbnQ",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Film & Entertainment"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/81fHLyWLDYMN1EQqlz89HXIdMs4"",
"id": "GCR2FtaW5n",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Gaming"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/H1ihcHpjpFnqgfFZnS7Y95-ELJE"",
"id": "GCQmVhdXR5ICYgRmFzaGlvbg",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Beauty & Fashion"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/Pv5088ySWfRzEy9SLDhygXIXhag"",
"id": "GCU3BvcnRz",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Sports"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/gRB8nQk5gRYsCtZYQAPUufs9ElM"",
"id": "GCVGVjaA",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Tech"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/NECk71Pm-g9olSeb8f65ze2ElOc"",
"id": "GCQ29va2luZyAmIEhlYWx0aA",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "Cooking & Health"
}
},
{
"kind": "youtube#guideCategory",
"etag": ""8jEFfXBrqiSrcF6Ee7MQuz8XuAM/AVwXb7tzi2-JuEetcsorNLk6tZg"",
"id": "GCTmV3cyAmIFBvbGl0aWNz",
"snippet": {
"channelId": "UCBR8-60-B28hp2BmDPdntcQ",
"title": "News & Politics"
}
}
]
}

@CodyGibson
Copy link

CodyGibson commented Nov 25, 2019

Too much information for me! Very interesting code and information, but I'm a student and not yet ready for it. I found a useful source in Google and I understand the basics of writing codes and more.

@lukelu520
Copy link

lukelu520 commented Jun 15, 2020

Is 26 - How-to & Style should be Howto & Style ? The dash "-" causes upload error.

@dynoChris
Copy link

Many thanks!

@samplethunkable
Copy link

anyone please provide how to use Autobot-clipper step by step Video Plsea

@sharukhkhanajm
Copy link

Hi, can anyone tell me how can I only fetch Programming and Tech related videos?
for now, if I use 28 then it will fetch all the videos in the category of 28.
but I only want to fetch the programming-related videos.

@Adinapunyo-Banerjee
Copy link

No one noticed? 23 and 34 are both Comedy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment