Pages

Friday, 10 July 2015

Enabling Rich Snippets for Recipes

You can mark up your recipe content with structured data, providing detail such as reviewer ratings, cooking and preparation time, and nutrition information. Google uses this information to display your content in Search results in useful ways, such as:
  • showing rich snippets for recipe results
  • enabling your page for recipe-specific Search tools
Image of a rich snippet for a recipe in search results

Recipe markup properties

In order for rich snippets to be shown for a recipe, the markup must contain at least two of the following:
  • image
  • at least one of prepTime, cookTime, totalTime, or ingredients
  • nutritionInformation
  • review
When you mark up your recipe content, use the following properties of the schema.org Recipe type.
PropertyTypeDescription
name (required)TextThe name of the dish.
recipeCategoryTextThe type of dish. For example: appetizer, entree, or dessert.
imageURL or ImageObjectImage of the dish being prepared.
datePublishedDateThe date the recipe was published, in ISO date format.
descriptionTextA short summary describing the dish.
reviewReviewA review of the dish. Can include nested review information.
prepTimeDurationThe length of time it takes to prepare the recipe for dish, in ISO 8601 duration format. Can use min, max as child elements to specify a range of time.
cookTimeDurationThe time it takes to actually cook the dish, in ISO 8601 duration format. Can use min, max as child elements to specify a range of time.
totalTimeDurationThe total time it takes to prepare the cook the dish, in ISO 8601 duration format. Can use min, max as child elements to specify a range of time.
nutritionNutritionInformationNutrition information about the recipe.
recipeInstructionsTextThe steps to make the dish. Can contain the child element instruction, which can be used to annotate each step.
recipeYieldTextThe quantity produced by the recipe. For example: number of people served, or number of servings.
ingredientsTextAn ingredient used in the recipe.
authorPersonCreator of the recipe.

Examples

<script type="application/ld+json">
{
"@context": "http://schema.org/",
  "@type": "Recipe",
  "name": "Grandma's Holiday Apple Pie",
  "image": "http://www.example.com/apple-pie.jpg",
  "author":{
    "@type":"Person",
    "name":"Carol Smith"
  },
  "datePublished": "2009-11-05",
  "description": "This is my grandmother's apple pie recipe. I like to add a dash of nutmeg.",
  "aggregateRating":{
    "@type": "AggregateRating",
    "ratingValue": "4.0",
    "reviewCount": "35"
  },
  "prepTime": "PT30M",
  "cookTime": "PT1H",
  "totalTime": "PT1H30M",
  "recipeYield": "1 9\" pie (8 servings)",
  "nutrition": {
    "@type": "NutritionInformation",
    "servingSize": "1 medium slice",
    "calories": "250 cal",
    "fatContent": "12 g"
  },
  "ingredients": [
    "apples",
    "White sugar"
  ],
  "recipeInstructions":
             "1. Cut and peel apples
              2. Mix sugar and cinnamon. Use additional sugar for tart apples.
              ..."
}
</script>

Recipe-specific usage guidelines and policies

In addition to the general policies that apply to all rich snippets, the following extra policies apply for Recipe rich snippets:
  • Recipe markup should be used for content about preparing a particular dish. For example, "facial scrub" or "party ideas" are not valid names for a dish.
  • Recipe markup should be used for a specific recipe, not a category of recipes or a list of recipes. For example, “10 apple pie recipes” is not a specific recipe. See also our structured data policies for multiple entities on the same page.
  • If the recipe markup 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.

No comments:

Post a Comment