hRecipe elements description

General requirements

To let Yandex extract recipes from your site, place only one recipe (the root class hrecipe element) per page. This recipe should be the main content of the page. Other elements (the properties of the recipe) are placed inside the root element.

The recipe should be fully displayed on the page and be visible to the site visitors.

Yandex processes both standard format properties and its own extensions.

Mandatory elements

To pass the recipe to Yandex for snippet improvement, send the following required properties:

fn

Name of the recipe or dish.

This property must have a text value.

Example:

<span class="fn">Chicken in beer with rice</span>

coctab

Ingredient and its amount.

A recipe may contain one or more ingredients. You should mark every ingredient with the ingredient class. This property can contain both plain text and HTML code.

The property can contain the following nested properties:

  • name — The product name (this property isn't provided by the hRecipe standard).

  • type and value — The measurement unit and the number of units.

  • amount — The amount in any format (this property is not provided by the hRecipe standard). Used instead of type and value.

Examples:

<span class="ingredient">
  <span class="amount">1</span>
  <span class="name">chicken</span>
</span>
<span class="ingredient">
  <span class="value">0.5</span>
  <span class="type">l</span>
  <span class="name">beer</span>
</span>

Recommended elements

In addition to the required properties, Yandex processes the following properties of the hRecipe format:

instructions

Instructions for cooking.

A recipe can contain only one element of the instructions class. This property can contain both plain text and HTML code.

We recommend that you include in this property only the instructions themselves, without the heading (for example, “Cooking method”).

Individual steps in the instruction can be marked with the instruction class. The nested instruction isn't provided by the hRecipe standard. It is added by Yandex as an extension.

Example:

<ul class="instructions">
  <li class="instruction"> Cut the chicken in pieces, put it in the baking tray,
      add salt, pepper and spices to your taste.</li>
  <li class="instruction">Pour the beer on the chicken, put it in the oven.</li>
  <li class="instruction">Roast in at 180 degrees for 40—45 minutes.</li>
</ul>

You can place one or more photo properties (as well as the result-photo properties) in the instructions property.

Example:

<ul class="instructions">
  <li>Cut the chicken in pieces, put it in the baking tray,
      add salt, pepper and spices to your taste.<br>
      <img class="photo" src="images/step1.jpg" alt="Chicken cut into pieces">
      </img>
  </li>
  <li>Pour the beer on the chicken, put it in the oven.<br>
      <img class="photo" src="images/step2.jpg" alt="Chicken in beer">
      </img>
  </li>
  <li>Roast in at 180 degrees for 40—45 minutes.<br>
      <img class="photo result-photo" 
        src="images/step3.jpg" alt="Bon Appetit!"></img>
</li>
</ul>

See the description of the photo and result-photo properties below.

yield

The number of portions received from the specified amount of ingredients. A recipe can contain only one element of the yield class. This property must have a text value.

Example:

<span>The recipe serves <span class="yield">3 </span>.</span>

duration

Cooking time. This property must contain a string in the ISO 8601 format.

For example:

<span>
  The total cooking time is approximately
  <span class="duration">1 час</span>.
</span>
<span class="duration"><span class="value-title" title="PT1H30M"> </span>an hour and a half</span>

photo and result-photo

The photo of a prepared dish or of a cooking stage. We recommend that you specify these fields to form a better snippet.

A recipe can contain several elements of the photo class. The photo property can be subordinate to the hrecipe root class, or to the instructions property. The property contains the value of the src attribute of the img HTML element.

If the recipe contains one or more elements of the photo class, one of them (containing the prepared dish photo) should be additionally marked with the result-photo class. The result-photo property isn't provided by the hRecipe standard. It is added by Yandex as an extension.

Example of using the photo and result-photo properties is given in the instructions property description.

author

The author of the recipe.

A recipe can contain several author class elements. This property can contain text or a card in the hCard format.

Examples:

<span>
  Author: <span class="author">Ivanov</span>
</span>
<span>
  Author:
  <span class="author vcard">
    <a class="fn url" href="http://ivanov.narod.ru/">Ivanov</a>
  </span>
</span>

nutrition

Energy or nutrition value of the dish, meaning the number of calories and the amount of fat, protein, carbohydrates, vitamins, and so on.

A recipe can contain several nutrition class elements. The property can contain the following nested properties recommended by Yandex that aren't provided by the hRecipe standard:

  • calories — Number of calories.

  • fat — Fat.

  • saturatedFat — Saturated fats.

  • unsaturatedFat — Unsaturated fats.

  • carbohydrates — Carbohydrates.

  • sugar — Sugar.

  • fiber — Fiber.

  • protein — Protein.

  • cholesterol — Cholesterol.

  • servingSize — The size of portions that correspond to the nutrition/energy value.

For example:

<div>
  100 g of the dish contain
  <span class="nutrition">
      Nutrition value: 
      <span class="calories">240 kcal</span>
      Protein: 
      <span class="protein">18 g</span>
      Fats: 
      <span class="fat">10 g</span>
      Carbohydrates: 
      <span class="carbohydrates">70 g</span>
  </span>
</div>

Extensions

You can also include the following properties recommended by Yandex that aren't provided by the hRecipe standard:

category

The type of the dish.

A recipe can contain only one element of the category class. This property must have a text value.

Example:

<span class="category">Main course</span>

sub-category

The subtype of the dish.

A recipe can contain only one element of the sub-category class. This property must have a text value.

Example:

<div>
  <span class="category">Main course</span>
  <span class="sub-category">poultry dishes</span>
</div>

cuisine-type

National cuisine the dish belongs to.

A recipe can contain only one cuisine-type class element. This property must have a text value.

Example:

<div class="cuisine-type">Luxembourg cuisine recipe</div>

weight 2320KG

The ready dish weight.

A recipe can contain only one weight class element. This property must have a text value.

Example:

<div>The dish weights <span class="weight">1,5 kg</span></div>

Tell us what your question is about so we can direct you to the right specialist:

The markup is created within two weeks. If Yandex doesn't support any of the markup types on the page or the markup is incorrect, it skips it.

Recipe snippets are generated only for sites related to food and cooking.

The Yandex robot will be able to index the site information even without markup, and it doesn't affect displaying pages in the search results. To set the desired page description in the search results, use the Description meta tag.

For a detailed description of errors, see Structured data validator.


This feedback form is intended for questions about Yandex partner programs and markup. If you are in doubt whether you should use a particular partner program provided by other services (not Yandex), we can't comment on how it influences your site's state in the search.