---
title: "Ingredient API: lookup, pairings and substitutions — Tiny Plates"
description: "An ingredient API: resolve names to canonical ingredients, look up allergens, diets and density, and find what pairs well and what to use instead."
url: "https://www.tinyplates.dev/products/ingredients"
---

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.

[Get a free API key](https://www.tinyplates.dev/sign-up)[Read about ingredients](https://www.tinyplates.dev/docs/ingredients)

Free plan. No credit card.

## 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.

[Ingredients in the docs](https://www.tinyplates.dev/docs/ingredients)

```
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.

[Pairings in the docs](https://www.tinyplates.dev/docs/api/ingredient-pairings)

{
  "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 in the docs](https://www.tinyplates.dev/docs/api/substitutions)

{
  "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.

## The endpoints

* [GET /ingredients/resolve](https://www.tinyplates.dev/docs/api/resolve-ingredients)Names to canonical ingredients.
* [GET /ingredients/{id}](https://www.tinyplates.dev/docs/api/get-ingredient)Allergens, diets, density and more.
* [GET /ingredients/{id}/pairings](https://www.tinyplates.dev/docs/api/ingredient-pairings)What goes well with it.
* [GET /substitutions](https://www.tinyplates.dev/docs/api/substitutions)What 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](https://www.tinyplates.dev/blog/parse-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.

* [Ingredient lookup and pairings](https://www.tinyplates.dev/blog/ingredient-lookup-and-pairings)
* [Parse ingredient lines](https://www.tinyplates.dev/blog/parse-ingredient-lines)
* [Scaling recipes](https://www.tinyplates.dev/blog/scaling-recipes)

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.

[Get a free API key](https://www.tinyplates.dev/sign-up)[Quickstart](https://www.tinyplates.dev/docs/quickstart)

No credit card. [See pricing](https://www.tinyplates.dev/pricing)
