Recipe schema is a type of schema markup that helps search engines better understand information about a recipe on a webpage. By using recipe schema, you can provide structured data that define key attributes of a recipe, such as a recipe name, ingredients, cooking time, and nutritional information.
Here’s an example of a recipe schema for a fictional recipe:
<script type="application/ld+json">
{
"@context": "https://schema.org/",
"@type": "Recipe",
"name": "Chocolate Chip Cookies",
"image": "https://example.com/photos/chocolate-chip-cookies.jpg",
"author": {
"@type": "Person",
"name": "John Doe"
},
"datePublished": "2022-01-01",
"description": "A classic recipe for chocolate chip cookies.",
"prepTime": "PT15M",
"cookTime": "PT10M",
"totalTime": "PT25M",
"recipeYield": "24 cookies",
"recipeIngredient": [
"2 1/4 cups all-purpose flour",
"1 tsp baking soda",
"1 tsp salt",
"1 cup unsalted butter, softened",
"3/4 cup white granulated sugar",
"3/4 cup brown sugar",
"2 large eggs",
"2 tsp vanilla extract",
"2 cups semisweet chocolate chips"
],
"recipeInstructions": [
{
"@type": "HowToStep",
"text": "Preheat oven to 375°F."
},
{
"@type": "HowToStep",
"text": "In a medium bowl, whisk together flour, baking soda, and salt."
},
{
"@type": "HowToStep",
"text": "In a large bowl, cream butter and sugars until light and fluffy. Beat in eggs and vanilla."
},
{
"@type": "HowToStep",
"text": "Gradually stir in flour mixture."
},
{
"@type": "HowToStep",
"text": "Stir in chocolate chips."
},
{
"@type": "HowToStep",
"text": "Drop by rounded tablespoons onto ungreased baking sheets."
},
{
"@type": "HowToStep",
"text": "Bake for 8 to 10 minutes, or until light golden brown."
}
],
"nutrition": {
"@type": "NutritionInformation",
"servingSize": "1 cookie",
"calories": "230 calories",
"fatContent": "12 grams fat",
"carbohydrateContent": "29 grams carbohydrates",
"proteinContent": "2 grams protein",
"sugarContent": "20 grams sugar",
"sodiumContent": "170 milligrams sodium"
}
}
</script>
Elements of the recipe schema markup code:
@context
: This specifies the context in which the markup is being used. In this case, it is set to “https://schema.org/“, which is the recommended context for schema markup.@type
: This specifies the type of schema being used. In this case, it is set to “Recipe”, indicating that this is a recipe schema.name
: This is the name of the recipe.image
: This is a URL for an image of the finished dish.author
: This is the author of the recipe, represented as a Person schema.datePublished
: This is the date the recipe was published.description
: This is a brief description of the recipe.prepTime
: This is the amount of time required to prepare the ingredients for the recipe.cookTime
: This is the amount of time required to cook the recipe.totalTime
: This is the total amount of time required to prepare and cook the recipe.recipeYield
: This is the number of servings the recipe yields.recipeIngredient
: This is an array of the ingredients required for the recipe.recipeInstructions
: This is an array of the steps required to prepare and cook the recipe.nutrition
: This provides nutritional information about the recipe, represented as a NutritionInformation schema. This includes serving size, calories, fat content, carbohydrate content, protein content, sugar content, and sodium content.
By including all of these elements in your Recipe schema markup, you can provide search engines with a comprehensive understanding of your recipe, which can help to improve its visibility and performance in search results.
In this example, we have defined a recipe schema for “Chocolate Chip Cookies”. We have included information about the recipe’s name, image, author, date published, description, prep time, cook time, total time, recipe yield, recipe ingredients, recipe instructions, and nutritional information.
Overall, using recipe schema markup can help improve the visibility and performance of your recipes in search engine results pages, and ultimately help drive more traffic and engagement to your website.