Search code examples
videoschema.orggoogle-rich-snippets

VideoObject schema parameters for embedded videos on web pages


I have a site that has about 24 video pages, these pages each have one YouTube video embedded into them as the focus of the page, they are fairly high traffic.

I'm working on adding JSON-LD schema to the pages for a better rich snippet experience, but I'm not sure what I should enter into the "Content URL" and "Embed URL" parameters of the schema. The contentUrl is described as "the URL path to the video file itself" but it's hosted on YouTube, not my server. As far as the embedUrl I'm assuming I just paste the YouTube video URL and not my site URL that has the video embedded on it?

Schema:

{
  "@context": "https://schema.org",
  "@type": "VideoObject",
  "name": "Aerospace Cable Assembly",
  "description": "Informational video about the manufacturing process of aerospace cable assemblies, as well as aviation wires and aerospace wire harnesses.",
  "thumbnailUrl": "https://img.youtube.com/vi/FY7Y5dKrYxk/maxresdefault.jpg",
  "uploadDate": "2019-04-10",
  "duration": "PT1M23S",  
  "publisher": {
    "@type": "Organization",
    "name": "REDACTED",
    "logo": {
      "@type": "ImageObject",
      "url": "https://redacted.com/wp-content/uploads/logo_structured_data.png",
      "width": 295,
      "height": 60
    }
  },
  "contentUrl": "???",
  "embedUrl": "???"
}

Solution

  • You can use:
    contentUrl: https://youtube.googleapis.com/v/YT_ID
    embedUrl: https://www.youtube.com/embed/VT_ID?rel=0

    Here is a sample from me but with schema.org:

    <figure itemprop="associatedMedia video" itemscope="" itemtype="https://schema.org/VideoObject">
    <meta itemprop="isFamilyFriendly" content="True">
    <meta itemprop="requiresSubscription" content="False">
    <meta itemprop="width" content="1280">
    <meta itemprop="height" content="720">
    <meta itemprop="thumbnailUrl" content="https://i3.ytimg.com/vi/YT_ID/0.jpg">
    <meta itemprop="uploadDate" content="2012-03-27">
    <meta itemprop="contentUrl" content="https://youtube.googleapis.com/v/YT_ID">
    <meta itemprop="embedUrl" content="https://www.youtube.com/embed/YT_ID?rel=0">
    <h2 id="13">Video NAME</h2>
    <meta itemprop="name" content="Video NAME">
    <div class="yt-wrapper"><div class="youtube" id="bkyt" data-embed="YT_ID"><iframe frameborder="0" allowfullscreen="" src="https://www.youtube.com/embed/YT_ID?rel=0&amp;showinfo=0&amp;autoplay=1"></iframe>
    </div>
    </div>
    <figcaption class="bildhead" itemprop="description">Video DESCRITPTION <small>(Duration: <span itemprop="duration" content="PT20M55S">20:55</span>
    Count: <span itemprop="interactionCount">16654</span>)</small>
    </figcaption>
    </figure>