---
title: "Compute Ingredient Amount"
method: GET
path: "/food/ingredients/{id}/amount"
tags: ["ingredients"]
---

# Compute Ingredient Amount

`GET /food/ingredients/{id}/amount`

Compute the amount you need of a certain ingredient for a certain nutritional goal. For example, how much pineapple do you have to eat to get 10 grams of protein?

## Path parameters

- `id` number, required

## Query parameters

- `nutrient` string, required
- `target` number, required
- `unit` string

## Response `200`

Success

- object
  - `amount` number, required
  - `unit` string, required

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found

---

[API](https://skmtc.net/spoonacular/apis/spoonacular-api.md) · [All operations](https://skmtc.net/spoonacular/apis/spoonacular-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spoonacular/spoonacular-api/revisions/bc2fbe4e8981/schema)
