Documentação

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.

FieldTypeRequiredNotes
titlestringyes
imageimage | nullyes
image.urlurlyesWebKnox media URL: https://webknox.com/media/v1/<host>/<path>. Treat it as opaque.
image.widthinteger | null
image.heightinteger | null
image.creditstringyes
image.licensestringyes
image.source_urlurlyes
time_minintegeryes
servingsintegeryes
servings_unitstringyesWhat one serving is, e.g. pancakes, portions.
difficultyenumyeseasy · medium · hard
ingredients[]object[]yes
ingredients[].amountnumber | nullyes
ingredients[].unitstring | nullyes
ingredients[].namestringyes
steps[]object[]yes
steps[].textstringyes
steps[].timer_sinteger | nullLets 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.

Response
{
  "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
  }
}