YouTube content ratings

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.

A <content_rating> tag provides information that can be used to categorize the content of a video in the absence of an official rating, such as a Motion Picture Association of America (MPAA) rating. You can also use a <content_rating> tag to indicate that a music video contains explicit lyrics. YouTube could use that information to display a badge on the video's watch page or in search results.

For videos that do have an official rating, use the <rating> subtag of the <asset> tag instead of <content_rating>.

The <content_rating> tag is a child of the <feed> tag. You then define a relationship to associate the content rating with one or more videos.

A YouTube content rating contains a series of values that categorize the content of a video several categories. Each category has three options that indicate the level of mature content. To provide a YouTube rating for a video, select one value for each of the categories and separate the values with spaces. For details about the rating options, see YouTube content rating.

  • Strong or explicit language
    • L0 – No strong language
    • L1 – Strong language
    • L2 – Explicit language
  • Nudity
    • N0 – No nudity
    • N1 – Brief or partial nudity
    • N2 – Graphic nudity
  • Sexual references and content
    • S0 – No sexual situations
    • S1 – Mild sexual situations
    • S2 – Explicit sexual situations
  • Violence
    • V0 – Not violent or disturbing
    • V1 – Mildly violent or disturbing
    • V2 – Strongly violent or disturbing
  • Drug references and content
    • D0 – No drug references or content
    • D1 – Mild drug references or content
    • D2 – Strong drug references or content
  • Flashing or strobing lights
    • F0 – No flashing lights content
    • F1 – Flashing lights content

The XML snippet below demonstrates how to specify content ratings and use relationships to associate them with different videos:

   <content_rating system="youtube"
                    tag="family">L0 S0 N0 D0 V0 F0</content_rating>
    <content_rating system="youtube"
                    tag="very bad for kids">L2 S2 N2 D2 V2 F0</content_rating>
      <item path="/feed/content_rating[@tag='family']"/>
      <related_item path="/external/video[@id='VIDEO_ID_1_']"/>
      <related_item path="/external/video[@id='VIDEO_ID_2_']"/>
      <item path="/feed/content_rating[@tag='very bad for kids']"/>
      <related_item path="/external/video[@id='VIDEO_ID_3_']"/>

The XML snippet below demonstrates how to indicate that an existing music video contains explicit lyrics. The <content_rating> could also be associated with the video when the video is created. Note that a video must be in the Music video genre to display an "Explicit Lyrics" badge.

  <content_rating system='lyrics' rating='explicit'/>
    <item path="/external/video[@id='VIDEO_ID_1_']"/>
    <related_item path="/feed/content_rating[1]"/>
Was this article helpful?
How can we improve it?