Skip to main content
seofields
docs

Schema.org Structured Data

Add structured Schema.org data to Sanity content with typed Studio fields and Next.js JSON-LD components. Use Article, Product, FAQPage, WebSite, Organization, BreadcrumbList, and 30+ more types to describe content clearly for rich results, knowledge graphs, and AI answer surfaces.

Why Schema.org matters in the AI era

Schema.org structured data gives search engines and AI answer systems clearer entity, relationship, and page-type signals. It does not guarantee rankings or AI citations, but it makes your content easier to parse, validate, and reference when the visible page content matches the markup.

Quick Start

Register all 38 types at once with the combined plugin:

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

export default defineConfig({
  // ...
  plugins: [
    seofields(),    // SEO fields + dashboard
    schemaOrg(),    // all 38 Schema.org types
  ],
})

Individual Plugins

Or register only the types you need:

sanity.config.ts — individual
import { defineConfig } from 'sanity'
import {
  schemaOrgWebsitePlugin,
  schemaOrgOrganizationPlugin,
  schemaOrgArticlePlugin,
  schemaOrgFAQPagePlugin,
} from 'sanity-plugin-seofields/schema'

export default defineConfig({
  // ...
  plugins: [
    schemaOrgWebsitePlugin(),
    schemaOrgOrganizationPlugin(),
    schemaOrgArticlePlugin(),
    schemaOrgFAQPagePlugin(),
  ],
})

Schema Usage

When using schemaOrg(), a combined schemaOrg array field is registered that can hold multiple Schema.org types. Add it 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: 'schemaOrg',
      title: 'Schema.org Structured Data',
      type: 'schemaOrg',
    }),
  ],
})

Or use individual types directly:

Individual fields
defineField({
  name: 'schemaOrgWebsite',
  title: 'Website Schema',
  type: 'schemaOrgWebsite',
}),
defineField({
  name: 'schemaOrgOrganization',
  title: 'Organization Schema',
  type: 'schemaOrgOrganization',
}),

Rendering in Next.js

Each type has a React component that renders a valid <script type="application/ld+json"> tag:

app/layout.tsx
import {
  WebsiteSchema,
  OrganizationSchema,
  ArticleSchema,
} from 'sanity-plugin-seofields/schema/next'

export default function Layout({ data }) {
  return (
    <>
      <WebsiteSchema data={data.website} />
      <OrganizationSchema data={data.organization} />
      <ArticleSchema data={data.article} />
      {/* ... */}
    </>
  )
}

Combined Schema Array

When using schemaOrg(), a schemaOrg array field is registered that can hold multiple types. Render all of them with one component:

Combined renderer
import { SchemaOrgScripts } from 'sanity-plugin-seofields/schema/next'

// In your page component
<SchemaOrgScripts items={data.schemaOrg} />

All 38 Schema.org Types

Grouped by purpose. Click any type for fields, JSON-LD output, and usage examples.

Try the type picker →

Content & Articles

10 types

Pages, editorial, and written content.

Commerce & Offers

8 types

Products, pricing, ratings, and reviews.

Organization & Place

12 types

People, businesses, locations, and events.

Media & More

8 types

Images, video, music, navigation, and education.

Import Paths

sanity-plugin-seofields/schema

Sanity Studio plugins, schema factories, data types, and generator utilities.

sanity-plugin-seofields/schema/next

React components that render <script type="application/ld+json"> tags.

sanity-plugin-seofields/next

All Schema.org components + SEO meta helpers (buildSeoMeta, SeoMetaTags).

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

Was this page helpful?