get_nutrition
Retrieve nutrients for a single food by amount in grams or household measures, including glycemic load, ingredient assumptions, and sources.
Instructions
Nutrients for an amount of one food, with the grams used, the measure and oil assumptions, glycemic load when the GI is known, and the sources. unit is g (always valid) or a household measure such as katori, piece or tbsp; search_food lists the units each food accepts, and an unknown unit returns them. A nutrient listed in incomplete is a lower bound. A dish's folate, vitamin C and vitamin B12 are totals of its raw ingredients, with no cooking losses applied; raw_ingredient_totals names them. For more than one food, use compute_meal. Values are rounded to 2 decimals, so 0.0 can be a small amount; a value the source does not report is null, never 0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | Yes | g, or a unit that search_food lists for the food, such as katori or piece. | |
| amount | Yes | How many of `unit`; above 0. | |
| food_id | Yes | A food id from search_food, such as toor_dal. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gi | Yes | ||
| food | Yes | ||
| unit | Yes | ||
| grams | Yes | ||
| amount | Yes | ||
| gi_ref | Yes | ||
| sources | Yes | ||
| nutrients | Yes | Nutrient amounts in `grams` of this food. | |
| incomplete | Yes | ||
| glycemic_load | Yes | ||
| oil_assumption | Yes | ||
| measure_assumption | Yes | ||
| raw_ingredient_totals | Yes |