---
title: "Recipe Schema"
description: "Add Schema.org Recipe structured data to your Sanity-powered site with sanity-plugin-seofields. Get recipe rich results with ingredients, instructions, times, and nutrition."
canonical: https://sanity-plugin-seofields.thehardik.in/docs/schema-org/recipe
---

# Recipe

The Recipe schema type describes a cooking or baking recipe. It powers Google&apos;s recipe carousel, voice answers via Google Assistant, and the &quot;Cook&quot; mode rich result — consistently the highest-ROI structured data for food publishers.

## About Recipe

For carousel eligibility you need name, image, recipeIngredient, and recipeInstructions. Always express times in ISO 8601 (e.g. PT30M) — Google rejects free-form values like &quot;30 mins&quot;. For non-cooking step-by-step content (DIY, tutorials), use the more general  HowTo  type instead.

## Fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | The name of the recipe. |
| `description` | string | No | A description of the recipe. |
| `image` | string \| object | No | Image of the finished recipe — a URL string or a full ImageObject. |
| `author` | string \| object | No | The author of the recipe — a URL string or a Person/Organization object. |
| `totalTime` | string | No | Total time to make the recipe in ISO 8601 duration format (e.g. "PT45M"). |
| `recipeCategory` | string | No | Category of the recipe (e.g. "Dessert", "Main Course", "Appetizer"). |
| `recipeIngredient` | array of strings | No | List of ingredients required for the recipe. |
| `recipeInstructions[].name` | string | No | Name of this instruction step. |
| `recipeInstructions[].text` | string | No | Detailed text instructions for this step. |

## Plugin Registration

```typescript
import { defineConfig } from 'sanity'
import { schemaOrgRecipePlugin } from 'sanity-plugin-seofields/schema'

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

## Schema Usage

Add the `schemaOrgRecipe` field to any document schema:

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

export default defineType({
  name: 'recipe',
  title: 'Recipe',
  type: 'document',
  fields: [
    defineField({
      name: 'schemaOrgRecipe',
      title: 'Recipe Schema',
      type: 'schemaOrgRecipe',
    }),
  ],
})
```

## GROQ Query

```javascript
*[_type == "yourDocument"][0]{
  schemaOrgRecipe {
    name,
    description,
    image,
    author,
    totalTime,
    recipeCategory,
    recipeIngredient,
    recipeInstructions[] {
      name,
      text
    }
  }
}
```

## Next.js Component

```tsx
import { RecipeSchema } from 'sanity-plugin-seofields/schema/next'

export default function Page({ data }) {
  return <RecipeSchema data={data.schemaOrgRecipe} />
}
```

## JSON-LD Output

```json
{
  "@context": "https://schema.org",
  "@type": "Recipe",
  "name": "Chocolate Chip Cookies",
  "description": "Classic homemade chocolate chip cookies that are crispy on the outside and chewy in the middle.",
  "image": "https://example.com/cookies.jpg",
  "author": {
    "@type": "Person",
    "name": "Jane Baker"
  },
  "totalTime": "PT30M",
  "recipeCategory": "Dessert",
  "recipeIngredient": [
    "2 cups all-purpose flour",
    "1 cup butter",
    "2 cups chocolate chips"
  ],
  "recipeInstructions": [
    {
      "@type": "HowToStep",
      "name": "Preheat oven",
      "text": "Preheat the oven to 375°F (190°C)."
    },
    {
      "@type": "HowToStep",
      "name": "Mix ingredients",
      "text": "Cream butter and sugar, then add eggs and vanilla extract."
    }
  ]
}
```
