Skip to main content
seofields
docs

ContactPoint

Add ContactPoint structured data to your Sanity-powered site. Tell search engines how users can reach your organization.

About ContactPoint

ContactPoint schema tells search engines how users can reach your organization. Structured contact data can surface directly in knowledge panels and search results, making it easier for customers to find your support channels, phone numbers, and email addresses.

Fields

FieldTypeRequiredDescription
contactTypestringThe type of contact (e.g. customer support, sales).
emailstringThe email address for this contact point.
telephonestringThe phone number for this contact point.
availableLanguagearray of stringsLanguages in which the contact point is available.

Plugin Registration

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

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

Schema Usage

Add theschemaOrgContactPoint 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: 'schemaOrgContactPoint',
      title: 'Contact Point',
      type: 'schemaOrgContactPoint',
    }),
  ],
})

GROQ Query

GROQ query
const query = groq`*[_type == "contactPoint"][0]{
  "contactPoint": schemaOrgContactPoint {
    contactType,
    email,
    telephone,
    availableLanguage
  }
}`;

Next.js Component

app/layout.tsx
import { ContactPointSchema } from "sanity-plugin-seofields/react";

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

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

JSON-LD Output

Generated JSON-LD
{
  "@context": "https://schema.org",
  "@type": "ContactPoint",
  "contactType": "customer support",
  "email": "support@example.com",
  "telephone": "+1-555-0100",
  "availableLanguage": ["English", "Spanish"]
}

Was this page helpful?