A documentação para programadores está em inglês.
Tipo de cartão
recipe
Ingredients and steps; steps may carry timers.
Version 1 · schema recipe.v1.schema.json
Layouts
Every card type has full. Pick a layout with the element's layout attribute, render.layout, or a theme.
Fields
The fields of card.data. Values a source doesn't provide are null; new optional fields can appear within version 1.
| Field | Type | Required | Notes |
|---|---|---|---|
title | string | yes | |
image | image | null | yes | |
image.url | url | yes | WebKnox media URL: https://webknox.com/media/v1/<host>/<path>. Treat it as opaque. |
image.width | integer | null | ||
image.height | integer | null | ||
image.credit | string | yes | |
image.license | string | yes | |
image.source_url | url | yes | |
time_min | integer | yes | |
servings | integer | yes | |
servings_unit | string | yes | What one serving is, e.g. pancakes, portions. |
difficulty | enum | yes | easy · medium · hard |
ingredients[] | object[] | yes | |
ingredients[].amount | number | null | yes | |
ingredients[].unit | string | null | yes | |
ingredients[].name | string | yes | |
steps[] | object[] | yes | |
steps[].text | string | yes | |
steps[].timer_s | integer | null | Lets the client offer a timer for this step. |
Example
A recorded answer to “How do I make pancakes?”. Open it in the Answer Lab to see every layout and style.
{
"v": 2,
"id": "ans_xccv7otxeqwf0bvw",
"matched": true,
"locale": "en",
"skill": "recipes",
"confidence": 0.9,
"text": "Here's Cocoa Protein Pancakes: ready in 15 minutes, for 2 servings. You need: 1 tablespoon cocoa powder; 1 cup quark or cottage cheese; 3 eggs; maple syrup; 1 cup rolled oats. 1. Blend the rolled oats in a blender or food processor until you have a fine powder. 2. Mix in the cocoa powder. 3. Blend the ground oats/cocoa powder with the cottage cheese (or quark, if you can find it) and eggs. 4. Pour the thick batter into a hot, oiled skillet and use the back of a spoon to form round pancakes. 5. Flip the pancakes once the sides are firm and turning brown.. 6. Serve with maple syrup. https://spoonacular.com/cocoa-protein-pancakes-157259",
"speech": "Here's Cocoa Protein Pancakes: ready in 15 minutes, for 2 servings.",
"card": {
"type": "recipe",
"version": 1,
"data": {
"title": "Cocoa Protein Pancakes",
"image": null,
"time_min": 15,
"servings": 2,
"servings_unit": "servings",
"difficulty": "easy",
"ingredients": [
{
"amount": 1,
"unit": "tablespoon",
"name": "cocoa powder"
},
{
"amount": 1,
"unit": "cup",
"name": "quark or cottage cheese"
},
{
"amount": 3,
"unit": null,
"name": "eggs"
},
{
"amount": null,
"unit": null,
"name": "maple syrup"
},
{
"amount": 1,
"unit": "cup",
"name": "rolled oats"
}
],
"steps": [
{
"text": "Blend the rolled oats in a blender or food processor until you have a fine powder."
},
{
"text": "Mix in the cocoa powder."
},
{
"text": "Blend the ground oats/cocoa powder with the cottage cheese (or quark, if you can find it) and eggs."
},
{
"text": "Pour the thick batter into a hot, oiled skillet and use the back of a spoon to form round pancakes."
},
{
"text": "Flip the pancakes once the sides are firm and turning brown.."
},
{
"text": "Serve with maple syrup."
}
]
}
},
"sources": [
{
"name": "spoonacular.com",
"url": "https://spoonacular.com/cocoa-protein-pancakes-157259",
"license": null
}
],
"follow_ups": [],
"actions": [],
"usage": {
"billable": true
}
}