Genres and categories
The following sections describe the schemes for categorizing different types of assets:Movie genres
You must specify at least one genre for movie assets using the <genre> tag that is a subtag of <asset>. (You can specify more than one.) The movie genre also appears as the <movie_genre> on the associated video.
The genres listed below are valid for movies and trailers.
* Only valid in Japan.
† Also valid for Google Play Japan.
‡ Only valid in Australia.
You must specify at least one genre for sound recordings that are included in the AudioSwap program. You can also specify genres for music video assets. If you specify an invalid genre for an AudioSwap recording, YouTube uses the default genre Other instead of the invalid genre. Valid genres for AudioSwap are:
You must specify at least one genre for television show assets (you can specify more than one.) The genres listed below are valid for all TV show assets.
* Also valid for Google Play.
† Also valid for Google Play Japan.
Whereas the previous sections explained how to specify the genre of an asset, this section explains how to specify the category for a video. This value is specified in the <genre> tag that is a subtag of <video>.
The YouTube category document, which can be downloaded from http://gdata.youtube.com/schemas/2007/categories.cat, identifies the categories that you can use to classify web video content. The category document is an XML file that identifies the categories and indicates whether new videos can be assigned to each category. The document also identifies the countries where each category is browsable on YouTube.
The excerpt below shows the entries for the "Entertainment" and "Nonprofit & Activism" categories as they appear in the YouTube category document as of August 13, 2008. Please note that videos could be assigned to both categories. In addition, the document lists many countries where the "Entertainment" category is browsable but indicates that the "Nonprofit & Activism" category was only browsable in the United States at that time.
As shown in the example, the presence of the <yt:assignable> tag indicates that new videos may be assigned to that category. (New videos cannot be assigned to categories that are not marked as assignable using the <yt:assignable> tag.) In addition, the presence of the <yt:browsable> tag indicates that the corresponding category is browsable on YouTube in one or more countries. The <yt:browsable> tag's regions attribute contains a space-delimited list of two-letter region IDs that identify the particular countries where the category is browsable. Categories that are neither assignable or browsable are deprecated and are identified as such using the <yt:deprecated> tag.
<atom:category term='Entertainment' label='Entertainment' xml:lang='en-US'> <yt:browsable regions='AU BR CA FR DE GB NL HK IN IE IT JP MX NZ PL RU KR ES TW US'/> <yt:assignable/> </atom:category> <atom:category term='Nonprofit' label='Nonprofit & Activism' xml:lang='en-US'> <yt:assignable/> <yt:browsable regions='US'/> </atom:category> <atom:category term='Videoblog' label='Videoblogging' xml:lang='en-US'> <yt:deprecated/> </atom:category>
If you have retrieved the default category list, then you can set the <genre> tag's value to either the term or the label attribute value. For example, both of the following values are valid ways of identifying the same video genre:
Localized category lists for web videos
You can also retrieve localized category lists that specify category labels for classifying video content in particular languages. You can download these lists from http://gdata.youtube.com/schemas/2007/categories.cat?hl=<LANGUAGE>, where you replace the term LANGUAGE in the URL with the appropriate language value from the following list. (Instead of appending the hl parameter value to the schema URL, you can also set the Accept-Language HTTP request header to the appropriate language value.)
|Language/Locale||hl Parameter Value|
|English (Great Britain, Ireland, Australia and New Zealand)||en-GB|
|English (United States and Canada)
* default value
The XML excerpt below shows the entries for the "Entertainment" and "Nonprofit & Activism" categories as they appear in the YouTube category document for the French language as of May 5, 2008:
<atom:category term='Entertainment' label='Divertissement' xml:lang='fr-FR'> <yt:assignable/> <yt:browsable/> </atom:category> <atom:category term='Nonprofit' label='Associations et organismes' xml:lang='fr-FR'> <yt:assignable/> </atom:category>
Set the <genre> tag's value to the term attribute value for the category. Note that the only label attribute values that are valid values for the <genre> tag are those from the default category document (hl=en-US).