Build a shopping list
Turn several recipes and their serving counts into one list, grouped by aisle.
/shopping-listAPI keyConsolidates several recipes into one shopping list, grouped by the aisle each ingredient is found in. `recipes` is a comma-separated list of recipe ids, each optionally followed by a colon and the servings to cook. A recipe asked for at a different serving count is scaled first, so the list holds the amounts actually needed. Quantities are added up wherever they can be — grams to grams, cloves to cloves — and amounts that cannot be added, such as two cloves of garlic and 10 g of garlic, stay separate lines. An ingredient with no quantity, such as "salt to taste", is one line with no amount.
Request
curl 'https://api.tinyplates.dev/shopping-list?recipes=6a9820a88f8122ec891b680b%3A6%2C6a9820e58f8122ec891b68a4' \
-H 'Authorization: Bearer rd_your_api_key'Sign in to run this request with your own key. Free, 500 requests a day.
Parameters
recipesstringrequiredThe recipes to shop for: 1 to 20 comma-separated recipe ids, each optionally followed by ":" and the servings to cook. Required.
Response
The list, grouped by aisle and then by name.
The recipes the list was built from, in the order they were asked for, with the servings each was scaled to.
Example
{
"items": [
{
"category": "dairy",
"display": "250 ml double cream",
"name": "double cream",
"quantity": {
"unit": "ml",
"value": 250
},
"recipeIds": [
"6a9820a88f8122ec891b680b"
]
},
{
"category": "meat",
"display": "1200 g chicken thighs",
"name": "chicken thighs",
"quantity": {
"unit": "g",
"value": 1200
},
"recipeIds": [
"6a9820a88f8122ec891b680b",
"6a9820e58f8122ec891b68a4"
]
},
{
"category": "produce",
"display": "5 onion",
"name": "onion",
"quantity": {
"value": 5
},
"recipeIds": [
"6a9820a88f8122ec891b680b",
"6a9820e58f8122ec891b68a4"
]
},
{
"category": "spices",
"display": "salt",
"name": "salt",
"recipeIds": [
"6a9820e58f8122ec891b68a4"
]
}
],
"recipes": [
{
"id": "6a9820a88f8122ec891b680b",
"servings": 6,
"title": "Chicken Tikka Masala"
},
{
"id": "6a9820e58f8122ec891b68a4",
"servings": 4,
"title": "Slow-Roasted Cherry Tomatoes"
}
]
}Errors
- 400
The "recipes" parameter must contain 1 to 20 recipe ids, each optionally followed by ":" and a serving count. Use "66d0a1b2c3d4e5f6a7b8c9d0:6,66d0a1b2c3d4e5f6a7b8c9d1".
A parameter was not a value the API accepts. The message names the parameter, the value it was given and where the allowed values are listed.
- 400
No recipe with id "66d0a1b2c3d4e5f6a7b8c9ff". Use the ids a list or search response carries in its "id" field.
A parameter was not a value the API accepts. The message names the parameter, the value it was given and where the allowed values are listed.
- 401
An API key is required. Pass it as an Authorization: Bearer header.
No key was sent, and this deployment requires one. Keys are optional today and will become required.
- 401
Invalid API key.
The key does not exist. Check for a truncated copy, or create a new one on your dashboard.
- 401
This API key has been disabled.
The key was revoked. Create a new one on your dashboard.
- 401
This API key has expired.
The key was created with an expiry that has passed. Create a new one.
- 429
Rate limit exceeded for this API key. Try again later.
The account has used its 500 requests for the day. The allowance is per account, so another key will not help. It resets at midnight UTC.
- 500
Something went wrong. Please try again.
The API could not answer. The request was not your fault; retry it, and report it if it keeps happening.