Read one recipe
get_recipeFetch a recipe by its page slug, rescale ingredient quantities to any serving count, and detect whether the page holds a recipe or a collection.
Instructions
Read one page of the recipe section by the slug in its address, such as 'paella-de-marisco'. 'kind' says what the page turned out to be: a 'recipe', or a 'collection', which is an article gathering other recipes and carries no ingredients of its own. A recipe says under 'source_shape' where its ingredients were read: 'structured' from the block the page publishes for search engines, 'article' from the body of the page, which is where most of this site's recipes keep them. Pass 'servings' to rescale the quantities; a recipe whose page states no number of servings comes back unscaled and says so. A line naming a tool rather than an ingredient is marked and never multiplied.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The slug in a recipe's address, from search_recipes or browse_recipes. | |
| servings | No | Rescale the quantities to this many, up to 1000. Left out, the recipe comes back as published. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| notes | Yes | ||
| cached | Yes | ||
| recipe | No | ||
| collection | No |