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
Key | Datatype | Required | Description |
---|---|---|---|
nutrient | string | (Required) The target nutrient. See a list of supported nutrients. | |
target | number | (Required) The target number of the given nutrient. | |
unit | string | The target unit. |
RESPONSES
status: OK
{"amount":65.32,"unit":"oz"}