Nutrition API
USDA FoodData Central nutrition data. Search foods and get detailed nutrition facts with key nutrients extracted and daily value percentages calculated.
GET
/api/nutrition/search
3 sats
Search foods by name or keyword. Returns simplified nutrition summaries with key nutrients extracted from the full nutrient array.
| Parameter | Type | Description |
|---|---|---|
query | string | Food search term (e.g., "chicken breast", "cheddar cheese") |
limit | int | Number of results (1-50, default 10) |
curl "https://agent-commerce.store/api/nutrition/search?query=chicken+breast&limit=5"
GET
/api/nutrition/{fdcId}
3 sats
Get full nutrition facts for a specific food by FDC ID. Includes daily value percentages and serving size information.
| Parameter | Type | Description |
|---|---|---|
fdcId | int | FoodData Central food ID (from search results) |
curl "https://agent-commerce.store/api/nutrition/171077"
Usage tips: Use common food names (e.g., "banana", "chicken breast", "cheddar cheese"). FDC IDs are numeric and can be found in search results. Results include both branded and generic foods — branded products may have different nutrient profiles than their generic equivalents.
Value-Add
- Extracts key nutrients (calories, protein, fat, carbs, fiber, sugar, sodium, vitamins) from massive nutrient arrays
- Calculates daily value percentages based on FDA reference amounts
- Simplifies serving size information into human-readable format
- Filters out obscure nutrients — returns only the 13 most useful
- Consistent JSON structure optimized for agent consumption
Upstream Source
USDA FoodData Central — public API providing comprehensive food and nutrient data for the United States.