Compare foods side by side
compare_foodsCompare 2–10 TACO foods side by side on selected nutrients per 100 g, keeping missing and trace values explicit so nulls are not ranked as lower.
Instructions
Compare 2 to 10 TACO foods (ids from search_food) on chosen nutrients, per 100 g of edible portion. Missing data stays null or {"trace":true}; do not rank a food with null as having less.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| food_ids | Yes | TACO food numbers to compare, as returned by search_food. | |
| nutrients | No | Nutrient keys to compare. Omit for energy, protein, fat, carbohydrate, fiber and sodium. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| basis | Yes | Quantity all values refer to. | |
| foods | Yes | The foods compared, in the order received. | |
| notes | Yes | Caveats about this answer. | |
| source | Yes | Citation for the data. | |
| nutrients | Yes | One row per requested nutrient, in table order. |