Read a recipe
get_recipeRead a complete Wikibooks Cookbook recipe: ingredients, steps, yield, time, difficulty, and nutrition. Optionally rescale ingredient quantities to a desired number of servings.
Instructions
Read one Wikibooks Cookbook page: ingredients, equipment, steps, yield, time, difficulty, category, and the nutrition panel when the page carries one. 'id' is the page key from search_recipes or list_recipes, such as 'Cookbook:Spaghetti_alla_Carbonara'. A plain dish name is accepted and the Cookbook namespace is added. Pass 'servings' to rescale: countable things land on whole or half units, a measurement is moved to a smaller unit before rounding so nothing disappears, and anything that cannot be multiplied is flagged instead. Read 'scaling' on each ingredient rather than doing the arithmetic yourself. Rescaling needs a yield to scale from. A page that states none comes back as published, and says so. A page yielding no quantities is answered with 'factor' 1 and a note: an empty ingredient list was multiplied by nothing. 'author' and 'rating' are always null: the Cookbook is written collectively and carries no reader score. A time the page does not state is null, never zero, and never inferred from the steps. Pages are published under a licence that requires attribution; 'license' and 'url' carry what to credit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Page key from a search, such as 'Cookbook:Spaghetti_alla_Carbonara'. | |
| servings | No | Rescale the ingredients to this many servings. | |
| max_description_chars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| url | Yes | ||
| tips | Yes | Notes, tips and variations the page publishes. | |
| notes | Yes | ||
| steps | Yes | ||
| title | Yes | ||
| yield | Yes | ||
| author | Yes | Always null: the Cookbook is written collectively. | |
| energy | Yes | Energy per serving as the page states it. | |
| rating | Yes | Always null: the Cookbook carries no reader score. | |
| source | Yes | ||
| license | Yes | ||
| category | Yes | ||
| equipment | Yes | ||
| nutrition | Yes | ||
| time_text | Yes | The time in the page's own wording. | |
| categories | Yes | Every category the page files itself under. | |
| difficulty | Yes | ||
| revised_at | Yes | ||
| attribution | Yes | ||
| description | Yes | ||
| ingredients | Yes | ||
| cook_minutes | Yes | ||
| prep_minutes | Yes | ||
| total_minutes | Yes | ||
| difficulty_max | Yes | The scale 'difficulty' sits on. |