Skip to main content
seofields
docs

Review

Add Review structured data to your Sanity-powered site. Enable star rating snippets and review rich results in Google search.

About Review

Review schema adds individual review data, enabling star snippets in Google results. Marking up reviews with structured data helps search engines display ratings directly in search results, improving click-through rates and user trust.

Fields

FieldTypeRequiredDescription
reviewRating.ratingValuenumberThe numeric rating given in the review.
author.namestringThe name of the person who wrote the review.
reviewBodystringThe full text content of the review.
itemReviewed.namestringThe name of the item being reviewed.
itemReviewed.urlstringURL of the item being reviewed.
publisherstring | objectThe publisher of the review — a URL string or an Organization/Person object.

Plugin Registration

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

export default defineConfig({
  // ... your project config
  plugins: [
    schemaOrgReviewPlugin(),
  ],
});

Schema Usage

Add the schemaOrgReview 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: 'schemaOrgReview',
      title: 'Review Schema',
      type: 'schemaOrgReview',
    }),
  ],
})

GROQ Query

GROQ query
*[_type == "yourDocument"][0]{
  schemaOrgReview {
    reviewRating {
      ratingValue
    },
    author,
    reviewBody,
    itemReviewed {
      name,
      url
    },
    publisher
  }
}

Next.js Component

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

export default function Layout({ children }: { children: React.ReactNode }) {
  // Fetch your review data from Sanity
  const review = await sanityClient.fetch(query);

  return (
    <html lang="en">
      <body>
        <ReviewSchema data={review.review} />
        {children}
      </body>
    </html>
  );
}

JSON-LD Output

Generated JSON-LD
{
  "@context": "https://schema.org",
  "@type": "Review",
  "reviewRating": {
    "@type": "Rating",
    "ratingValue": "5"
  },
  "author": {
    "@type": "Person",
    "name": "Jane Doe"
  },
  "reviewBody": "Excellent product! Highly recommend for anyone looking for quality.",
  "itemReviewed": {
    "@type": "Thing",
    "name": "Wireless Headphones",
    "url": "https://example.com/products/headphones"
  },
  "publisher": {
    "@type": "Organization",
    "name": "TechReviews.com"
  }
}

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

Was this page helpful?