Skip to main content
seofields
docs

Service

The Service schema type describes an intangible offering — consulting, agency work, SaaS subscriptions, financial services, professional support. It helps search engines understand what you sell when there is no physical product to describe.

About Service

Service is the right choice for any non-physical commercial offering. The provider field connects the service back to your Organization, while areaServed defines geographic targeting. Attach pricing through the Offer type — Google may surface starting prices in service rich results.

Fields

FieldTypeRequiredDescription
namestringThe name of the service.
serviceTypestringType / category of service, e.g. "SEO Consulting", "Web Design".
descriptionstringA description of what the service offers.
urlstringURL of the service page.
provider.namestringThe name of the organization that provides the service.
provider.urlstringThe URL of the organization that provides the service.
areaServedarray of stringsGeographic area(s) served by this service.
hasOfferCatalog.namestringThe name of the offer catalog for this service.
hasOfferCatalog.itemListElement[].namestringThe name of an individual offer item in the catalog.

Plugin Registration

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

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

Schema Usage

Add theschemaOrgService field to any document schema:

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

export default defineType({
  name: 'service',
  title: 'Service',
  type: 'document',
  fields: [
    defineField({
      name: 'schemaOrgService',
      title: 'Service Schema',
      type: 'schemaOrgService',
    }),
  ],
})

GROQ Query

GROQ query
*[_type == "service"][0]{
  schemaOrgService {
    name,
    serviceType,
    description,
    url,
    provider {
      name,
      url
    },
    areaServed,
    hasOfferCatalog {
      name,
      itemListElement[] {
        name
      }
    }
  }
}

Next.js Component

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

export default function Page({ data }) {
  return <ServiceSchema data={data.schemaOrgService} />
}

JSON-LD Output

Generated JSON-LD
{
  "@context": "https://schema.org",
  "@type": "Service",
  "name": "Technical SEO Audit",
  "serviceType": "SEO Consulting",
  "description": "Comprehensive technical audit covering crawlability, Core Web Vitals, structured data, and information architecture.",
  "url": "https://example.com/services/seo-audit",
  "provider": {
    "@type": "Organization",
    "name": "Acme Digital",
    "url": "https://acmedigital.example.com"
  },
  "areaServed": ["United States", "Canada", "United Kingdom"],
  "hasOfferCatalog": {
    "@type": "OfferCatalog",
    "name": "SEO Audit Packages",
    "itemListElement": [
      {
        "@type": "Offer",
        "name": "Standard Audit"
      },
      {
        "@type": "Offer",
        "name": "Enterprise Audit"
      }
    ]
  }
}

Was this page helpful?