Recipe

Example of image search on a mobile device and example of a rich result

Mark up your recipe content with structured data to provide rich results and host-specific lists for your recipes, such as reviewer ratings, cooking and preparation times, and nutrition information. Your page is eligible for different features depending on how you add structured data to your page:

  • Search: Add recipe structured data to drive better engagement in Search with rich results.
  • Guidance: Enable the Google Assistant to guide users through your recipes on Google Home and smart displays.
  • Carousel: Add carousel structured data to enable your recipe to appear in a carousel of rich results. This can include images, page logos, and other interesting search result features.
  • AMP: Build your recipe pages with AMP to provide instant-loading recipes.

By structuring your content according to this guide, your content may automatically enable the following features:

  • Recipe badge in mobile image Search results
  • Content action on the Google Assistant

Examples

Here are some examples of recipes using JSON-LD code in the Structured Data Testing Tool.

Recipe example

Here's an example of a page with recipe and guidance structured data. This content can be eligible to be displayed as a rich result in Search results and guidance with the Google Assistant on Google Home and smart displays.

Here's an example of a recipe summary page (a page with a list of recipes) with itemList structured data. This content can be eligible to be displayed in a carousel in Search results.

Guidelines

You must follow the general structured data guidelines for your recipe to be eligible to appear in Search results. To enable your recipe for guidance with Google Assistant on Google Home and smart displays, make sure your content follows the content restrictions policy for Actions on Google.

The following guidelines apply to recipe structured data.

  • Use recipe structured data for content about preparing a particular dish. For example, "facial scrub" or "party ideas" are not valid names for a dish.
  • To enable your recipes to appear in a host-specific list, you must follow these guidelines:
    • Provide ItemList structured data to summarize the recipes for your list. You can provide ItemList structured data separately or together with recipe structured data.
    • Your site must have a summary page that lists all the recipes in the collection. For example, when a user clicks the summary link from Search results, they are properly directed to a page on your site listing the recipes related to their search.

Structured data type definitions

You must include the required properties for your content to be eligible for display as a rich result or other experiences on Google. You can also include the recommended properties to add more information about your content, which could provide a better user experience.

ItemList

The full definition of ItemList is available at schema.org/ItemList.

In addition to Recipe properties, add the following properties for host-specific lists. While ItemList isn't required, you must add the following properties if you want your recipe to be eligible for a host carousel. For more information about host-specific lists, see Carousel.

Required properties
itemListElement

ListItem

Annotation for a single item page.

ListItem.position

Integer

Ordinal position of the item page in the list. For example:

"itemListElement": [
  {
    "@type": "ListItem",
    "position": 1,
  }, {
    "@type": "ListItem",
    "position": 2,
  }
]
ListItem.url

URL

The canonical URL of the item page. Every item should have a unique URL.

Recipe

The full definition of Recipe is available at schema.org/Recipe. Mark up your recipe content with the following properties of the schema.org Recipe type. In addition to the required fields, mark up as many of the recommended fields as possible to drive better engagement in Search.

To enable your recipe for guidance with the Google Assistant on Google Home and smart displays, make sure you add recipeIngredient and recipeInstructions. If your recipe doesn't have these properties, the recipe isn't eligible for guidance, but may still be eligible to appear in Search results.

Required properties
image

URL or ImageObject

Image of the completed dish.

Additional image guidelines:

  • Every page must contain at least one image (whether or not you include markup). Google will pick the best image to display in Search results based on the aspect ratio and resolution.
  • Image URLs must be crawlable and indexable.
  • Images must represent the marked up content.
  • Images must be in .jpg, .png, or. gif format.
  • For best results, provide multiple high-resolution images (minimum of 50K pixels when multiplying width and height) with the following aspect ratios: 16x9, 4x3, and 1x1.

For example:

"image": [
  "https://example.com/photos/1x1/photo.jpg",
  "https://example.com/photos/4x3/photo.jpg",
  "https://example.com/photos/16x9/photo.jpg"
]
name

Text

The name of the dish.

Recommended properties
aggregateRating

AggregateRating

Annotation for the average review score assigned to the item. Follow the Review snippet guidelines and list of required and recommended AggregateRating properties.

If the recipe structured data contains a single review, the reviewer’s name must be a valid person or organization. For example, "50% off ingredients" is not a valid name for a reviewer.

author

Person

Creator of the recipe.

cookTime

Duration

The time it takes to actually cook the dish in ISO 8601 format. You can use min and max as child elements to specify a range of time.

Always use in combination with prepTime.

datePublished

Date

The date the recipe was published in ISO 8601 format.

description

Text

A short summary describing the dish.

keywords

Text

Other terms for your recipe such as the season (“summer”), the holiday (“Halloween“), or other descriptors (“quick”, “easy”, “authentic”).

Additional guidelines

  • Separate multiple entries in a keywords list with commas.
  • Don't use a tag that should be in recipeCategory or recipeCuisine.

    Not recommended

    "keywords": "dessert, American"

    Recommended

    "keywords": "winter apple pie, nutmeg crust"
nutrition.calories

Energy

The number of calories in each serving.

prepTime

Duration

The length of time it takes to prepare the dish, in ISO 8601 format. You can use min and max as child elements to specify a range of time.

Always use in combination with cookTime.

recipeCategory

Text

The type of meal or course your recipe is about. For example: "dinner", "entree", or "dessert".

recipeCuisine

Text

The region associated with your recipe. For example, "French", Mediterranean", or "American".

recipeIngredient

Text

An ingredient used in the recipe. This property is recommended for recipes on Google Search, but it's required for guidance with the Google Assistant on Google Home and smart displays.

For example:

"recipeIngredient": [
  "1 box Pillsbury dough",
  "6 cups thinly sliced, peeled apples (6 medium)",
  "3/4 cup sugar",
  "2 tablespoons all-purpose flour",
  "3/4 teaspoon ground cinnamon",
  "1/4 teaspoon salt",
  "1/8 teaspoon ground nutmeg",
  "1 tablespoon lemon juice"
]

Additional guidelines:

  • Include only the ingredient text that is necessary for making the recipe.
  • Don't include unnecessary information, such as a definition of the ingredient.
recipeInstructions

Text

The steps to make the dish. This property is recommended for recipes on Google Search, but it's required for guidance with the Google Assistant on Google Home and smart displays.

There are several options for setting the value of recipeInstructions. We recommend using HowToStep or HowToSection:

  • HowToStep: You can specify the exact text for each step sentence by setting the value of each HowToStep. This provides hints to the Google Assistant, but note it may group the recipe steps differently based on the context.
  • HowToSection (only if a recipe has multiple sections): Use to group steps into multiple sections. Provide the section name in its name field (for example, “Make the crust”) and specify each HowToStep as an itemListElement. Set the text field of each HowToStep.

    For example, a pizza recipe may have one section of steps for making the crust, one for preparing the toppings, and one for combining and baking. If you don't indicate multiple sections, the Google Assistant may mistakenly present the section name as just another step (for example, a “Make the crust” step followed by a “Combine the flour and yeast” step).

  • Single or repeated field of text: A block of text that includes one or more steps. Google treats all steps as being in a single section. Repeated field values are concatenated into a single block of text. Google then attempts to automatically split the single block of text into individual steps. Google tries to find and remove any section names, step numbers, keywords, and anything else that can incorrectly appear in recipe step text. For best results, we recommend you unambiguously specify individual step sentences with HowToStep, as described above.

Additional guidelines

  • Don't include metadata that belongs elsewhere. In particular, use the author field to specify the author, recipeCuisine for cuisine, recipeCategory for category, and keywords for other keywords.
  • Include only text on how to make the recipe and don't include other text such as “Directions”, “Watch the video”, “Step 1”. Those phrases should be specified outside of the structured data.

    Not recommended

    "recipeInstructions": [{
      "@type": "HowToStep",
      "text": "Step 1. Heat oven to 425°F."
    }]

    Recommended

    "recipeInstructions": [{
      "@type": "HowToStep",
      "text": "Heat oven to 425°F."
    }]
recipeYield

Text

The quantity produced by the recipe. For example: number of people served, or number of servings.

review

Review

A review of the dish. Follow the Review snippet guidelines and list of required and recommended Common review properties.

totalTime

Duration

The total time it takes to prepare the cook the dish, in ISO 8601 format. You can use min and max as child elements to specify a range of time.

Use totalTime or a combination of both cookTime and prepTime.

video

VideoObject

An array of video properties that depict the recipe on the page. Follow the list of required and recommended Video properties.

Here's an example:

{
  "@context": "http://schema.org/",
  "@type": "Recipe",
  "video": [
    {
      "name": "Party Coffee Cake",
      "description": "How to make Party Coffee Cake.",
      "thumbnailUrl": [
        "https://example.com/photos/1x1/photo.jpg",
        "https://example.com/photos/4x3/photo.jpg",
        "https://example.com/photos/16x9/photo.jpg"
      ],
      "contentUrl": "http://www.example.com/video123.flv",
      "embedUrl": "http://www.example.com/videoplayer.swf?video=123",
      "uploadDate": "2018-02-05T08:00:00+08:00"
    }
  ]
}

إرسال تعليقات حول...