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
namestringRequiredThe title of the video.
descriptionstringOptionalA description of the video content.
thumbnailUrlstringOptionalA URL pointing to the video thumbnail image.
uploadDatedateOptionalThe date the video was first published in ISO 8601 format.
contentUrlstringOptionalA URL pointing to the actual video media file.

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 theschemaOrgVideoObject 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
*[_type == "yourDocumentType"][0]{
  ...,
  schemaOrgVideoObject
}

Next.js Component

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

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

JSON-LD Output

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"
}

Was this page helpful?