compare
Items side by side on one basis: per_100g, per_serving or per_100kcal.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | ||
| basis | No | per_100g | |
| fields | No | Only return these nutrient keys (e.g. ["energy","protein"]). Saves tokens. A group name returns every key under it, each as its own value in its own unit, never added or converted: "vitamin_a" gives vitamin_a.rae (µg) and vitamin_a.iu (IU); "carbohydrate" gives carbohydrate.total (includes fibre), carbohydrate.available (excludes it) and carbohydrate.available_mse. A key that is itself a registry key (e.g. "fat") is just that key. A name that matches nothing comes back missing with the closest keys. |