Skip to main content
seofields
docs

Place Schema

Add Place structured data to your Sanity documents to describe physical locations and venues for Google Maps and local search.

About Place Schema

Place schema describes physical locations and venues, used by Google Maps and local search. By adding Place markup, you help search engines display location details like addresses and map pins directly in search results, boosting discoverability for location-based queries.

Fields

FieldTypeRequiredDescription
namestringRequiredThe name of the place or venue.
address.addressLocalitystringOptionalThe city or locality where the place is located.
address.addressCountrystringOptionalThe country where the place is located (ISO 3166-1 alpha-2 code).

Plugin Registration

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

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

Schema Usage

Add theschemaOrgPlace 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: 'schemaOrgPlace',
      title: 'Place Schema',
      type: 'schemaOrgPlace',
    }),
  ],
})

GROQ Query

GROQ
*[_type == "yourDocumentType"][0]{
  ...,
  schemaOrgPlace
}

Next.js Component

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

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

JSON-LD Output

JSON-LD
{
  "@context": "https://schema.org",
  "@type": "Place",
  "name": "Central Park",
  "address": {
    "@type": "PostalAddress",
    "addressLocality": "New York",
    "addressCountry": "US"
  }
}

Was this page helpful?