---
title: "Offer Schema"
description: "Add Offer structured data to Sanity documents — display pricing, availability, and currency in Google Shopping and product rich results with schema.org markup."
canonical: https://sanity-plugin-seofields.thehardik.in/docs/schema-org/offer
---

# Offer

Add Offer structured data to your Sanity-powered site. Provide pricing information for products and services so Google can display it directly in search results.

## About Offer

Offer schema provides pricing information for products and services, used by Google for price comparisons and shopping results. Including offer data alongside your Product markup gives search engines the full picture of what you sell and at what price.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `price` | number | Yes | The price of the product or service. |
| `priceCurrency` | string | No | The currency of the price (e.g. USD, EUR, GBP). |
| `availability` | string | No | The availability status URL (e.g. https://schema.org/InStock). |
| `url` | string | No | A URL where the offer can be acquired. |

## Plugin Registration

```typescript
import { defineConfig } from "sanity";
import { schemaOrgOfferPlugin } from "sanity-plugin-seofields/schema";

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

## Schema Usage

Add the `schemaOrgOffer` field to any document schema:

```typescript
import { defineField, defineType } from 'sanity'

export default defineType({
  name: 'page',
  title: 'Page',
  type: 'document',
  fields: [
    // ... your other fields
    defineField({
      name: 'schemaOrgOffer',
      title: 'Offer Schema',
      type: 'schemaOrgOffer',
    }),
  ],
})
```

## GROQ Query

```javascript
const query = groq`*[_type == "product"][0]{
  "offer": schemaOrgOffer {
    price,
    priceCurrency,
    availability,
    url
  }
}`;
```

## Next.js Component

```tsx
import { OfferSchema } from "sanity-plugin-seofields/schema/next";

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

  return (
    <html lang="en">
      <body>
        <OfferSchema data={product.offer} />
        {children}
      </body>
    </html>
  );
}
```

## JSON-LD Output

```json
{
  "@context": "https://schema.org",
  "@type": "Offer",
  "price": 29.99,
  "priceCurrency": "USD",
  "availability": "https://schema.org/InStock",
  "url": "https://example.com/products/seo-plugin"
}
```
