XML element definitions
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:
- Top-level feed tag
- Assets and asset metadata
- Ownership data
- Reference content
- AudioSwap
- Rights designations
- Videos
- Captions
- Channel layouts
- Content ratings
- Video breaks
- Ad policies
- Playlists
- Claims
- Relationships
- Status reports
XML Tag Definition Legend
Certain symbols may be displayed next to subtags in the definitions below. These symbols, and their meanings, are:
* = 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 |
|
||||||||||||||||||
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 |
|||||||||
Attributes |
|
|||||||||
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 |
|
||||||||||||||||||||
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 |
|
|||||||||
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:
|
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:
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 |
|
||||||
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:
|
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 |
|
|||||||||
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 |
|
|||||||||||||||||||||||||||
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 |
|
||||||
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 |
|
|||||||||
Subtag of | rule | |||||||||
Content Format | Complex |
XML tags for reference content
file | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Definition | Required. The |
||||||||||||
Attributes |
|
||||||||||||
Subtags | filename?, description? | ||||||||||||
Subtag of | feed |
filename | |
---|---|
Definition | Required. The 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 |
Subtag of | file |
Content Format | Text |
reference | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Definition | A Note: You create a reference by associating a 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 |
|
|||||||||||||||
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 |
|||||||||
Attributes |
|
|||||||||
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 |
|
|||||||||||||||
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 |
|
|||||||||
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 |
|
|||||||||
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.
|
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 |
|
|||||||||
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 |
|
|||||||||
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 |
|
|||||||||||||||
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:
|
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.
|
Subtag of | video |
Content Format | Text |
artwork | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Definition | Optional. The <artwork> tag identifies an image that should be associated with a video. | |||||||||
Attributes |
|
|||||||||
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.
|
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:
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.
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 |
|
||||||
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 |
|
|||||||||
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:
|
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:
|
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 |
|
||||||
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 |
|
|||||||||
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 |
|
|||||||||
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 |
|
|||||||||
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 |
|
|||||||||
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 |
|
|||||||||
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 |
|
|||||||||
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:
|
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:
When a user clicks on either an InVideo overlay or companion ad, one of the following actions will occur:
|
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 |
|
|||||||||||||||
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 |
|
|||||||||||||||
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.
|
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 |
|
||||||||||||||||||||||||
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 |
|
||||||
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 |
|
||||||
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 |
|
||||||
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 |
|
||||||
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 |
|
||||||
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:
|
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 |
|
||||||
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:
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.
|
Subtag of | action |
Content Format | Text |
summary | |
---|---|
Definition | The <summary> tag contains information about non-fatal errors in feed. |
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: |
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