Read one recipe
get_recipeFetch a Ptitchef recipe by ID and receive its ingredients, method, times, rating, nutrition, and estimated cost. Optionally rescale the ingredient quantities by servings.
Instructions
Read one Ptitchef recipe: its ingredients, method, times, rating, nutrition and the cost the site estimates for it. Pass the 'id' of a row from search_recipes, browse_recipes or search_by_ingredients. Give 'servings' to rescale the ingredients, and read each line's 'scaling' before quoting a quantity: 'scaled' is exact arithmetic, 'rounded' was moved to stay usable, and 'unscaled' carries nothing that could be multiplied. A time or a figure the site publishes none of comes back null, never zero.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The 'id' of a row from a search or a listing, which is the recipe's own page path. | |
| servings | No | Rescale the ingredients to this many servings. Left out, the ingredients come back as published. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | ||
| faq | Yes | ||
| url | Yes | The public page. Show this when citing the recipe. | |
| notes | Yes | What qualifies this answer: what the arithmetic did, what it could not do, and what the site states rather than this server. Read these before quoting a quantity or a cost. | |
| steps | Yes | The method, one line per step, in the shape every source of recipes publishes it in. 'illustrated_steps' carries the same lines beside the photograph the site took of each. | |
| title | Yes | ||
| yield | Yes | ||
| author | Yes | ||
| rating | Yes | 1 to 5, as the site states it. | |
| source | Yes | The site this recipe was read from. Credit it when showing it. | |
| cuisine | Yes | ||
| category | Yes | ||
| keywords | Yes | ||
| modified | Yes | ||
| image_url | Yes | ||
| nutrition | Yes | As published, per the serving size it names. | |
| published | Yes | ||
| author_url | Yes | ||
| difficulty | Yes | The site's own wording, such as 'facile'. | |
| attribution | Yes | ||
| description | Yes | ||
| ingredients | Yes | The lines as published where no servings were asked for, in which case 'yield.factor' is null and each line's 'scaling' describes no arithmetic. Pass 'servings' to rescale them. | |
| cook_minutes | Yes | ||
| prep_minutes | Yes | ||
| rating_count | Yes | ||
| review_count | Yes | ||
| translations | Yes | The other languages this recipe was published in, which get_recipe_translations answers on its own for a caller who wants nothing else. | |
| total_minutes | Yes | ||
| estimated_cost | Yes | What the site estimates the ingredients cost, with the currency it names. Repeated as published: it is the site's figure and readers of the site dispute it. | |
| illustrated_steps | Yes | ||
| steps_are_one_block | Yes | True when the site published its method as one block of prose, so the single step above is that block rather than the first of several. |