← Agent Data Hub · Search endpoints · /llms.txt
Calories (kcal), protein, fat, carbohydrates, sugars, fiber (g) and sodium (mg) per 100 g of a food, with its FDC id and gram weights of common portions (1 large egg = 50 g), from USDA FoodData Central: 8,214 generic foods of SR Legacy and Foundation Foods (raw, cooked, dried, juice). A name that fits several foods returns them all as candidates. No branded products.
GET https://api.agentdatahub.de/api/v1/call/food-nutrients?food=banana&compact=1
Full metadata: verbose=1 · Markdown: format=llm · Only some fields: add &fields=a,b.c · MCP: tool call_api with {"apiId":"food-nutrients"}
curl:
curl -s 'https://api.agentdatahub.de/api/v1/call/food-nutrients?food=banana&compact=1'
Python (standard library only):
import json, urllib.request
url = "https://api.agentdatahub.de/api/v1/call/food-nutrients?food=banana&compact=1"
with urllib.request.urlopen(url, timeout=30) as r:
data = json.load(r)
print(json.dumps(data, indent=2)[:2000])
Google Sheets:
=IMPORTDATA("https://api.agentdatahub.de/api/v1/history/food-nutrients?food=banana&_order=desc&_limit=500&format=csv")
The recorded history of this call as CSV, newest first. Excel: Data → From Web with the same address.
food | Food name in English FDC words, e.g. banana, whole milk, egg boiled, apple juice (a few other languages are understood) |
fdc_id | Optional instead of food: the FoodData Central id, e.g. 173944 |
limit | 1 to 10 candidates (default: 5) |
{
"apiId": "food-nutrients",
"trust": "checked",
"data_freshness": "live",
"data": {
"query": "banana",
"matches": 61,
"ambiguous": "61 foods carry these words; the closest 5 follow. Name the form to narrow it (raw, cooked, dried, juice).",
"foods": [
{
"fdc_id": 173944,
"name": "Bananas, raw",
"data_type": "SR Legacy",
"category": "Fruits and Fruit Juices",
"per_100g": {
"energy_kcal": 89,
"protein_g": 1.09,
"fat_g": 0.33,
"carbohydrate_g": 22.84,
"sugars_g": 12.23,
"fiber_g": 2.6,
"sodium_mg": 1
},
"portions": [
{
"label": "1 cup, mashed",
"grams": 225
},
{
"label": "1 cup, sliced",
"grams": 150
},
{
"label": "1 extra small (less than 6\" long)",
"grams": 81
},
{
"label": "1 small (6\" to 6-7/8\" long)",
"grams": 101
}
],
"fdc_page": "https://fdc.nal.usda.gov/food-details/173944/nutrients"
},
{
"fdc_id": 1105073,
"name": "Bananas, overripe, raw",
"data_type": "Foundation",
"category": "Fruits and Fruit Juices",
"per_100g": {
"energy_kcal": 85,
"protein_g": 0.73,
"fat_g": 0.22,
"carbohydrate_g": 20.1,
"sugars_g": 15.8,
"fiber_g": 1.7,
"sodium_mg": null
},
"portions": [
{
"label": "1 Banana Peeled",
"grams": 110
}
],
"fdc_page": "https://fdc.nal.usda.gov/food-details/1105073/nutrients"
},
{
"fdc_id": 1105314,
"name": "Bananas, ripe and slightly ripe, raw",
"data_type": "Foundation",
"category": "Fruits and Fruit Juices",
"per_100g": {
"energy_kcal": 97,
"protein_g": 0.74,
"fat_g": 0.29,
"carbohydrate_g": 23,
"sugars_g": 15.8,
"fiber_g": 1.7,
"sodium_mg": 0
},
"portions": [
{
"label": "1 Banana Peeled",
"grams": 115
}
],
"fdc_page": "https://fdc.nal.usda.gov/food-details/1105314/nutrients"
},
{
"fdc_id": 173945,
"name": "Bananas, dehydrated, or banana powder",
"data_type": "SR Legacy",
"category": "Fruits and Fruit Juices",
"per_100g": {
"energy_kcal": 346,
"protein_g": 3.89,
"fat_g": 1.81,
"carbohydrate_g": 88.28,
"sugars_g": 47.3,
"fiber_g": 9.9,
"sodium_mg": 3
},
"portions": [
{
"label": "1 cup",
"grams": 100
},
{
"label": "1 tbsp",
"grams": 6.2
}
],
"fdc_page": "https://fdc.nal.usda.gov/food-details/173945/nutrients"
},
{
"fdc_id": 175230,
"name": "SILK Banana-Strawberry soy yogurt",
"data_type": "SR Legacy",
"category": "Legumes and Legume Products",
"per_100g": {
"energy_kcal": 88,
"protein_g": 2.35,
"fat_g": 1.18,
"carbohydrate_g": 17.06,
"sugars_g": 10.59,
"fiber_g": 0.6,
"sodium_mg": 15
},
"portions": [
{
"label": "1 container",
"grams": 170
}
],
"fdc_page": "https://fdc.nal.usda.gov/food-details/175230/nutrients"
}
],
"note": "Values per 100 g of the edible part, as USDA FoodData Central lists them (SR Legacy 2018-04, final; Foundation Foods 2026-10-29). null = FDC has no value, not zero. Foundation foods without a measured Energy give Energy (Atwater Specific Factors), else General Factors. portions = gram weights FDC gives for common measure
… (truncated)
Recorded history available: /api/v1/history/food-nutrients?food=banana
| Source | USDA FoodData Central (SR Legacy, Foundation Foods) |
| License | Public domain, CC0 1.0 (USDA FoodData Central) |
| Source URL | https://fdc.nal.usda.gov/download-datasets |
| Terms | https://fdc.nal.usda.gov/api-guide |
| Category | Law, Compliance, Health & Nutrition Science › Food Composition · more: fda-drug-adverse-reactions · fda-drug-label · fda-drug-recalls |