Markup for YouTube Videos

If you make it easier for a search engine to learn what’s on your website, the search engine will reward you with better rankings or better descriptions in the results pages (SERP). For example, you can help Google (Bing, Yahoo, Yandex, Baidu,..) to recognize videos on your site by adding markup data to the video. The exact specification how you can do that can be found at . Here’s a more reasonable approach, useful if your video is already on YouTube, Vimeo or any other hosting service.

Here is an example how Google wants you to markup a video :

<div itemprop="video" itemscope itemtype="">
  <h2>Video: <span itemprop="name">Title</span></h2>
  <meta itemprop="duration" content="T1M33S" />
  <meta itemprop="thumbnailUrl" content="thumbnail.jpg" />
  <meta itemprop="contentURL" 
        content="" />
  <meta itemprop="embedURL" 
        content="" />
  <meta itemprop="uploadDate" content="2011-07-05T08:00:00+08:00" />
  <meta itemprop="expires" content="2012-01-30T19:00:00+08:00" />"
  <span itemprop="description">Video description</span> 

You need to provide the data for each itemprop element. Name, Duration, UploadDate and Description are fairly obvious, the remaining ones can be complicated. Usually all you have is the video id, which is part of the embed link given to you by YouTube. But where are your thumbnails and your contentURL ? Google will help you with their structured data testing tool. The tool extracts markup data from existing pages. Why not extract it from the original YouTube page. Here’s a small segment of the output for one of my client’s videos.


name: Total Concept Salon
description: An affordable, upscale salon in Cary, NC.
paid: False
channelid: UCQNhu_diGlF7OCFoGOw4gcQ
videoid: m6fmZOhs5N4
duration: PT1M1S
unlisted: False
Item 1
Item 2
Item 3
playertype: Flash
width: 1440
height: 1080
isfamilyfriendly: True
regionsallowed: AD,AE,AF,AG,AI,AL,AM,AO,AQ,AR,AS,AT,AU…


This reveals a few things: the thumbnailURL, the embedURL and the encoding for the duration. We also see that Google doesn’t set the contentURL, nor an upload or expiration date. Which means we don’t have to do it either. However, the output mentions just an URL, thus we just add it to our markup.


Let’s apply this to the example of my client’s video:
<div itemprop="video" itemscope itemtype="">
  <p>Check out our new 
   <span itemprop="name">Total Concepts Salon</span> 
   commercial on YouTube !
  <meta itemprop="duration" content="T1M01S" />
  <meta itemprop="thumbnailUrl" 
      content="" />
  <meta itemprop="URL" 
      content="" />
  <meta itemprop="embedURL" 
      content="" />
  ..actual embedded URL here..
  <span itemprop="description">An affordable, upscale salon in Cary, NC.


  1. Rita says:

    Thanks for the article. In your example, you use the URL for the embedURL and add “..actual embedded URL here..” This was confusing. Why not use ?

  2. Kumar says:

    Thanks for the example, even after implementing the as per you client video example, i am not able to get the video thumbnail on google search results, how long does it take for the google to the show the video thumbnail.

Leave a Reply

Your email address will not be published. Required fields are marked *