Compute Ingredient Amount

GET {{baseUrl}}/food/ingredients/:id/amount?nutrient=protein&target=2&unit=oz

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?

Request Params

KeyDatatypeRequiredDescription
nutrientstring(Required) The target nutrient. See a list of supported nutrients.
targetnumber(Required) The target number of the given nutrient.
unitstringThe target unit.

RESPONSES

status: OK

{"amount":65.32,"unit":"oz"}