v1

latestOpenAPI 3.0.0spoonacular API Terms2026-07-139901.1 MB
ingredients

Compute Ingredient 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?

get/food/ingredients/{id}/amount

Path parameters

idnumber required
Example:9266

The id of the ingredient you want the amount for.

Query parameters

nutrientstring required
Example:protein

The target nutrient. See a list of supported nutrients.

targetnumber required
Example:2

The target number of the given nutrient.

unitstring
Example:oz

The target unit.

Response

Success

amountnumber required
unitstring required