Skip to main content
seofields
docs

Movie

The Movie schema type describes a feature film, short, or made-for-TV motion picture. It powers Google's movie carousel, knowledge panel, and the "showtimes" experience when paired with a screening event.

About Movie

Use Movie markup on dedicated film pages — review sites, festival programmes, streaming catalogue entries, and cinema websites. The duration field must be ISO 8601 (e.g. PT2H10M) for Google to parse it correctly. To enrich the entry further, add a trailer with the VideoObject type and viewer ratings via AggregateRating.

Fields

FieldTypeRequiredDescription
namestringThe title of the movie.
descriptiontextA plot summary or synopsis of the movie.
imageurl | ImageObjectPoster or still from the movie.
dateCreateddateThe release date of the movie.
directorurl | PersonThe director of the movie.
durationstringISO 8601 duration, e.g. "PT2H30M" for 2h 30m.
contentRatingstringRating board classification, e.g. "PG-13", "R", "U/A".

Plugin Registration

sanity.config.ts
import { defineConfig } from 'sanity'
import { schemaOrgMoviePlugin } from 'sanity-plugin-seofields/schema'

export default defineConfig({
  plugins: [
    schemaOrgMoviePlugin(),
  ],
})

Schema Usage

Add theschemaOrgMovie field to any document schema:

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

export default defineType({
  name: 'movie',
  title: 'Movie',
  type: 'document',
  fields: [
    defineField({
      name: 'schemaOrgMovie',
      title: 'Movie Schema',
      type: 'schemaOrgMovie',
    }),
  ],
})

GROQ Query

GROQ query
*[_type == "movie"][0]{
  schemaOrgMovie {
    name,
    description,
    image,
    dateCreated,
    director,
    duration,
    contentRating
  }
}

Next.js Component

app/film/[slug]/page.tsx
import { MovieSchema } from 'sanity-plugin-seofields/schema/next'

export default function Page({ data }) {
  return <MovieSchema data={data.schemaOrgMovie} />
}

JSON-LD Output

Generated JSON-LD
{
  "@context": "https://schema.org",
  "@type": "Movie",
  "name": "Inception",
  "description": "A thief who steals corporate secrets through dream-sharing technology is given the inverse task of planting an idea.",
  "image": "https://example.com/posters/inception.jpg",
  "dateCreated": "2010-07-16",
  "director": {
    "@type": "Person",
    "name": "Christopher Nolan"
  },
  "actor": [
    { "@type": "Person", "name": "Leonardo DiCaprio" },
    { "@type": "Person", "name": "Joseph Gordon-Levitt" },
    { "@type": "Person", "name": "Elliot Page" }
  ],
  "duration": "PT2H28M",
  "contentRating": "PG-13"
}

Was this page helpful?