XML element definitions

30/11/2019
The YouTube XML format is being replaced by DDEX (music only) and CSV templates (all industries). YouTube strongly discourages any new implementations of the YouTube XML format. This page should be used solely as reference material for existing implementations. Visit Using the YouTube DDEX feed for more information about the new format.
The features described in this article are available only to partners who use YouTube's Content Manager to manage their copyrighted content.

This article defines each of the supported XML elements in the YouTube Content and Rights Administration feed. The elements are arranged into categories based on the types of objects they relate to:

XML Tag Definition Legend

Certain symbols may be displayed next to subtags in the definitions below. These symbols, and their meanings, are:

 

? = optional subtag
* = zero or more instances of the subtag
+ = one or more instances of the subtag

 

Top-level feed tag

feed
Definition Required. The <feed> tag is the root tag of a YouTube content feed.
Attributes
Name Format Description
xmlns Text Required. The xmlns attribute provides the URL for the schema used to interpret the XML tags. The schema for content feeds is "http://www.youtube.com/schemas/cms/2.0".
channel Text Optional. The channel attribute identifies the YouTube channel that will be associated with any videos or playlists uploaded in your feed. You can identify a channel by its channel name or its unique channel ID. The channel must already be linked to a content_owner you have permission to upload for (your account by default).

If you do not specify a channel, all videos, show assets, and season assets in your feed will be uploaded to the YouTube channel of the default YouTube user identified in the content_owner's YouTube account. (The channel attribute is required when the content_owner's account does not identify a default YouTube user.) You can override this default channel for an individual video by using the <channel> tag. You can’t override the default channel for show assets or season assets.
content_owner Text Optional. The content_owner attribute specifies the partner assigned as the owner for content in the feed. The content_owner must already be linked to your YouTube account (by your partner representative). If you do not specify a content_owner, the data in the feed is associated with the content owner who owns the specified channel; if you include both a channel and a content_owner, the content owner must own the channel.

The content_owner is also the partner whose assets and policies are used to validate object references in the content feed. For example, any references to saved rights policies must refer to policies in the YouTube account of the content_owner.
notification_email Text Optional. The notification_email attribute contains a list of one or more email addresses to which YouTube will send a report about an uploaded content feed. We recommend that you set up a mailing list to which YouTube will send notifications and then subscribe individuals who should receive notifications to that mailing list. Please use commas to separate email addresses.

If you specify a value for this attribute, that value will override the primary notification email addresses defined in your account's dropbox configuration.
strict Boolean. The default value is True. Optional. The strict attribute specifies how the YouTube feed parser should handle errors in the feed. The default value is True, which means that the parser will treat any error as a fatal error. The default setting increases the likelihood that your feed will not be processed at all if it contains errors, making it easier for you to fix the errors and resubmit the feed without having to do any other modifications.
Example <feed xmlns="http://www.youtube.com/schemas/cms/2.0" notification_email="people@example.com,otherpeople@example.com">
Subtags asset*, ownership*, file*, audioswap?, markup?, reference*, rights_admin*, rights_policy*, claim*, video*, caption*, content_rating*, ad_policy*, video_breaks*, playlist*, relationship*
Content Format Container

markup
Definition The tag associates a video markup file with a video. The required video and file attributes identify the video and the markup file respectively; the markup file needs to be in RDF-XML format.
Attributes
Name Format Description
video Text (XPath) Required. The video attribute specifies an XPath that identifies the video to mark up. The XPath can identify a video described in the local feed or another YouTube video (using its video ID).
file Text (XPath) Required. The file attribute specifies an XPath that identifies the file containing the video markup in RDF-XML format. The XPath can only refer to a element in the local feed.
Example
Subtag of feed
Content Format Empty

XML tags for assets and asset metadata

asset
Definition Optional. The <asset> tag encapsulates information about an asset. See Creating assets for details.
Attributes
Name Format Description
type Text Required. The type attribute specifies the type of asset that the metadata describes. Valid values for this attribute are:
composition
episode
movie
music_video
season
show
sound_recording
trailer
web
id Text Required for updating or deleting an asset. Omitted for creating an asset. The id attribute contains a value that YouTube uses to uniquely identify an asset. See Updating assets for details.
path Text (XPath) Optional. In a feed that updates an asset's metadata, the path attribute lets you use an XPath to identify the asset that is being updated by the asset's custom ID and asset type. See Updating assets for an example.
recoupable Boolean Optional. The recoupable attribute indicates whether revenue associated with the asset should be used to recoup an advance from YouTube. If you set the value to true, ad revenue on all videos that are claimed as matches of the asset will be used to recoup your advance. The default value is false.

If you set the attribute to true, you must claim a video that you've uploaded to a channel that is configured for recoupment. See Recoupment for details.
tag Text Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.
Example <asset>
Subtags actor*, album*, artist*, artwork*, asset_label*, broadcaster*, content_type?, custom_id, description?, director*, eidr?, episode?, genre*, grid?, hfa?, isan?, isrc?, iswc?, keyword*, notes?, original_release_date?, original_release_medium?, producer*, rating*, label?, recoupment_type?, season?, season_name?, shows_and_movies_programming?, show_title?, spoken_language?, start_year?, subtitled_language*, title, tms_id?, total_episodes_expected?, track_length?, upc?, url?, writer*
Subtag of feed
Content Format Complex

actor
Definition Optional for episode and movie assets. Not used for other asset types. The <actor> tag identifies an actor or actress associated with a video. A feed can specify up to 50 actors for a video.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <actor>Tomas Cruz</actor>
Subtag of asset
Content Format Text

album
Definition Optional for sound recording assets. Not used for other asset types. The <album> tag identifies the album on which a sound recording appears. This field has a maximum length of 255 bytes.
Example <album>All the pain money can buy</album>
Subtag of asset
Content Format Text

artist
Definition Required for sound recordings included in the AudioSwap program. Optional for music videos and sound recordings not included in AudioSwap. Not used for other asset types. The <artist> tag identifies the artist associated with a music video or sound recording. This field has a maximum length of 255 bytes.
Example <artist>The Arcade Fire</artist>
Subtag of asset
Content Format Text

artwork
Definition Optional for show assets. Not used for other asset types. The <artwork> tag identifies an image to associate with the asset. Images should bleed all the way to their edges and should not have any borders or padding. Images are used to represent and promote your assets across the YouTube site in spotlights, browse pages, search results, and elsewhere. You can overlay your logo on your images to brand your content.
Attributes
Name Format Description
type Text Required. The type attribute specifies the type of artwork that you are associating with an asset. Valid attribute values are:
  • show_square – A square image that is at least 600px by 600px, associated with a show asset
  • show_widescreen – A 16:9 image that is at least 1000px by 562px, associated with a show asset
path Text (XPath) Required. The path attribute specifies an XPath that identifies the file containing the actual image.
Example <artwork type="show_square" path="/feed/file[@tag='show_square']"/>
Subtag of asset
Content Format Empty
 
asset_label
Definition The <asset_label> tag contains a label to apply to the asset. You can apply a label to multiple assets to group them. You can use the labels as search filters to perform bulk updates or download reports, or to filter YouTube Analytics.

Labels may contain spaces, meaning an individual label can be more than one word long. For example, you could specify "surfing stunts" as a single label or as two separate labels ("surfing" and "stunts"). Prohibited characters are angled brackets, commas, colons, and vertical pipe characters (|).

You can create multiple labels with multiple <asset_label> tags or with a comma-separated list of labels within one <asset_label> tag. Each label must be at least two characters long and may not be longer than 30 characters. Each content owner can add up to 30 labels for an asset; the maximum total length for all labels for a given asset is 500 characters.

If an asset has existing labels, any new labels you provide are appended. No existing labels are removed.
Subtag of asset
Content Format Text

broadcaster
Definition Optional for show and season assets. Not used for other asset types. The <broadcaster> tag identifies the network or channel that originally broadcast a show or a season of a show. You should include this field only if you (the content owner) are not the broadcaster. A show may have multiple broadcasters; for example, a show may switch networks between seasons.
Example <broadcaster>ABC</broadcaster>
Subtag of asset
Content Format Text

content_type
Definition Required for episodes and movies. Not used for other asset types. The <content_type> tag identifies the type of movie or content that the asset represents. Valid values for this field are either Full Episode or Clip for episodes and either Feature Film or Short for movies.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <content_type>Full Episode</content_type>
Subtag of asset
Content Format Text. Valid values are Full Episode, Clip, Feature Film and Short.

custom_id
Definition Required for shows and optional for all other types of assets. The <custom_id> tag contains a unique value that you use to identify an asset. For example the custom_id tag value could be a unique ID that you created for the asset or a standard identifier, such as an ISRC (International Standard Recording Code) or a TMS (Tribune Media Systems) ID. This field has a maximum length of 64 bytes and may contain alphanumeric characters, hyphens (-), underscores (_), periods (.), arrobas (@), or forward slashes (/).
Example <custom_id>ABCde12345</custom_id>
Subtag of asset
Content Format Text

description
Definition Required for movie, trailer, show, and episode assets. Optional for other video assets.

The <description> tag provides a brief description of the asset. The description will be displayed on YouTube's website. This field has a maximum length of 5,000 bytes.
Example <description>Jill's dog Pepe follows her to school and hilarious hijinks ensue.</description>
Subtag of asset
Content Format Text

director
Definition Optional for episode and movie assets. Not used for other asset types. The <director> tag identifies a director associated with a video or collection of videos. A feed can specify up to 50 directors for a video.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <director>Marty Ryan</director>
Subtag of asset
Content Format Text

eidr
Definition Optional for episode and movie assets. Not used for other asset types. The <eidr> tag specifies the Entertainment Identifier Registry (EIDR) assigned to a movie or episode. The value contains a standard prefix for EIDR registry, followed by a forward slash, a 20-character hexadecimal string, and an alphanumeric (0-9A-Z) check character.
Example <eidr>10.5240/0000AAAA9999FFFF1234C</eidr>
Subtag of asset
Content Format Text.

episode
Definition Required for episode assets that are linked to a show. Not used for other asset types. The <episode> tag specifies the episode number associated with an episode of a show. This field has a maximum length of 5 bytes.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <episode>14</episode>
Subtag of asset
Content Format Text

genre
Definition Required for show and movie assets, and for sound recordings included in the AudioSwap program. Optional for other assets. The <genre> tag specifies a genre that can be used to categorize an asset. Assets may be categorized in more than one genre.

YouTube uses different sets of genres to categorize different types of assets.
Example <genre>Comedy</genre>
Subtag of asset
Content Format Text

grid
Definition Optional for music video and sound recording assets. Not used for other asset types. The <grid> tag specifies the Global Release Identifier (GRid) of a music video or sound recording. This field's value must contain exactly 18 alphanumeric characters.
Example <grid>000abc123XYZ456jkf</grid>
Subtag of asset
Content Format Text. Value must contain exactly 18 alphanumeric characters.

hfa
Definition Optional for composition assets. Not used for other asset types The <hfa> tag specifies a six-character code that the Harry Fox Agency (HFA) issued to uniquely identify a composition.
Example <hfa>G1497T</hfa>
Subtag of asset
Content Format Text. The value contains six alphanumeric characters.

isan
Definition Optional for episode and movie assets. Not used for other asset types. The <isan> tag specifies the International Standard Audiovisual Number (ISAN) assigned to a particular video. The value contains 26 characters, which includes the 24 hexadecimal characters of the ISAN as well as two check characters, in the following format:
  • The first 16 characters in the tag value contain hexadecimal characters specifying the 'root' and 'episode' components of the ISAN.
  • The seventeenth character is a check character (a lettter from A-Z).
  • Characters 18 to 25 are the remaining eight characters of the ISAN, which specify the 'version' component of the ISAN.
  • The twenty-sixth character is another check character (A-Z).
Example <isan>00000000D07A0090Q00000000X</isan>
Subtag of asset
Content Format Text.

isrc
Definition Optional for music video and sound recording assets. Not used for other asset types. The <isrc> tag specifies the International Standard Recording Code (ISRC) of a music video or sound recording. This field's value must contain exactly 12 alphanumeric characters.
Example <isrc>00abc123XYZ</isrc>
Subtag of asset
Content Format Text. Value must contain exactly 12 alphanumeric characters.

iswc
Definition Optional for composition, sound recording, and music video assets. Not used for other asset types The <iswc> tag specifies the unique International Standard Musical Work Code (ISWC) identifier of a composition. The field's value must contain exactly 11 characters in the format of a letter (T) followed by 10 digits.
Example <iswc>T3452468001</iswc>
Subtag of asset
Content Format Text

keyword
Definition Required for show assets. Not used for other types of assets. The <keyword> tag contains a keyword associated with an asset. You can specify up to 100 keywords for an asset.
Subtag of asset
Content Format Text

notes
Definition Optional. The <notes> tag enables you to store additional information that does not map directly to one of the other elements in the feed. This field has a maximum length of 255 bytes.
Example <notes>Some miscellaneous notes here.</notes>
Subtag of asset
Content Format Text

original_release_date
Definition Required for trailer, episode, and movie assets. Optional for music videos and sound recordings. Not used for web assets or compositions. The <original_release_date> tag specifies the date that an asset was publicly released. For season assets, this tag specifies the first date that the season aired. Dates prior to the year 1902 are not supported.
Example <original_release_date>2007-08-28</original_release_date>
Subtag of asset
Content Format Date (YYYY-MM-DD)

original_release_medium
Definition Required for movie, trailer, and episode assets. Not used for other asset types. The <original_release_medium> tag indicates how people first had the opportunity to see a video asset. The following values are valid:
  • Basic TV – shown on basic cable or satellite television channel, such as MTV or Comedy Central.
  • Premium TV – shown on premium cable or premium satellite channel, including subscription channels such as HBO or ShowTime.
  • Terrestrial TV – shown on broadcast network or local station
  • Film – theatrical or festival release
  • Promotional – promotional clips and trailers
  • Web – original webisode content
  • Direct-to-Video – video-on-demand, DVD, or other medium where the video would be available for purchase or rental


When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <original_release_medium>Basic TV</original_release_medium>
Subtag of asset
Content Format Text

producer
Definition Optional for episode and movie assets. Not used for other asset types. The <producer> tag specifies the name of a producer for a video. A feed can specify up to 50 producers for a video.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <producer>Sally DiProfio</producer>
Subtag of asset
Content Format Text

rating
Definition Required for movie, trailer, and episode assets. Not supported for any other asset type. The <rating> tag specifies a rating that the video received. If a movie or episode has more than one rating, use one <rating> tag to specify each rating. The rating must be a valid rating given under the associated rating system.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video. See Update video metadata for more information.
Attributes
NameFormatDescription
system Text Required. The system attribute identifies the rating system used to classify the video. The valid ratings for film and television shows vary depending on the country. YouTube accepts the names from the System column from the MovieLabs Common Metadata specification; see Ratings for details.
Example <rating system="mpaa">PG</rating>
Subtag of asset
Content Format Text
 
label
Definition Optional for sound recording assets. Not used for other asset types. The <label> tag identifies the record label that released a sound recording. This field has a maximum length of 255 bytes.
Example <label>Happy Day Records</label>
Subtag of asset
Content Format Text

recoupment_type
Definition Required if the <asset> tag's recoupment attribute is set to True. The <recoupment_type> tag indicates whether an asset is original content created for your YouTube channel or older content from your library or archives. Valid tag values are:
  • LIBRARY – The content is from your library or archive.
  • ORIGINAL – The content is original content created for your YouTube channel.
  • UNKNOWN – You are unable to determine whether the content is library content or original content.
See Recoupment for details.
Example <recoupment_type>LIBRARY</recoupment_type>
Subtag of asset
Content Format Text.Valid values are LIBRARY, ORIGINAL, and UNKNOWN.

season
Definition Required for season and episode assets that are linked to a show. Not used for other types of assets. The <season> tag specifies the season number associated with a TV show. This field has a maximum length of 5 bytes.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <season>2</season>
Subtag of asset
Content Format Text

season_name
Definition Optional for season assets. Not used for other asset types. The <season_name> tag specifies the name of a season associated with a TV show. The name must be unique among the seasons of the show. This field has a maximum length of 60 bytes.
Example <season_name>I Love Lucy - Season 2</season_name>
Subtag of asset
Content Format Text

show_custom_id
Definition Required for season and episode assets. Not used for other asset types. The <show_custom_id> tag specifies the custom ID of the show that a season or episode asset is associated with. This field has a maximum length of 64 bytes and may contain alphanumeric characters, hyphens (-), underscores (_), periods (.), or forward slashes (/).

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <show_custom_id>BC-DX1</show_custom_id>
Subtag of asset
Content Format Text

show_title
Definition Optional for episode assets. Not used for other asset types of assets.

The <show_title> tag specifies the name of the show that an episode asset is associated with. This tag allows episodes that are not explicitly linked to show assets (using the <show_custom_id> tag) to still display a show title in its asset metadata. This field has a maximum length of 120 bytes.
Example <show_title>I Love Lucy</show_title>
Subtag of asset
Content Format Text

shows_and_movies_programming
Definition Required with a value of True for movies, trailers, and episodes. Not used for other asset types.

The <shows_and_movies_programming> tag indicates whether the video for an asset should appear in the Shows or Movies category on YouTube.com. The default value for this tag is False, which indicates that the video for the asset will not appear in one of those categories.

Shows and Movies videos must pass additional validation. See Expected metadata fields by asset type for more information about these requirements.
 
Example <shows_and_movies_programming>True</shows_and_movies_programming>
Subtag of asset
Content Format Boolean

spoken_language
Definition Required for movie and show assets. Optional for episode assets. Not used for other asset types. The <spoken_language> tag specifies the video's primary spoken language. The tag value can be any ISO 639-1 two-letter language code.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <spoken_language>en</spoken_language>
Subtag of asset
Content Format Text

start_year
Definition Required for show assets. Not used for other asset types. The <start_year> tag specifies the first year that a television show aired.
Example <start_year>1971</start_year>
Subtag of asset
Content Format Integer

subtitled_language
Definition Optional for episode and movie assets. Not used for other asset types. The <subtitled_language> tag specifies a language for which the video has either a separate caption track or burnt-in captions that are part of the video. The tag value can be any ISO 639-1 two-letter language code, and your feed should contain one <subtitled_language> tag for each language for which captions are available.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <subtitled_language>ja</subtitled_language>
Subtag of asset
Content Format Text

title
Definition Required for show assets, trailer assets, episode assets that are linked to a show, movie assets, and sound recordings included in the AudioSwap program. Optional for all other asset types.

The <title> tag specifies the title or name of the asset. This field has a maximum length of 255 bytes for music videos, sound recordings, and compositions. It has a maximum length of 120 bytes for all other types of assets.
Example <title>The Junior Mint</title>
Subtag of asset
Content Format Text

tms_id
Definition Optional for episodes and movies. Not used for other asset types. The <tms_id> tag contains a 12- to 14-character Tribune Media Systems (TMS) ID value that uniquely identifies a movie or television program.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <tms_id>00123abc123abc</tms_id>
Subtag of asset
Content Format Text. Value must contain exactly 14 characters.

total_episodes_expected
Definition Optional for season assets. Not used for other asset types. The <total_episodes_expected> tag specifies the total number of full-length episodes in the season.
Example <total_episodes_expected>22</total_episodes_expected>
Subtag of asset
Content Format Integer

track_length
Definition Optional for sound recording assets. Not used for other asset types. The track_length tag specifies the length of the sound recording in seconds.
Example <track_length>187</track_length>
Subtag of asset
Content Format Integer

upc
Definition Optional. The <upc> tag specifies the Universal Product Code (UPC) associated with an asset.
Example <upc>000abc123XYZ</upc>
Subtag of asset
Content Format Text.

url
Definition Optional. The <url> tag specifies an official URL associated with an asset. This field has a maximum length of 1536 bytes. This value is not currently displayed to YouTube users.
Example <url>http://goodshow.example.com</url>
Subtag of asset
Content Format Text

writer
Definition The <writer> tag specifies the name of a writer for an asset. A feed can specify up to 50 writers for an asset.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <writer>Leonard Kelley</writer>
Subtag of asset
Content Format Text

XML tags for ownership data

ownership
Definition Optional. The <ownership> tag contains ownership data for a group of one or more assets. See Declare ownership of an asset for details.
Attributes
Name Format Description
asset Text (XPath) Optional. The asset attribute specifies an XPath that identifies the asset(s) to associate with the ownership information contained in this tag. If you include the asset attribute to associate ownership data with one or more assets, you do not need to also define a relationship that associates the assets and ownership data
tag Text

Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.

Example <ownership>
Subtags owner+
Subtag of feed
Content Format Container

owner
Definition Required. The <owner> tag contains information about the owner of a group of one or more assets. It also contains other ownership data, such as the percentage of the assets that the owner controls and the territories where the owner controls the asset.

For compositions, the lyric, mechanical, performance, and sync attributes identify the owner's publishing rights. As such, you can specify the publishing rights that each owner actually owns.

See Declaring ownership of an asset for more information.
Attributes
Name Format Description
type Text. Valid values are partner and publisher. Optional. The type attribute identifies the type of owner described within the ownership block. The default value for this attribute is partner. The attribute value publisher is only valid if the associated asset is a composition owned by a third-party publisher; see Declare ownership of an asset for more information.
name Text Optional. The name attribute specifies the name of the asset owner. If the owner type is partner, the attribute value must be a YouTube partner name that identifies the owner. This constraint does not apply if the owner type is publisher. The maximum length is 128 bytes.
cae_number Integer. Value must contain exactly 9 digits. Optional for composition assets. Not used for other asset types. The cae_number attribute specifies the unique CAE number for a publisher.
ipi_number Integer. Value must contain exactly 11 digits. Optional for composition assets. Not used for other asset types. The ipi_number attribute specifies the unique IPI number for a publisher.
lyric Boolean Optional for composition assets. Not used for other asset types. The lyric attribute indicates whether the owner owns rights to display lyrics for a composition. The default value is false.
mechanical Boolean Optional for composition assets. Not used for other asset types. The mechanical attribute indicates whether the owner owns mechanical rights for a composition. The default value is false.
performance Boolean Optional for composition assets. Not used for other asset types. The performance attribute indicates whether the owner owns performance rights for a composition. The default value is false.
sync Boolean Optional for composition assets. Not used for other asset types. The sync attribute indicates whether the owner owns sync rights for a composition. By default, YouTube will assume that you have sync rights for a composition if the <owner> tag does not specify a value for at least one of the mechanical, performance, or sync attributes.
Subtags rule*
Subtag of ownership
Content Format Container

rule
Definition The <rule> tag contains information about the territories where an owner controls a group of one or more assets as well as the percentage of those assets that the owner controls.
Attributes
Name Format Description
percentage Decimal Optional. The percentage attribute specifies the percentage of an asset (or group of assets) that an owner controls. The only valid values for assets other than compositions are 100, which indicates that the owner completely owns the asset in the specified territories, and 0, which indicates that you are removing ownership of the asset in all territories. For composition assets, which support partial ownership within a territory, the attribute value can be any decimal value between 0 and 100 inclusive.

If a composition has multiple owners in a given territory, the total ownership percentage for all owners in that territory cannot exceed 100 percent. For example, if an asset has two owners in Canada, each owner can own 50 percent of the asset in Canada, but each owner cannot own 75 percent of the asset in Canada. Your feed will generate a validation error if total ownership percentages exceed 100 percent.
Subtags condition*
Subtag of owner
Content Format Container

condition
Definition The <condition> tag identifies the territories where an owner does (or does not) own an asset. The tag's value is a space-delimited list of ISO 3166 two-letter country codes. (Please note that the country code for the United Kingdom is GB and not UK.)
Attributes
Name Format Description
restriction Text. Valid values are include and exclude. Required. The restriction attribute indicates whether the associated rule should or should not be applied in the specified territories. If this attribute's value is include, the associated rule will be applied in the specified territories. If its value is exclude, the associated rule will be applied everywhere except in the specified territories. If the attribute's value is exclude and the <condition> element does not specify any terrtiories, the rule will be applied worldwide.
type Text Required. The type attribute identifies the type of condition that is being placed on the ownership data. The only valid value for this tag is territory.
Subtag of rule
Content Format Complex

XML tags for reference content

file
Definition Required. The encapsulates data about a reference file.
Attributes
Name Format Description
type Text. Optional. The type attribute identifies the type of file that you are providing. You can specify the MIME type of the file or one of the following values:
  • video
  • image
  • timed_text (if the file is a caption track or a transcript)
  • x-gfp (if the file is a fingerprint generated using YouTube's gfp_gen software)
If you do not specify a type, YouTube will guess the file type based on the filename extension or other file properties.
fingerprint Text. Valid values are audio and video. Required if the file is a fingerprint. (You need to specify a value for this attribute if the value of the type attribute is x-gfp.) This tag indicates whether the fingerprint is for an audio file or a video file.
tag Text Optional. The tag attribute contains a value that identifies an asset, file, ownership data set, rights administrator, rights policy, video, ad policy, set of video breaks, claim, or playlist. You can use the tag value to identify an item (or related item) in a relationship. (Several other tags, such as the tag, also use XPaths in their tag or attribute values.)

Note that any two items of the same type should not have the same tag value. For example, you should not use the same tag for more than one asset or the same tag for more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file. If you also want to create a YouTube video for each reference file, you could also use the same value to tag the video information. This approach may make it easy to create relationships that associate those items. This particular example is illustrated in the Using XPath to identify items in relationships section.
Subtags filename?, description?
Subtag of feed

filename
Definition Required. The tag specifies the location of a file relative to the location of the XML feed within your SFTP dropbox account. For example, suppose you create a directory named uploads under the root directory of your dropbox account. You place your XML feed, which contains information about a single video, in that directory along with a digital copy of the asset and a thumbnail image for the asset.
uploads/feed.xml
uploads/video.mpg
uploads/thumb.jpg

In this example, the tag's value will be video.mpg. However, if the same file is placed in the files subdirectory (uploads/files/video.mpg), then the tag value will be files/video.mpg.
Subtag of file
Content Format Text

description
Definition Optional. The tag contains a description of a reference file.
Subtag of file
Content Format Text

reference
Definition A element identifies a reference that has already been created for an asset. The reference file could either be the original audio, video, or audiovisual content for the asset or a fingerprint of that content that was generated using YouTube's gfp_gen software.

Note: You create a reference by associating a element with an element, but you update the reference by using the element.

If your feed defines a relationship associating an asset with a file, then YouTube will use the file to create a reference for the asset and will return a reference ID in the status report that details the actions taken while processing the feed. You can then use the reference ID to delete, deactivate, or reactivate the reference.
Attributes
Name Format Description
id Text Required. The id attribute identifies the reference file that you are deleting, deactivating, or reactivating. The reference ID for a reference will be returned in the status report that YouTube posts after processing the feed that creates the reference.
action Text. Valid values are write and delete. Optional. The action attribute indicates whether you are updating or deleting a reference file. The default attribute value is write, which indicates that you are deactivating or reactivating the reference.
active Boolean Optional. The active attribute indicates whether a reference should be deactivated or reactivated. Omit this attribute if you are deleting a reference.
  • Set the attribute value to False to deactivate a reference.
  • Set the attribute value to True to reactivate a reference.
release_claims Boolean Optional. The release_claims attribute indicates whether YouTube should release claims that were automatically generated when uploaded videos matched a reference. You would likely set this attribute to True when deleting or deactivating a reference. The default attribute value is False.
Example Delete a reference:


Deactivate a reference:


Reactivate a reference:
Subtag of feed
Content Format Complex

reference_exclusions
Definition Optional. The <reference_exclusions> tag specifies one or more time intervals in a reference that YouTube should exclude when determining Content ID matches, usually because the intervals contain non-exclusive content. The <interval> subtag specifies the time stamps for the beginning and end of an excluded interval.

You associate the <reference_exclusions> with a reference using a relationship. See Exclude reference content from match consideration for more information.
Example
Subtags interval*
Subtag of feed
Content Format Container

interval
Definition Optional. The tag specifies a time interval to exclude from a reference when determining Content ID matches. If a reference includes multiple excluded time intervals, the intervals must not overlap.
Attributes
Name Format Description
start Time Required. The start attribute identifies the start time of the content to be excluded from matching, specified as the number of seconds after the start of the video or as the time, specified in HH:MM:SS format.
end Time Required. The end attribute identifies the end time of the content to be excluded from matching, specified as the number of seconds after the start of the video or as the time, specified in HH:MM:SS format. The end time must come after the start time.
Example
Subtag of reference_exclusions
Content Format Complex

XML tags for AudioSwap

audioswap
Definition Optional. The <audioswap> tag indicates that an associated sound recording asset should be included in YouTube's AudioSwap program.
Example <audioswap>
Subtag of feed
Content Format Empty

XML tags for rights designations

rights_admin
Definition Required. The <rights_admin> tag is required to set a policy for an asset. It indicates whether the policy will apply to partner-uploaded videos or user-uploaded videos that match those partner videos. See Defining rights administration for details.
Attributes
Name Format Description
type Text. Valid values are usage and match. Required. The type attribute indicates whether the administrator controls the partner-uploaded asset or user-uploaded videos that match that asset.
  • If the attribute value is usage, then the administrator controls a partner-uploaded asset, which includes any YouTube videos created directly from the reference file(s) for that asset. This value essentially means that the administrator controls the usage policy for the asset.
  • If the attribute value is match, then the administrator controls user-uploaded videos that match the asset. This value essentially means that the administrator controls the match policy for the asset.
owner Boolean Optional. The owner attribute indicates whether the rules that define who administers a claim mirror the rules that define who owns that claim. The default value of this attribute is true, which indicates that the owner is also the administrator.
asset Text (XPath) Optional. The asset attribute specifies an XPath that identifies the asset(s) to associate with the administrator information contained in this tag. If you include the asset attribute to associate administrator data with one or more assets, you do not need to also define a relationship that associates the assets and administrator data.
tag Text Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.
Example <rights_admin owner="true" type="match">
Subtags rule?
Subtag of feed
Content Format Complex

rule
Definition Optional. The <rule> tag contains information about the territories where an administrator controls a group of one or more assets as well as the percentage of those assets that the administrator controls.
Subtags condition
Subtag of rights_admin
Content Format Complex

condition
Definition Required. The <condition> tag identifies the territories where an administrator does (or does not) control an asset. The tag's value is a space-delimited list of ISO 3166 two-letter country codes. (Please note that the country code for the United Kingdom is GB and not UK.)
Attributes
Name Format Description
restriction Text. Valid values are include and exclude. Required. The restriction attribute indicates whether the associated rule should or should not be applied in the specified territories. If this attribute's value is include, the associated rule will be applied in the specified territories. If its value is exclude, the associated rule will be applied everywhere except in the specified territories. If the attribute's value is exclude and the <condition> element does not specify any territories, the rule will be applied worldwide.
type Text Required. The type attribute identifies the type of condition that is being placed on the administrator data. The only valid value for this tag is territory.
Subtag of rule
Content Format Complex

rights_policy
Definition Required. The <rights_policy> tag contains rules that explain how a rights holder administers an asset. Rules determine how YouTube handles a piece of copyrighted content by specifying whether and how a rights owner wants its content to be available on YouTube. See Defining rights policies for details.

If you specify an empty <rights_policy> tag, YouTube uses your default rights policy.
Attributes
Name Format Description
tag Text Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.
update_all_claims Boolean Optional. The update_all_claims attribute indicates whether a match policy should be applied to an asset's existing manual claims. Set the attribute value to True to indicate that the policy should be applied to existing manual claims. The attribute's default value is False, which means that the match policy will be applied to new claims and to existing claims that YouTube's Content ID system automatically generated but will not be applied to existing manual claims.
Example <rights_policy>
Subtags name?, rule*
Subtag of feed
Content Format Container

name
Definition Optional. The <name> tag specifies the name of a rights policy.
  • If you specify a policy name, and a policy with that name already exists for your content owner, YouTube will apply that policy.
  • If you specify a policy name, and a policy with that name does not already exist for your content owner, the name will be applied to the one-off policy you define here; you can use the name elsewhere in the feed to refer to the policy, but no saved policy is created.
Subtag of rights_policy
Content Format Text

rule
Definition Optional. The <rule> tag contains information about the policy that YouTube should enforce for a specific set of match conditions or watch conditions. This element is optional since you can use the <rights_policy> tag's id attribute or the <name> tag to identify a saved policy.

If a rule does not specify any conditions, then the rule will always be applied. For example, the XML excerpt below specifies a "monetize everywhere" policy:
<rights_policy>
  <name>Monetize everywhere</name>
  <rule action="monetize"/>
</rights_policy>
Attributes
Name Format Description
action Text. Valid values are block, track and monetize. Required. The action attribute identifies the policy that YouTube should enforce if the conditions specified in the rule are valid for an asset or an attempt to view that asset on YouTube.
subaction Text Optional. The subaction attribute specifies an additional action that YouTube should take if the conditions specified in the rule are met. The only valid attribute value is review, which indicates that the claims will be routed to a manual review queue that you can manage in CMS.
Subtags condition*
Subtag of rights_policy

condition
Definition Optional. The <condition> tag specifies a match condition or a watch condition that YouTube will use to determine whether to enforce the policy specified in the rule. The format of the tag value depends on the value of the type attribute as defined below.

Note: If a rule does not specify any conditions, then the rule will always be applied. See the definition of the <rule> tag for an example.
Attributes
Name Format Description
restriction Text Required. The restriction attribute specifies a parameter that indicates when the condition applies to the rule. Valid values for this attribute vary depending on the value of the type attribute as defined below.
type Text Required. The type attribute specifies the parameter value associated with the value of the restriction attribute. The list below identifies the valid values for this attribute. For each value, the list also identifies the accepted values of the restriction attribute and the appropriate format for the <condition> tag's value.
  • match_type – This value indicates that the condition is a match condition that specifies whether the user- or partner-uploaded content needs to match the audio, video or audiovisual content of a reference file for the rule to apply. For this type of condition, valid values for the restriction parameter are include and exclude. Valid values for the <condition> tag are audio and video.

  • match_percent – This value indicates that the condition is a match condition that specifies the percentage of the user- or partner-uploaded content that needs to match a reference file for the rule to apply. For this type of condition, valid values for the restriction parameter are less_than, greater_than, less_equal, and greater_equal, effectively enabling you to specify a range of values. The value of the <condition> tag must be a number between 0 and 100.

    Note that this type of condition sounds very similar to the reference_percent type explained below. As an example, suppose you upload a reference file that is a 20 minutes long. One user uploads a two-minute video that exactly matches a two-minute segment of the reference file. A second user uploads a 20-minute video that contains the same two-minute excerpt of the reference file, perhaps with another 18 minutes of commentary about the reference. In both cases, the reference percentage is
    the same (10%). However, in the first case, the match percent is 100% and in the second, the match percent is 10%.

  • match_duration – This value indicates that the condition is a match condition that specifies the amount of time that the user- or partner- uploaded content needs to match a reference file for the rule to apply. For this type of condition, valid values for the restriction parameter are less_than, greater_than, less_equal, and greater_equal, effectively enabling you to specify a range of values. The value of the <condition> tag should be a positive number that specifies the length, in seconds, of the match.

    Note that this type of condition sounds very similar to the reference_duration type explained below. As an example, suppose a user uploads a video that contains a one-minute clip from your reference file, but the same clip is repeated three times. In this case, the match_duration is three minutes because that is the amount of the user-uploaded video that matches the reference file. However, the reference_duration is only one minute.

  • reference_percent – This value indicates that the condition is a match condition that specifies the percentage of the reference that the user- or partner-uploaded content needs to match for the rule to apply. See the match_percent type described above for an example that illustrates this value. For this type of condition, valid values for the restriction parameter are less_than, greater_than, less_equal, and greater_equal, effectively enabling you to specify a range of values. The value of the <condition> tag must be a number between 0 and 100.

  • reference_duration – This value indicates that the condition is a match condition that specifies the amount of the reference video, specified as a length of time rather than as a percentage, that the user- or partner- uploaded content needs to match for the rule to apply. See the match_duration type described above for an example that illustrates this value. For this type of condition, valid values for the restriction parameter are less_than, greater_than, less_equal, and greater_equal, effectively enabling you to specify a range of values. The value of the <condition> tag should be a positive number that specifies the length, in seconds, of the match.

  • territory – This value indicates that the condition is a watch condition that specifies the territories where users are (or are not) allowed to watch (or listen to) an asset. For this type of condition, valid values for the restriction parameter are include and exclude. The <condition> tag's value is a space-delimited list of ISO 3166 two-letter country codes. (Please note that the country code for the United Kingdom is GB and not UK.)

Subtag of rule
Content Format Complex

XML tags for videos

video
Definition The <video> tag encapsulates information about a YouTube video that you want to create, update, or delete.
Attributes
Name Format Description
id Text Optional. The id attribute contains a value that YouTube assigns to uniquely identify your video on YouTube's website. You need to provide a value for this attribute if you are updating an existing YouTube video. When you create a new video, the video's Video ID will be identified in the status report that YouTube posts to confirm that actions that YouTube took upon processing your feed. We recommend that you store this value in your database to simplify efforts to programmatically update information about your videos.
file Text (XPath) Optional. The file attribute specifies an XPath that identifies the file that contains the actual video content. The XPath can only refer to a <file> element in the local feed.

If you use the file attribute to identify the file that contains the video content for a video, you do not also need to define a relationship associating the file and the video.
type Text Required when creating new episode, movie, and trailer videos. Optional when updating episode, movie, and trailer videos. Not used for other video types. The type attribute identifies the video as a TV episode, movie, or trailer. Valid values are episode, movie or trailer. The set of metadata fields available for the video differs depending on the type; see Expected metadata fields for specific asset types.
tag Text Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.
Example <video id="VIDEO-ID"/>
Subtags actor*, allow_comment_rating?, allow_comments?, allow_embedding?, allow_ratings?, allow_syndication?, artwork?, channel?, content_type?, description, director*, (domain_blacklist|domain_whitelist)?, end_time?, episode?, game_title?, genre*, hide_statistics?, hide_view_count?, keyword+, movie_genre*, notify_subscribers?, notes?, original_release_medium?, partner_reporting_id?, producer*, public?, rating*, recorded?, require_paid_subscription_to_view?, secure_streaming?, show_custom_id?, spoken_language?, subtitled_language*, start_time?, title, tms_id?, url?, writer*
Subtag of feed
Content Format Container

secure_streaming
Definition Optional. The <secure_streaming> tag indicates whether the video needs to be encrypted during the streaming process. To encrypt a video during the streaming process, set the <secure_streaming> tag value to True for that video.

The default value for this tag is False.
Example <secure_streaming>True</secure_streaming>
Subtag of video
Content Format Boolean

actor
Definition Optional for episode and movie videos. Not used for other video types. The <actor> tag identifies an actor or actress associated with a video. A feed can specify up to 50 actors for a video.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <actor>Tomas Cruz</actor>
Subtag of video
Content Format Text

allow_comment_rating
Definition Optional. The <allow_comment_rating> tag indicates whether YouTube users can rate the comments of a particular video. Valid values for this field are true and false. The default value for this field is true, which indicates that users can rate a video's comments.
Subtag of video
Content Format Boolean

allow_comments
Definition Optional. The <allow_comments> tag indicates whether YouTube will allow viewers to post comments about a video. The following list identifies valid values for this tag:
  • Always* - Anyone may post comments that will be visible to other YouTube users.
  • Approve - Anyone may post comments about a video, but the content partner will use an approval process to determine which comments will be displayed to other YouTube users.
  • Never - Users are not allowed to post comments about the video.
* Note: YouTube's default policy is to allow all users to post comments about a video.
Subtag of video
Content Format Text

allow_embedding
Definition Optional. The <allow_embedding> tag indicates whether other YouTube users can include a particular video on their own web pages. Valid values for this field are True and False. The default value for this tag is True, which indicates that other users may embed the video on their own web pages.
Subtag of video
Content Format Text

allow_ratings
Definition Optional. The <allow_ratings> tag indicates whether other YouTube users can rate a particular video. Valid values for this field are True and False. The default value for this field is True, which indicates that users can rate the video.
Subtag of video
Content Format Boolean

allow_syndication
Definition Optional. The <allow_syndication> tag specifies how YouTube can distribute a video on distribution channels other than YouTube's website. Valid values for this field are True and False, and the default value is True. Note that the behavior associated with these values will change on July 11, 2012.
  • A value of True indicates that YouTube can distribute a video on any platform, including distribution channels other than YouTube's website or other websites that show YouTube videos. Such distribution channels might include mobile channels, IPTV, video on demand (VOD) and consumer devices.
  • Prior to July 11, 2012, a value of False indicates that YouTube cannot distribute a video on channels other than YouTube's website or other websites that show YouTube videos.
  • After July 11, 2012, a value of False indicates that YouTube can only distribute a video on platforms that enable content monetization.
Subtag of video
Content Format Text

artwork
Definition Optional. The <artwork> tag identifies an image that should be associated with a video.
Attributes
Name Format Description
type Text Required. The type attribute identifies the type of image that you are associating with a video. The following list identifies valid values for this attribute. Note that while movie_poster image is marked as required, you can, in fact, upload videos for movies without providing this image. However, those videos will not appear in YouTube's Movies channels until you do upload the image.
  • custom_thumbnail – A thumbnail image that can be used to represent a video in a list of search results. By default, YouTube generates several thumbnail images using frames from your video and sets one of the images as the default image. However, if you provide a custom image, YouTube will set that as the default thumbnail image for the video instead.

    The following list provides specifications for custom thumbnail images:
    • Dimensions:
      • Minimum size of 640px by 360px for content with a 16:9 aspect ratio
      • Minimum size of 480px by 360px for content with a 4:3 aspect ratio
    • File Format: .jpg or .png
    • File Size: 2MB maximum
  • movie_poster – This image is required movies (and only used for movies). It is 922px wide and 1337px tall, and it has a maximum file size of 19MB. It may appear on YouTube's Movies page or on other pages that promote movies.
path Text (XPath) Required. The path attribute specifies an XPath that identifies the file containing the actual image.
Example <artwork type="custom_thumbnail" path="/feed/file[@tag='VIDEO123-thumbnail']"/>
Subtag of video
Content Format Empty

channel
Definition Optional. The <channel> tag identifies the YouTube channel that you are uploading the video to. The YouTube channel must be linked to your content owner. By default, all of the content in your feed will be uploaded to the default YouTube channel for your content owner. The tag value can be either a YouTube channel name or the ID that YouTube uses to uniquely identify the channel.
Subtag of video
Content Format Text

content_type
Definition Required for episodes and movies. Not used for other video types. The <content_type> tag identifies the type of movie or content that the asset represents. Valid values for this field are either Full Episode or Clip for episodes and either Feature Film or Short for movies.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <content_type>Full Episode</content_type>
Subtag of video
Content Format Text. Valid values are Full Episode, Clip, Feature Film and Short.

country
Definition Optional. The <country> tag specifies the country where a video was recorded. This tag's value must be a two-letter ISO 3166 country code.
Example <country>DE</country>
Subtag of recorded
Content Format Text. The value must be a two-letter ISO 3166 country code.

date
Definition Optional. The <date> tag specifies the date that a video was recorded.
Example <date>2006-12-25</date>
Subtag of recorded
Content Format Date (YYYY-MM-DD)

description
Definition Required. The <description> tag provides a brief description of the video. YouTube will display the description to viewers on YouTube's website. This field has maximum length of 5000 bytes and may contain all valid UTF-8 characters except < and >.
Subtag of video
Content Format Text

director
Definition Optional for episodes and movies. Not used for other video types. The <director> tag identifies a director associated with a video. A feed can specify up to 50 directors for a video.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <director>Marty Ryan</director>
Subtag of video
Content Format Text

domain_blacklist
Definition Optional. The <domain_blacklist> tag contains a comma-separated list of domains where a video is not allowed to be embedded. The video will be blocked from playing on the listed domains but could be embedded on any other domain. The tag value supports a wildcard value (*).

Note: If you specify a value for the <domain_blacklist> tag, you cannot also specify a value for the <domain_whitelist> tag.
Example <domain_blacklist>*.example.com, *.example.org
Subtag of video
Content Format Text

domain_whitelist
Definition Optional. The <domain_whitelist> tag contains a comma-separated list of domains where a video is allowed to be embedded. If you specify a value for this tag, then the video will be blocked if it is embedded on any domains not listed in the tag value. The tag value supports a wildcard value (*).

Note: If you specify a value for the <domain_whitelist> tag, you cannot also specify a value for the <domain_whitelist> tag.
Example <domain_whitelist>*.example.com, *.example.org
Subtag of video
Content Format Text

end_time
Definition Optional. The <end_time> tag specifies the date and time after which a video will not be available on YouTube. This tag's value contains a date and time in ISO 8601 format. The value must express times in UTC (Coordinated Universal Time) and should not specify a date later than the year 2037.

The <end_time> tag works in conjunction with the <start_time> tag to set the availability window for a video. If you specify a <start_time> for a video, the video remains private in your account until the specified time, regardless of its <public> value. If you specify an <end_time> without a <start_time>, the video will be publicly available until the specified time, regardless of its <public> value. If you specify neither a start time or an end time, the video's privacy setting remains as it was explicitly set.
Subtag of video
Content Format Date

episode
Definition Required for episodes. Not used for other video types. The <episode> tag specifies the episode number associated with an episode of a program. This field has a maximum length of 5 bytes.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <episode>14</episode>
Subtag of video
Content Format Text

game_title
Definition Optional. The <game_title> tag provides the name of the game being played in a Gaming video.
Subtag of video
Content Format Text

genre
Definition Required. The <genre> tag specifies a genre that can be used to categorize a video. Videos may be categorized in more than one genre.

Note: YouTube uses different sets of genres to categorize assets and videos. We recommend that you always use this tag to indicate that music videos are in the Music genre, though you can also specify other relevant genres using additional <genre> tags. Also use the <genre> tag that is a child of <asset> to identify the type of music featured in the video.

You use the <movie_genre> tag (which replicates the value of the <genre> tag that is a subtag of <asset>) to identify the movie genre that an asset's video will appear in within the Movies category, while this tag identifies other YouTube categories where the content should appear.
Subtag of video
Content Format Text

hide_statistics
Definition Optional. The <hide_statistics> tag specifies whether the video's statistics should be hidden from potential viewers. The default tag value is False, which means that the video's statistics are available on the watch page by clicking the chart icon below the video.
Subtag of video
Content Format Boolean

hide_view_count
Definition Optional. The <hide_view_count> tag specifies whether the video's view count should be hidden from potential viewers. The watch count might appear on the video watch page, in search results, or other YouTube.com locations. The default tag value is False, which means that the video's view count will be visible.
Subtag of video
Content Format Boolean

keyword
Definition Required. The <keyword> tag contains a keyword associated with a video. You must provide at least one keyword for each video, and each keyword must be at least two bytes long and may not be longer than 100 bytes. In addition, the maximum total length for all keywords is 500 bytes.

Keywords may contain spaces, meaning an individual keyword can actually be more than one word long, but cannot contain a comma character. For example, you could specify "surfing stunts" as a single keyword or as two separate keywords ("surfing" and "stunts").
Subtag of video
Content Format Text

movie_genre
Definition Required for movies. The <movie_genre> tag identifies the genre to which a movie belongs, from the list of valid movie genres. When you first create a video from a movie asset, the <movie_genre> is set to the value of the asset's <genre> tag.
Subtag of video
Content Format Text

location
Definition

Optional. The <location> tag identifies a place where a video was recorded. The tag value contains the geographic coordinates for the location. This field has a maximum length of 215 characters.

Providing geographic coordinates for the recording location

The example below demonstrates how to use the tag to provide latitude and longitude coordinates:
geo:lat=31.046051 geo:lon=34.851612


You can use the YouTube Maps API Geocoder to convert addresses to geographic coordinates. To use the YouTube Maps API Geocoder, you will need to sign up for an API key at http://code.google.com/apis/maps/documentation/. Once you have an API key, you can use the Geocoding web service to extract the coordinates for an address:
http://maps.google.com/maps/geo?q=ADDRESS&output=csv&key=API_KEY

In the request, you must entity encode the address and add the country – e.g. "10+Downing+Street+London, UK". You also need to replace the string API_KEY with your API key. The Geocoding service will return an HTTP 200 response code if your request is successful.

Example <location>geo:lat=31.046051 geo:lon=34.851612</location>
Subtag of recorded
Content Format Text

notes
Definition Optional. The <notes> tag enables you to store additional information that does not map directly to one of the other elements in the feed. This field has a maximum length of 255 bytes.
Example <notes>Some miscellaneous notes here.</notes>
Subtag of video
Content Format Text

notify_subscribers
Definition Optional. The <notify_subscribers> tag indicates whether channel subscribers should be notified about a newly uploaded, public video. This feature allows a video uploader to suppress email notifications to subscribers and to prevent upload notifications from appearing in user feeds. A partner might use this feature to avoid spamming subscribers when uploading many videos at once or to avoid highlighting uploads of older content that might not merit a special notification. The tag's default value is true, which indicates that subscribers will be notified that the video has been uploaded.
Example <notify_subscribers>false</notify_subscribers>
Subtag of video
Content Format Boolean

original_release_date
Definition Required for episode, movie, and trailer videos. The <original_release_date> tag specifies the date that a video was publicly released. Dates prior to the year 1902 are not supported.
Example <original_release_date>2007-08-28</original_release_date>
Subtag of video
Content Format Date (YYYY-MM-DD)

original_release_medium
Definition Required for movies, trailers, and episodes. Not used for other video types. The <original_release_medium> tag indicates how people first had the opportunity to see a video asset. The following values are valid for this field:

  • Basic TV – shown on basic cable or satellite television channel, such as MTV or Comedy Central.

  • Premium TV – shown on premium cable or premium satellite channel, including subscription channels such as HBO or ShowTime.

  • Terrestrial TV – shown on broadcast network or local station

  • Film – theatrical or festival release

  • Promotional – promotional clips and trailers

  • Web – original webisode content

  • Direct-to-Video – video-on-demand, DVD, or other medium where the video would be available for purchase or rental


When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <original_release_medium>Basic TV</original_release_medium>
Subtag of video
Content Format Text

partner_reporting_id
Definition Required for shows and optional for all other types of videos. The <partner_reporting_id> tag contains a unique value that you use to identify an asset. For example the partner_reporting_id tag value could be a unique ID that you created for the asset or a standard identifier, such as an ISRC (International Standard Recording Code) or a TMS (Tribune Media Systems) ID. This field has a maximum length of 64 bytes and may contain alphanumeric characters, hyphens (-), underscores (_), periods (.), arrobas (@), or forward slashes (/).

If you specify the <custom_id> tag on an asset when you first upload it, the <custom_id> value is copied to <partner_reporting_id> tag on the video. You can use the <partner_reporting_id> value to identify the video in YouTube reports.
Example <partner_reporting_id>ABCde12345</partner_reporting_id>
Subtag of video
Content Format Text

producer
Definition Optional for episodes and movies. Not used for other video types. The <producer> tag specifies the name of a producer for a video. A feed can specify up to 50 producers for a video.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <producer>Sally DiProfio</producer>
Subtag of video
Content Format Text

public
Definition Optional. The <public> tag indicates whether a video is public, unlisted, or private.
  • A public video is visible to all YouTube users.
  • An unlisted video can be viewed by any user who has the URL for the video's watch page or, more broadly, the video's unique YouTube video ID.
  • A private video can only be viewed by people personally selected by the video's owner.
Valid values for this tag are:
  • True – The video is public
  • unlisted – The video is unlisted.
  • False – The video is private. This is the default value.
To make a video public as soon as possible, set the <public> tag value to True or set the <start_time> tag to a date in the past. You can also use the <start_time> tag to make a video public at a specific future date and time.

If you do not set the video's <public> tag to True or unlisted, and you do not specify a <start_time> value for the video, the video will be private in your channel until you submit a feed update or take some other action to change the video's status to public.
Subtag of video
Content Format Text

rating
Definition Required for movies, trailers, and episodes. Optional for music videos. The <rating> tag specifies a rating that the video received. If a movie or episode has more than one rating, use one <rating> tag to specify each rating. The rating must be a valid rating given under the associated rating system. For music videos, you can provide a British Board of Film Classification (BBFC) rating.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Attributes
Name Format Description
system Text Required. The system attribute identifies the rating system used to classify the video. The valid ratings for film and television shows vary depending on the country. YouTube accepts the names from the System column from the MovieLabs Common Metadata specification; see Ratings for details. For music videos, you can use the system value of Lyrics to indicate that the video contains explicit lyrics.
Example <rating system="mpaa">PG</rating>
Subtag of video
Content Format Text

recorded
Definition Optional. The <recorded> tag contains information about the date and location where a video was recorded.
Example <recorded>
Subtags date?, location?, country?, zip?
Subtag of video
Content Format Container

require_paid_subscription_to_view
Definition Optional for videos uploaded to paid channels. Not valid for videos uploaded to free channels.

The require_paid_subscription_to_view tag specifies whether the video is available to everyone as a free preview (False) or is only available to paid channel subscribers (True). If you don't include the tag, the channel's default setting applies.
Example <require_paid_subscription_to_view>True</require_paid_subscription_to_view>
Subtag of video
Content Format Boolean

season
Definition Required for episodes. Not used for other video types. The <season> tag specifies the season number associated with a TV video. This field has a maximum length of 5 bytes.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <season>2</season>
Subtag of video
Content Format Text

show_custom_id
Definition Required for episodes. Not used for other video types. The <show_custom_id> tag specifies the custom ID of the show that an episode is associated with. This field has a maximum length of 64 bytes and may contain alphanumeric characters, hyphens (-), underscores (_), periods (.), or forward slashes (/).

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <show_custom_id>BC-DX1</show_custom_id>
Subtag of video
Content Format Text

spoken_language
Definition Required for movies and episodes. Not used for other video types. The <spoken_language> tag specifies the video's primary spoken language. The tag value can be any ISO 639-1 two-letter language code.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <spoken_language>en</spoken_language>
Subtag of video
Content Format Text

start_time
Definition Optional. The <start_time> tag specifies the date and time when YouTube will publicly release a private video. This field's value contains a date and time in ISO 8601 format. The value must express times in UTC (Coordinated Universal Time) and should not specify a date earlier than the year 1902.

The <start_time> tag works in conjunction with the <end_time> tag to set the availability window for a video. If you specify a <start_time> for a video, the video remains private in your account until the specified time, regardless of its <public> value. If you specify an <end_time> without a <start_time>, the video will be publicly available until the specified time, regardless of its <public> value. If you specify neither a start time or an end time, the video's privacy setting remains as it was explicitly set.
Subtag of video
Content Format Date

subtitled_language
Definition Optional for episodes and movies. Not used for other video types. The <subtitled_language> tag specifies a language for which the video has either a separate caption track or burnt-in captions that are part of the video. The tag value can be any ISO 639-1 two-letter language code, and your feed should contain one <subtitled_language> tag for each language for which captions are available.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <subtitled_language>ja</subtitled_language>
Subtag of video
Content Format Text

title
Definition Required. The <title> tag specifies the (display) title of the video. This field has a maximum length of 100 characters.
Subtag of video
Content Format Text

tms_id
Definition Optional for episodes and movies. Not used for other video types. The <tms_id> tag contains a 12- to 14-character Tribune Media Systems (TMS) ID value that uniquely identifies a movie or television program.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <tms_id>00123abc123abc</tms_id>
Subtag of video
Content Format Text. Value must contain exactly 14 characters.

url
Definition Optional. The <url> tag specifies an official URL associated with an asset. This field has a maximum length of 1536 bytes. This value is not currently displayed to YouTube users.
Example <url>http://goodshow.example.com</url>
Subtag of video
Content Format Text

writer
Definition Optional for episodes and movies. Not used for other video types. The <writer> tag specifies the name of a writer for an asset. A feed can specify up to 50 writers for an asset.

When uploading content for the first time, you can specify this tag on the asset or the video. To update an existing value, you need to update the video, See Update video metadata for more information.
Example <writer>Leonard Kelley</writer>
Subtag of video
Content Format Text

zip
Definition Optional. The <zip> tag identifies the zip code where a video was recorded. This field has a maximum length of 11 characters.
Example <zip>94043</zip>
Subtag of recorded
Content Format Text

XML tags for captions

caption
Definition The <caption> tag encapsulates metadata about a caption file or about a reason that captions are not available for a video. If it contains information about a caption file, then it will contain a <language> tag and may also contain a <format> and/or <name> tag. If it contains details explaining why captions are unavailable for a video, it will contain a <certification> tag.
Attributes
Name Format Description
autosync Boolean The autosync attribute lets you request that the caption track be automatically synchronized with its video. This feature is intended for caption tracks that are in the same language as the video's original audio content.

If you set the attribute's value to True, then YouTube will override time codes specified in the caption file in an effort to align the caption text as closely as possible with the video's content. The attribute's default value is False.
transcribe Boolean The transcribe attribute requests automatic captions using speech recognition technology. The attribute's default value is False.
Example <caption>
Subtags certification?
Subtag of feed
Content Format Container

enabled
Definition Optional. The <enabled> tag specifies whether other users who view the video see the captions. If you set <enabled> to False, the captions display when you are logged in as the content owner, but they do not appear when others view the video. The default value is True.
Example <enabled>False</enabled>
Subtag of caption
Content Format Boolean

format
Definition Optional. The <format> tag specifies the format of the captions in the file. YouTube supports a number of caption file formats, including SubViewer (sbv), SubRip (srt) and Scenarist (scc). You can upload other filetypes as well, though they may not display correctly on the playback page. If you do not specify a file format, YouTube will attempt to determine the format based on the caption file's contents.

If you would like YouTube to process the file as a transcript in the event that it does not match one of our supported caption file formats, set the <format> tag value to transcript. In that case, YouTube will attempt to convert the file's contents to a caption track and align the captions with the video's audio track.
Example <format>srt</format>
Subtag of caption
Content Format Text. Valid values include sbv, srt, scc, and transcript.

language
Definition Required. The <language> tag specifies the language of the captions in the file. The value must be a two-letter ISO 639-1 language code unless the language is either Spanish or Portuguese, in which case you must also specify a locale to identify the proper language dialect. The list below shows accepted values for those languages:
  • es-ES – Spanish (Spain)
  • es-MX – Spanish (Latin America)
  • pt-BR – Portuguese (Brazil)
  • pt-PT – Portuguese (Portugal)
Example <language>EN</language>
Subtag of caption
Content Format Text. The value must be a two-letter ISO 639-1 language code.

name
Definition Optional. The <name> tag specifies a display name for a caption track. By default, the YouTube player uses the language of a caption track as its display name. However, if a video has multiple caption tracks in the same language, you must specify a <name> to differentiate between those tracks. If you do specify a track name, the name will display in addition to the track language in the YouTube player's 'CC' menu.

If you are uploading a caption track and you specify the same name and language as a previously uploaded track for the same video, the track that you are uploading will overwrite the previously uploaded track. Similarly, if a video already has a track in a particular language, and the track does not have an additional name, and you add a new track in the same language without specifying a <name>, the new track will also overwrite the older one.
Example <name>English</name>
Subtag of caption
Content Format Text

certification
Definition Required if the <caption> tag does not contain a <language> tag and, otherwise, not allowed. The <certification> tag encapsulates a reason that explains why captions are unavailable for a video.
Example <certification>
Subtags  
Subtag of caption
Content Format Container

reason
Definition Required. The <reason> tag contains a value that indicates why captions are unavailable for a video. The following tag values are valid:
  • 1 – The content has never aired on television in the United States.
  • 2 – The content has only aired on television in the United States without captions.
  • 3 – The content has not aired on television in the United States with captions since September 30, 2012.
  • 4 – The content does not consist of full-length video programming.
  • 5 – The content does not fall within a category of online programming that requires captions under FCC regulations (49 C.F.R. § 79.4(b)).
  • 6 – The FCC and/or U.S. Congress has granted an exemption from captioning requirements for this content.
Example <reason>1</reason>
Subtag of certification
Content Format Integer

XML tags for channel layouts

channel
Definition The <channel> tag identifies the channel whose Browse view you are configuring. The channel must be linked to your content owner. See Defining channel page layouts for details.
Attributes
Name Format Description
id Text Required. The id attribute identifies a channel that you own.
Example <channel id="CHANNEL_ID">
Subtags trailer?, sections?
Subtag of feed
Content Format Container

trailer
Definition The <trailer> tag identifies the YouTube video used as the "welcome" trailer displayed to non-subscribers when they visit the Browse view for the channel identified by the parent <channel>> tag. The tag is optional; omit it to leave the current trailer (if any) unchanged.
Attributes
Name Format Description
video_id Text Optional. The video_id attribute identifies an existing video. The video must be associated with the channel identified by the parent <channel> tag. This attribute is required except when the action attribute is "delete".
action Text Optional. Valid values for this attribute are:
  • write - Use the specified video_id as the trailer
  • delete - Remove the trailer from this channel
The default value is write.
Example <trailer video_id="VIDEO_ID_1_" />
Subtag of channel

XML tags for content ratings

content_rating
Definition The <content_rating> tag provides information that can be used to categorize the content of a video in the absence of an official rating. For example, a YouTube content rating indicates whether a video contains mature content, such as strong language, nudity, sexual situations, drug use, or violence. This tag can also be used to indicate that a music video contains explicit lyrics. The <content_rating> tag is a child of the <feed> tag, and it can then be associated with one or more videos using a relationship. See YouTube content ratings for instructions on formatting a YouTube content rating.
Attributes
Name Format Description
system Text. Valid values are "lyrics" and "youtube". Required. The system attribute specifies whether the rating applies to the video content ("youtube") or to the lyrics ("lyrics").
tag Text Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.
Example <content_rating system="youtube">L1 S0 N0 D0 V1</content_rating>
Subtag of feed
Content Format Text. The value must be a valid YouTube content rating.

XML tags for video breaks

video_breaks
Definition The <video_breaks> tag encapsulates a list of times when in-stream ads could run during a specific video. See Setting video breaks for details.
Attributes
Name Format Description
video Text (XPath) Optional. The video attribute specifies an XPath that identifies the video associated with the video break times. If you use this attribute to identify the video associated with a set of video break times, you do not need to define a relationship to associate the video breaks with a video.
tag Text Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.
Example <video_breaks video="/external/video[id='xy1942']">
Subtags third_party_ad_server?, break+
Subtag of feed
Content Format Container

third_party_ad_server
Definition The <third_party_ad_server> tag encapsulates information that YouTube will need to request ads for a video from a third-party ad server.
Example <third_party_ad_server>
Subtags ad_server_video_id
Subtag of video_breaks
Content Format Container

ad_server_video_id
Definition The <ad_server_video_id> tag specifies a value that uniquely identifies your video to the third-party ad server.
Example <ad_server_video_id>Video123</ad_server_video_id>
Subtag of ad_server
Content Format Text

break
Definition The <break> tag identifies the time of a natural break in a video when YouTube can show in-stream ads. It might also contain ad targeting information that YouTube would use to request ads from a third-party ad server.
To allow pre-roll ads, use <break time="0"/> and to allow post-roll ads, use <break time="-1"/>.
Attributes
Name Format Description
time Text The time attribute specifies the time of the break. If you are specifying the time of a mid-roll break, the attribute value can identify the number of seconds after the start of the video when the break occurs or the time, specified in HH:MM:SS format, when the break occurs. To show in-stream ads at break times automatically determined by YouTube, use the auto_midrolls attribute instead of identifying specific times.
Toa allow pre-roll ads, use <break time="0"/> and to allow post-roll ads, use <break time="-1"/>.
auto_midrolls Boolean The auto_midrolls attribute authorizes YouTube to show in-stream ads at automatically determined break times. YouTube identifies appropriate break times when it processes the video; setting auto_midrolls to True approves the auto-generated break times.
Note: The auto_midrolls feature is in beta test and not yet generally available.
Example <break time="600"/><br/><break time="00:10:00"/>
Subtag of video_breaks

XML tags for ad policies

ad_policy
Definition The <ad_policy> tag contains information about the types of advertisements that you are willing to show for a video that you have uploaded. See Defining advertising policies for details.
Attributes
Name Format Description
video Text (XPath) Optional. The video attribute specifies an XPath that identifies the video or videos that use the ad policy. If you use the video attribute to identify the video(s) that use an ad policy, you do not need to define relationships to associate the ad policy with videos.
tag Text Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.
Example <ad_policy tag="ShowAllAds">
Subtags display?, instream?, overlay?, product_listing?, third_party_ads?, contains_paid_product_placement?
Subtag of feed
Content Format Container

 

display
Definition The <display> tag enables the 300x250 display ad on the watch page. Valid values are Allow or Deny, with Allow as the default.
Example <display>Allow
Subtag of ad_policy
Content Format Text. Valid values are Allow and Deny.


instream
Definition The <instream> tag enables in-stream ads in an ad policy. An in-stream ad plays within the video player and is the only content displayed in the player while it is playing.
When you enable in-stream ads, YouTube allows both TrueView in-stream ads and standard in-stream ads by default. To disallow one type of in-stream ad, set the standard or trueview attribute to false. If you set both attributes to false, then in-stream ads are diabled for videos using the ad policy.
When you enable in-stream ads, you must also specify the break times when the ads should run.
Attributes
Name Format Description
standard Text. Valid values are disallow, short, and long. The standard attribute indicates whether to allow standard in-stream ads during a video. When a standard in-stream ad plays, the video doesn't continue until the ad finishes playing, and the viewer does not have the option to skip any portion of the ad. If your account is authorized to play long in-stream ads, the following attribute values are valid:
  • long – Enable standard, non-skippable ads up to 30 seconds in length to run for videos associated with the ad policy.
  • short – Allow standard, non-skippable ads up to 15 seconds in length to run for videos associated with the ad policy.
  • disallow – Disable standard in-stream ads from showing for videos associated with the ad policy.
The attribute values true and false equate to settings of short and disallow, respectively.
trueview Boolean The trueview attribute indicates whether TrueView in-stream ads can be shown during a video. When a TrueView in-stream ad plays, the user can choose to skip the remainder of the ad after the ad has played for at least five seconds. Set this tag to false to disable TrueView in-stream ads to show for videos associated with the ad policy.
Example <instream standard="false" trueview="true">
Subtag of ad_policy
Content Format Complex

overlay
Definition The <overlay> tag encapsulates ad policies for different types of overlay ads. An overlay ad displays at the bottom of the video player, and the video that the user is watching continues playing while the overlay displays.
Example <overlay>
Subtags invideo?, adsense_for_video?
Subtag of ad_policy
Content Format Container

adsense_for_video
Definition Important: YouTube no longer distinguishes between different types of overlay ads when evaluating the ad policy for a video. As such, all overlay ads will be enabled for your video if either this tag's value or the <invideo> tag's value is set to Allow.

The <adsense_for_video> tag indicates whether YouTube can show AdSense ads on a video that you uploaded. AdSense ads can be overlay ads, 300px by 250px Flash or image ads, or text ads displayed in a 300px by 250px area. In addition, the overlay ads themselves could also be text, image or Flash ads. Like an InVideo overlay, the AdSense overlay occupies the bottom 20 percent of the video player.

If you enable AdSense ads for a video, then Youtube handles the 300px by 250px ad slot differently depending on whether the video is playing on a channel page or a video watch page:
  • When the video plays on a channel page, the page could also display an AdSense for Content (AFC) Flash or image ad to the right of the channel's video player.
  • When the video plays on its video watch page, the page could also display AFC Flash, image or text ads in the space to the right of the video player.
This tag's default value is Allow.
Example <adsense_for_video>Allow</adsense_for_video>
Subtag of overlay
Content Format Text. Valid values are Allow and Deny.

invideo
Definition Important: YouTube no longer distinguishes between different types of overlay ads when evaluating the ad policy for a video. As such, all overlay ads will be enabled for your video if either this tag's value or the <adsense_for_video> tag's value is set to Allow.

The <invideo> tag indicates whether YouTube can show InVideo Ads on a video that you uploaded. InVideo Ads have two components:
  • A transparent Flash overlay can occupy the bottom 20 percent of the video player. (In the standard 640px by 360px player, the overlay is 640px by 72px.)
  • A 300px by 250px companion ad displays to the right of the video player.
If you enable a video to show InVideo Ads, then the video could show either the Flash overlay or the companion ad or both. If a Flash overlay and a companion ad both display, then both ads will be from the same campaign.

When a user clicks on either an InVideo overlay or companion ad, one of the following actions will occur:
  • Another YouTube video will open and play inside the player. For some advertising campaigns, the other YouTube video will play automatically as a post-roll ad after the main video has ended.
  • A new browser window will open the advertiser's website.
This tag's default value is Allow.
Example <invideo>Allow</invideo>
Subtag of overlay
Content Format Text. Valid values are Allow and Deny.

product_listing
Definition The <product_listing> tag enables ads that feature products related to or featured in the video content. These ads are sponsored cards that display during the video. The cards are added automatically by the ad system. Viewers see a teaser for the card for a few seconds and can also click the icon in the top right corner of the video to browse the video's cards. The default value for this tag is Allow.
Example <product_listing>Allow</product_listing>
Subtag of ad_policy
Content Format Text. Valid values are Allow and Deny.

third_party_ads
Definition The <third_party_ads> tag indicates whether YouTube can retrieve ads for a video from a third-party ad server. This tag serves as a switch that lets you activate or deactivate the use of third-party ads for a video. Use this tag in conjunction with video breaks, which identify times when ad breaks can occur during a video and also contains information that YouTube needs to request ads from a third-party server for a specific video.

The default value for this tag is Deny, which indicates that YouTube should not request ads from a third-party ad server. Note: Your account must also be approved to use the third-party ads feature.
Example <third_party_ads>Allow</third_party_ads>
Subtag of ad_policy
Content Format Text. Valid values are Allow and Deny.

contains_paid_product_placement
Definition The <contains_paid_product_placement> tag indicates whether the video includes any content where a sponsor's brand, message, or product is integrated directly into the content. YouTube may disable monetization and promotion on videos with paid product placements; see the Paid product placements for details.

The default value for this tag is False.
Example <contains_paid_product_placement>True</contains_paid_product_placement>
Subtag of ad_policy
Content Format Boolean. The default value is False.

XML tags for playlists

playlist
Definition The <playlist> tag identifies a playlist that you want to create, update, or delete. Managing playlists explains the different types of operations that you can perform on a playlist.
Attributes
NameFormatDescription
action Text. Valid value is write. Optional. The action attribute indicates that you are updating a playlist.
channel Text Optional. The channel attribute identifies the YouTube channel that owns the playlist. The YouTube channel must be linked to your content owner. If you do not specify a value for this attribute, then, by default, the playlist will be created in the default YouTube channel for your content owner.
id Text Optional. The id attribute identifies a playlist the you are updating or deleting. The ID for a playlist will be returned in the status report that YouTube posts after processing the feed that creates the playlist.
tag Text Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.
Example <playlist channel="AwesomeChannel">
Subtags item*, name, visibility?
Subtag of feed
Content Format Complex

item
Definition The <item> tag identifies a video that you want to add to a playlist or remove from a playlist.
Attributes
NameFormatDescription
action Text Optional. The action attribute indicates whether you are removing a video from a playlist. Set the attribute value to delete to delete the video from the playlist.
icon Boolean Optional. The icon attribute lets you designate a video as the playlist icon, which means the video's thumbnail image will appear as the playlist icon in search results or other lists that show an image for the playlist. The video that is used as the playlist icon will automatically become the first video in the playlist regardless of any other ordering information that you specify.

By default, a video that is being added to a playlist will not be used as the playlist icon. If you are updating a playlist, then the update will not affect the currently selected playlist icon unless you remove the video currently used as the playlist icon from the playlist. In that case, the video that is subsequently first in the playlist will also be used as the playlist icon.
index Positive integer Optional. The index attribute specifies where a video will appear in a playlist.
  • If you do not specify a value for this attribute, then the video will be added as the last video in the playlist.
  • If you add multiple videos to a playlist and do not specify a playlist index for any of them, they will be added in the same order that they are listed in your feed.
  • If you insert a video at a specific position in the playlist, any existing videos that appear at or after that position will be shifted to a later position to accommodate the new video.
path Text Optional. The path attribute specifies an XPath that identifies the video that you are adding to a playlist or removing from a playlist. The XPath can identify videos described in the local feed or other YouTube videos (using their video ID).
Example <item index="3" path="/external/video[@id='MY-vId30-iD']"/>
Subtag of playlist
Content Format Complex

name
Definition Optional. The <name> tag specifies the name of the playlist.
Subtag of playlist
Content Format Text

visibility
Definition The <visibility> tag sets the privacy setting for a playlist. Valid values are public, unlisted, and private. The default value is public.
  • A public playlist is visible to all YouTube users.
  • An unlisted playlist can be viewed by any user who has the playlist's URL or unique YouTube playlist ID.
  • A private playlist can only be viewed by people personally selected by the video's owner.
Subtag of playlist
Content Format Text

XML tags for claims

claim
Definition Required. The <claim> tag creates a claim that associates a video with an asset. It indicates whether you are claiming the audio, visual, or audiovisual content of the video. It specifies the video being claimed and the asset that the video matches. Finally, the claim identifies the rights administrator who controls the asset (and therefore owns the claimed content) as well as the policy that the administrator wants to enforce for the claim.
Attributes
Name Format Description
type Text. The only valid value is audiovisual. Optional. The type attribute indicates that you are claiming the audiovisual portion of the video(s) associated with the claim.
asset Text (XPath) Required. The asset attribute specifies an XPath that identifies the asset that a claimed video matches. The XPath can point to items in the local feed or to previously created assets.
rights_admin Text (XPath) Required. The rights_admin attribute specifies an XPath that identifies the rights administrator making a claim.
rights_policy Text (XPath) Required. The rights_policy attribute specifies an XPath that identifies the rights policy that should be enforced for a claim. The XPath can identify a rights policy defined in the local feed or a saved policy.
video Text (XPath) Required. The video attribute specifies an XPath that identifies the video being claimed. The XPath can identify a video described in the local feed or another YouTube video (using its video ID).
block_outside_ownership Boolean Optional. The block_outside_ownership claim setting allows you to block a video that you have uploaded and claimed from being viewed in territories where you do not own that video.

For example, suppose you upload a video for an asset that you own in the United States and Canada, and you claim the video with a usage policy of "Monetize everywhere." Since the policy is only applied in countries where you own the asset, YouTube will monetize the video in the United States and Canada. By default, the video will still be viewable in other countries even though it will not be monetized in those countries. However, if you set the block_outside_ownership attribute to True, then your video will be monetized in the United States and Canada and blocked in all other countries.
tag Text Optional. You use the tag attribute to label an item in the feed so that you can refer to it elsewhere in the feed. For example, you can use the tag value to identify the item (or related item) in a relationship.

Note that no two items of the same type should have the same tag value. For example, you should not use the same tag for more than one asset or more than one rights policy. However, you can use the same tag for different types of items. For example, if you have one reference file for each of your assets, you could use the same value to tag the asset and the reference file.

See Using XPath for examples that use tags to identify objects in the feed.
Subtag of feed
Content Format Complex

XML tags for relationships

relationship
Definition Optional. The <relationship> tag encapsulates information about a relationship between two or more other entities. See Defining relationships for details.
Attributes
Name Format Description
type Text. Valid values are contains, contained_by and associate. Optional. The type attribute explains how the items and related items are connected in a relationship. The attribute's default value is associate.
  • If the value is contains, then the relationship specifies that two assets are related such that one asset embeds the other asset. In this type of relationship, you use exactly one <item> tag to identify the asset that embeds (contains) one or more other assets. You also use one <related_item> tag to identify each embedded asset.
     
  • If the value is contained_by, then the relationship specifies that two assets are related such that one asset is embedded in the other asset, which is the opposite of a contains relationship. In this type of relationship, you use exactly one <item> tag to identify the asset that is contained in other assets. You also use one <related_item> tag to identify each asset that embeds the item asset.
     
  • If the value is associate, then the relationship creates a link between two or more entities. In this type of relationship, you use one or more <item> tags to identify a group of things that will then be associated with the related item(s). You also use one <related_item> tag to identify each associated entity.
See the Defining relationships for more details about the both types of relationships.
Example <relationship>
Subtags item+, related_item+
Subtag of feed
Content Format Container

item
Definition Required. The <item> tag identifies an item that is related to one or more other items, which are identified using <related_item> tags. The Defining relationships section identifies the different combinations of items that you can specify in relationships.
Attributes
Name Format Description
path Text Required. The path attribute identifies one or more items that are part of a relationship. See Defining relationships for a list of the types of items that could be specified in relationships.)

The XPath can point to items in the local feed (/feed) or to items in another document (/external) as discussed in Using XPath.
Subtag of relationship

related_item
Definition Required. The <related_item> tag identifies an item that is related to the primary item in a relationship. A relationship can identify one or more related items, and the Defining relationships section identifies the different combinations of items and related items that you can specify in relationships.
Attributes
Name Format Description
path Text Required. The path attribute identifies one or more items that are part of a relationship. See Defining relationships for a list of the types of items that could be specified in relationships.)

The XPath can point to items in the local feed (/feed) or to items in another document (/external) as discussed in Using XPath.
Subtag of relationship

XML tags for status reports

Feed
Definition The <Feed> tag is the root tag of a YouTube status report, which is posted after YouTube processes a content feed.
Attributes
Name Format Description
version Number. The current feed version is 2. The version attribute identifies the format of the status report. The current status report version is 2.
Subtags uploader_name, timestamp, upload_control_id, filename, action+
Content Format Container

action
Definition The <action> tag contains information about a specific operation that YouTube performed while processing the XML feed.
Attributes
Name Format Description
name Text The name attribute identifies the type of action that the <action> describes. The list below shows valid attribute values:
  • Parse
  • Process asset
    • Set metadata
    • Set ownership
    • Set rights policy
  • Process file
    • Submit reference
    • Submit video
    • Submit AudioSwap track
    • Submit image
    • Submit Timed Text
    • Process claim
      • Set rights policy
      • Claim video
    • Update video
    • Update reference
    • Set rights owner
    • Set asset relationship
    • Set playlist
    • Report error
    These values, and the actions they describe, are explained in detail in Reading status reports.
Subtags command?, command_detail?, custom_id?, errors?, filename?, id*, in_file?, policy?, status, status_detail, timestamp, action*
Subtag of Feed, action
Content Format Complex

command
Definition The <command> tag specifies the type of operation that your feed requested. Valid tag values are Insert, Update, Replace and Delete.
Subtag of action
Content Format Text

command_detail
Definition The <command_detail> tag provides additional information that explains the operation. The following list identifies valid tag values:
  • Reactivate – Your feed updated a reference file to make the file active.
  • Deactivate – Your feed updated a reference file to make the file inactive.
Subtag of action
Content Format Text

custom_id
Definition The <custom_id> tag contains a value that you use to uniquely identify an asset. This tag will be included for a particular action in a status report if your XML feed uses an XPath to identify one of your existing assets by its custom ID. For example, the following XML would update the policy for an asset with the specified custom ID, and the status report associated with this XML would thus include a <custom_id> tag in the Process Asset action for that asset.
<relationship type="associate">
  <item path="/feed/rights_admin[@type='match]'/>
  <item path="/external/rights_policy[@name='Monetize Everywhere']"/>
  <related_item path="/external/asset[@custom_id='xyz123'][@type='movie']"/>
</relationship>
Subtag of action
Content Format Text

error
Definition The <error> tag contains information about a single non-fatal errors that occurred in a feed.
Subtags in_file, source_xml, summary
Subtag of action
Content Format Container

errors
Definition The <errors> tag contains a list of non-fatal errors that occurred in a feed.
Subtags summary, error+
Subtag of action
Content Format Container

filename
Definition The <filename> tag specifies the filename of the XML feed that you provided to YouTube.
Subtag of Feed
Content Format Text

id
Definition The <id> tag contains a value that YouTube assigns to uniquely identify an asset, reference, video, or playlist.
Attributes
Name Format Description
type Text. Valid values are Asset ID, Video ID, Reference ID, Playlist ID, Movie ID, Show ID, Season ID, and Episode ID. For compositions, the value will always be Asset ID. The type attribute specifies the type of ID that the tag value contains. Possible tag values are Asset ID, Reference ID, Video ID, Playlist ID, Movie ID, Show ID, Season ID, and Episode ID. For compositions, the value will always be Asset ID.
Subtag of action
Content Format Text

in_file
Definition The <in_file> tag contains an XPath that identifies a resource in a feed. The XPath identifies the item in your original feed using the same syntax that you used to identify the item in your XML feed. For example, suppose that for each asset in your feed, you set the tag attribute value equal to the <custom_id> that you use to identify that asset. The first asset in the feed could then be identified using either of the following XPaths:
  • /file/asset[1]
  • /file/asset[@tag='Your_Custom_ID']
As such, if you want to use particular values to identify items in your feed, you should specify those values using the tag attribute and also include the tag attribute and value in XPaths that identify those items in relationships.

Note: As a subtag of <error>, the <in_file> tag specifies the location of a particular error.
Subtag of action, error
Content Format Text. The element's value is an XPath that identifies a resource in a feed.

name
Definition The <name> tag specifies the name of a saved policy.
Subtag of policy
Content Format Text

policy
Definition The <policy> tag identifies a usage or match policy. If your XML feed defines a rights policy, then the status report will use an <in_file> element to identify that policy. If your XML feed refers to a saved policy, then the status report will use a <name> element to specify the saved policy name.
Subtags in_file? name?
Subtag of action
Content Format Container

source_xml
Definition The <source_xml> tag contains the block of XML from the original feed that caused the reported error. The tag will only contain the problematic section of the feed if it can be properly determined. The contents of the <source_xml> tag are escaped so that a < character appears as < and a > character appears as >.
Example <error><br/>  <summary>Unexpected XML elements: ['{http://www.youtube.com/schemas/cms/2.0}video/{http://www.youtube.com/schemas/cms/2.0}date'] [/home/youtube/generated/dump/partner_name/2011-07-07/001/PaintingVids/feed.xml:1-129] [/home/youtube/generated/dump/partner_name/2011-07-07/001/PaintingVids/feed.xml:1-129]</summary><br/>  <source_xml><br/>    <feed file_name="/home/youtube/generated/dump/partner_name/2011-07-07/001/PaintingVids/feed.xml" notification_email="dist-team@example.com" xmlns="http://www.youtube.com/schemas/cms/2.0"><br/>      ...<br/>    </feed><br/>  </source_xml>
Subtag of error
Content Format Container

status
Definition The <status> tag indicates whether a feed operation succeeded or failed. Valid tag values are Success and Failure.
Subtag of action
Content Format Text

status_detail
Definition The <status_detail> tag contains additional information about the status of a feed operation.
  • If the operation failed, then the <status_detail> tag contains an error message that explains the error.
  • If your feed submits a new video, then the <status_detail> tag contains a short message that describes the status of that video. Valid values are:
    • Live!
    • Deleted
    • Uploaded (processing, please wait)
    • Failed (unable to convert video file)
    • Rejected (content inappropriate)
Subtag of action
Content Format Text

summary
Definition The <summary> tag contains information about non-fatal errors in feed.
  • As a child element of <errors>, the <summary> tag identifies the number of non-fatal errors that occurred in the feed.
  • As a child element of <error>, the <summary> tag describes a specific error that appeared in the feed. It also identifies the line number in the XML feed that contained the error.
Example The following example shows how the <summary> tag is used as a child element of <errors>:
   <summary>Error count: 3</summary>

The following example shows how the <summary> tag is used as a child element of <error>. The tag value indicates that a playlist was not deleted since the playlist was not assigned to a YouTube channel. The path in the tag value indicates that the error appears on the second line of the XML feed (list.xml:2-2).
   <summary>Playlist name requires a channel [/home/youtube/generated/dump/yt-ingestion-eng/xml2/2010-12-10/002/20101210_1291988792/list.xml:2-2] </summary>
Subtag of errors, error
Content Format Text

timestamp
Definition The <timestamp> tag specifies the date and time that a particular action occurred:
  • As a child element of <Feed>, the timestamp specifies the date and time that YouTube posted the status report.
  • As a child of <action>, the timestamp specifies the date and time that YouTube started to perform that action.
Subtag of Feed, action
Content Format Date (YYYY-MM-DDTHH:MM:SS)

upload_control_id
Definition The <upload_control_id> tag contains a value that uniquely identifies YouTube's attempt to process your feed.
Subtag of Feed
Content Format Text

uploader_name
Definition The <uploader_name> tag specifies the CMS partner name of the feed provider.
Subtags action+, filename, timestamp, upload_control_id, uploader_name
Content Format Text

* Nguồn: Youtube