Get an ingredient
One ingredient by its canonical id, with its spellings, allergens, diets, substitutions, density and whether it pours, so a recipe app can reason about it.
/ingredients/{id}API keyReturns one ingredient by its canonical id: its names and spellings, how many recipes use it, its allergens and diets, what to use instead, and what unit conversion needs to know about it. The id must be canonical; send a name through GET /ingredients/resolve first. `allergens` and `dietary` are left out until the ingredient has been classified, and `density` when it is not well established, rather than guessed.
Request
curl 'https://api.tinyplates.dev/ingredients/butter' \
-H 'Authorization: Bearer rd_your_api_key'Sign in to run this request with your own key. Free, 50 requests a day and 300 a week.
Parameters
idstringrequiredThe canonical ingredient id, such as "butter" or "chicken-thigh".
Response
ingredientobject
ingredientobjectaliasesobjectEvery spelling seen, keyed by two-letter language code.
allergensobjectoptionalWhether the ingredient contains each EU and US regulated allergen feature, keyed by feature, with a `disclaimer`. Absent until the ingredient has been classified.
densitynumberoptionalGrams per millilitre, used to turn a volume into a weight. Absent when the density is not well established.
dietaryobjectoptionalWhether the ingredient suits each diet: `dairyFree`, `glutenFree`, `pescatarian`, `vegan` and `vegetarian`. Absent until the ingredient has been classified.
idstringThe canonical id.
namestringThe canonical English name.
namesobjectThe canonical name, keyed by two-letter language code.
parentstringoptionalThe id of the food this is a kind or a part of, such as "chicken" for "chicken-thigh". Absent when the ingredient is a food of its own.
pourablebooleanWhether it is a liquid that is poured rather than weighed, so a volume of it stays a volume when a recipe is converted.
recipeCountintegerHow many recipes use this ingredient.
staplebooleanWhether a kitchen is assumed to have it already, as GET /pantry does by default.
substitutionsobject[]What to use instead, the same options GET /substitutions gives. Empty when nothing is known to replace it.
The ingredient.
Example
{
"ingredient": {
"aliases": {
"en": [
"butter",
"unsalted butter",
"salted butter"
],
"de": [
"Butter"
],
"sv": [
"smör",
"osaltat smör"
]
},
"allergens": {
"celery": false,
"crustaceans": false,
"disclaimer": "Informational only; not medical advice. Verify ingredients and product labels before serving someone with an allergy.",
"eggs": false,
"fish": false,
"gluten-cereals": false,
"lupin": false,
"milk": true,
"molluscs": false,
"mustard": false,
"nuts-eu": false,
"peanuts": false,
"sesame": false,
"soy": false,
"sulphites": false,
"tree-nuts-us": false,
"wheat": false
},
"density": 0.911,
"dietary": {
"dairyFree": false,
"glutenFree": true,
"pescatarian": true,
"vegan": false,
"vegetarian": true
},
"id": "butter",
"name": "butter",
"names": {
"en": "butter"
},
"pourable": false,
"recipeCount": 412,
"staple": false,
"substitutions": [
{
"caution": "Not for creaming into a batter or for pastry, where solid fat is what makes the texture.",
"ingredient": "olive oil",
"note": "Use three quarters as much. The result is softer and does not brown the same way.",
"ratio": 0.75
},
{
"ingredient": "margarine",
"note": "Use a block, not a spread: spreads carry more water.",
"ratio": 1
}
]
}
}Errors
- 404
Ingredient not found.
No ingredient has that canonical id. Turn a name such as "fresh cilantro" into its id with /ingredients/resolve first.
- 401
An API key is required. Pass it as an Authorization: Bearer header.
No key was sent. Every endpoint except the root, /health, /docs and /openapi.json requires one.
- 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
Daily allowance of 50 requests used. It resets at midnight UTC. Paid plans include more; see https://www.tinyplates.dev/pricing.
The account has used its 50 requests for the day. The allowance is per account, so another key will not help. It resets at midnight UTC.
- 429
Weekly allowance of 300 requests used. It covers the last 7 days. Paid plans include more; see https://www.tinyplates.dev/pricing.
The account has used its 300 requests over the last 7 days, today included. The allowance is per account, so another key will not help. Room comes back as older days drop out of the window.
- 429
Daily limit of 5,000 requests on the Personal plan reached. It resets at midnight UTC. Contact us for a higher limit.
The account has used its plan's limit for the day. The message names the number and the plan, which differ between accounts. The limit is per account, so another key will not help. It resets at midnight UTC.
- 429
Weekly limit of 30,000 requests on the Business plan reached. It covers the last 7 days. Contact us for a higher limit.
The account has used the weekly limit set on it over the last 7 days, today included. The message names the number and the plan. Only accounts with a weekly limit can see this. Room comes back as older days drop out of the window.
- 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.