Skip to main content
seofields
docs

VideoObject Schema

Add VideoObject structured data to your Sanity documents to enable video rich results with thumbnails and duration in Google Search.

About VideoObject Schema

VideoObject schema enables video rich results with thumbnails and duration in Google Search. When you add VideoObject markup, Google can display video previews, thumbnails, and key moments directly in search results, significantly increasing click-through rates for video content.

Fields

FieldTypeRequiredDescription
namestringThe title of the video.
descriptionstringA description of the video content.
thumbnailUrlstringA URL pointing to the video thumbnail image.
uploadDatedateThe date the video was first published in ISO 8601 format.
contentUrlstringA URL pointing to the actual video media file.
durationstringVideo duration in ISO 8601 format, e.g. "PT5M30S" for 5 minutes 30 seconds.
publisherstring | objectThe organization or person that published the video — a URL string or an Organization/Person object.

Plugin Registration

sanity.config.ts
import { defineConfig } from "sanity";
import { seoFields } from "sanity-plugin-seofields";
import { schemaOrgVideoObjectPlugin } from "sanity-plugin-seofields/schema";

export default defineConfig({
  // ...your sanity config
  plugins: [
    seoFields(),
    schemaOrgVideoObjectPlugin(),
  ],
});

Schema Usage

Add the schemaOrgVideoObject field to any document schema:

schemas/page.ts
import { defineField, defineType } from 'sanity'

export default defineType({
  name: 'page',
  title: 'Page',
  type: 'document',
  fields: [
    // ... your other fields
    defineField({
      name: 'schemaOrgVideoObject',
      title: 'Video Object',
      type: 'schemaOrgVideoObject',
    }),
  ],
})

GROQ Query

GROQ query
*[_type == "yourDocumentType"][0]{
  schemaOrgVideoObject {
    name,
    description,
    thumbnailUrl,
    uploadDate,
    contentUrl,
    duration,
    publisher
  }
}

Next.js Component

app/page.tsx
import { VideoObjectSchema } from "sanity-plugin-seofields/schema/next";

export default function Page({ data }) {
  return (
    <>
      <VideoObjectSchema data={data.schemaOrgVideoObject} />
      {/* Your page content */}
    </>
  );
}

JSON-LD Output

Generated JSON-LD
{
  "@context": "https://schema.org",
  "@type": "VideoObject",
  "name": "Getting Started Tutorial",
  "description": "...",
  "thumbnailUrl": "https://example.com/thumb.jpg",
  "uploadDate": "2025-01-15",
  "contentUrl": "https://example.com/video.mp4",
  "duration": "PT5M30S",
  "publisher": {
    "@type": "Organization",
    "name": "Example Media"
  }
}

Last updated: May 27, 2026. Tested with: Sanity Studio v3, v4, and v5.

Was this page helpful?