Ingredients
Ingredients your code can work with
Every ingredient line comes split into quantity, unit, name and preparation, tied to a canonical ingredient. Look that ingredient up for its allergens, diets and density, what goes well with it, and what to use instead.
Free plan. No credit card.
“2 cloves garlic, minced”
Structured. Ready to use.
One ingredient, whatever it is called
Resolve a name and you get the one canonical ingredient behind it, with an id that is the same in English, Spanish and Swedish.
import { createClient } from 'tiny-plates'
const tinyPlates = createClient({ apiKey })
const resolved = await tinyPlates.ingredients.resolve([
'scallions',
'courgette'
])Every name, one id
Scallions, spring onions and green onions resolve to one ingredient.
What it is
Allergens, diets, density and whether it is a pantry staple.
Where it belongs
Cherry tomatoes know they are tomatoes.
What goes with it
/ingredients/{id}/pairings returns the ingredients that go well with it. Use it to suggest what to add, or to round out a “what can I make with these” feature.
{
"ingredient": {
"id": "basil",
"name": "basil"
},
"pairings": [
{
"id": "garlic",
"name": "garlic",
"recipeCount": 214,
"share": 0.535
},
{
"id": "tomato",
"name": "tomato",
"recipeCount": 188,
"share": 0.47
},
{
"id": "parmesan",
"name": "parmesan",
"recipeCount": 131,
"share": 0.328
},
{
"id": "onion",
"name": "onion",
"recipeCount": 119,
"share": 0.298
},
{
"id": "mozzarella",
"name": "mozzarella",
"recipeCount": 64,
"share": 0.16
}
],
"recipeCount": 400
}What to use instead
Ask what to use instead of butter and you get options you can show as they are. An ingredient we have no substitutions for comes back in its own list, so your app can say so.
{
"substitutions": [
{
"ingredient": "butter",
"options": [
{
"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
}
]
}
],
"unknown": [
"saffron"
]
}A ratio
How much of the swap to use.
A note
How the dish changes with it.
A caution
Where the swap does not work.
Scale it. Convert it.
Ask for a recipe with ?servings=8 and every quantity is rewritten. Add ?units=metric or ?units=imperial and they are converted too, from cups to grams when the ingredient’s density is known.
Quantities scale. “To taste” stays as it is.
The endpoints
- GET /ingredients/resolveNames to canonical ingredients.
- GET /ingredients/{id}Allergens, diets, density and more.
- GET /ingredients/{id}/pairingsWhat goes well with it.
- GET /substitutionsWhat to use instead.
When another API fits better
Spoonacular can parse ingredient text your users type in and match it to grocery products. Tiny Plates resolves ingredient names and serves ingredients from its own recipes already split into fields. If you need to parse free text from your users, read parsing ingredient lines first.
Questions
What does resolving an ingredient do?
It returns the canonical ingredient for each name you send, so “spring onions”, “scallions” and “green onions” all become the same ingredient.
Can I get substitutions for an ingredient?
Yes. /substitutions returns options with a ratio, a note on how the dish changes and a caution where a swap does not work. An ingredient it does not know comes back in a separate list.
Can quantities be converted between metric and imperial?
Yes. Ask for a recipe with ?units=metric or ?units=imperial and every quantity is converted, including between volume and weight where the ingredient’s density is known.
Guides
Longer reads on the blog, with code you can copy.
- recipes
- 12,000+
- EU allergens, plus 2 from the US
- 14
- nutrient filters
- 10
- diets
- 5
- languages
- 3
- MCP tools
- 12
Real recipes. Ready for your app.
The free plan gives you 50 requests a day and 300 a week. Paid plans start at $5 a month.
No credit card. See pricing