Nutrition Facts API - Calories & Macros
Search 7,793 generic foods and get calories, protein, fat, carbohydrates, fiber, sugars, vitamins and minerals (36 nutrients) per 100 g or for any amount, with common portion sizes (cup, slice, piece). Calculate totals for a whole recipe or meal in one request.
Authentication & base URL
Subscribe through one of our marketplace listings; your marketplace API key and base URL are shown there. All endpoints return JSON over HTTPS, served from a global edge network (typically 20–150 ms).
Endpoints
GET /v1/nutrition/search
Search foods
| Parameter | In | Description | Example |
|---|---|---|---|
q * | query | Food name in English | chicken breast |
category | query | Optional category filter (see /categories) | |
limit | query | 1-50 | 10 |
GET /v1/nutrition/food/{fdcId}
Food details
| Parameter | In | Description | Example |
|---|---|---|---|
fdcId * | path | Food id from search | 173944 |
grams | query | Optional amount in grams to scale nutrients | 120 |
GET /v1/nutrition/calculate
Recipe / meal totals
| Parameter | In | Description | Example |
|---|---|---|---|
items * | query | food:grams pairs separated by ; (or POST JSON {"items":[{"query":"banana","grams":120}]}) | eggs:100;oats:50;whole milk:200 |
GET /v1/nutrition/categories
Food categories
Example
GET /v1/nutrition/search?q=chicken+breast&category=&limit=10
{
"query": "chicken breast",
"count": 10,
"foods": [
{
"fdcId": 171477,
"name": "Chicken, broilers or fryers, breast, meat only, cooked, roasted",
"category": "Poultry Products",
"per100g": {
"energy_kcal": 165,
"protein_g": 31,
"fat_g": 3.57,
"carbohydrates_g": 0
}
},
{
"fdcId": 174608,
"name": "Chicken breast, roll, oven-roasted",
"category": "Sausages and Luncheon Meats",
"per100g": {
"energy_kcal": 134,
"protein_g": 14.6,
"fat_g": 7.65,
"carbohydrates_g": 1.79
}
},
{
"fdcId": 172963,
"name": "Chicken breast, oven-roasted, fat-free, sliced",
"category": "Sausages and Luncheon Meats",
"per100g": {
"energy_kcal": 79,
"protein_g": 16.8,
"fat_g": 0.39,
"carbohydrates_g": 2.17
}
},
{
"fdcId": 171515,
"name": "Chicken breast tenders, breaded, uncooked",
"category": "Poultry Products",
"per100g": {
"energy_kcal": 263,
"protein_g": 14.7,
"fat_g": 15.8,
"carbohydrates_g": 15
}
},
{
"fdcId": 172962,
"name": "Chicken breast, fat-free, mesquite flavor, sliced",
"category": "Sausages and Luncheon Meats",
"per100g": {
"energy_kcal": 80,
"protein_g": 16.8,
"fat_g": 0.39,
"carbohydrates_g": 2.25
}
},
{
"fdcId": 171445,
"name": "Chicken, broiler, rotisserie, BBQ, breast, meat only",
"category": "Poultry Products",
"per100g": {
"energy_kcal": 144,
"protein_g": 28,
"fat_g": 3.57,
"carbohydrates_g": 0
}
},
…Search 7,793 generic foods and get calories, protein, fat, carbohydrates, fiber, sugars, vitamins and minerals (36 nutrients) per 100 g or for any amount, with common portion sizes (cup, slice, piece). Calculate totals for a whole recipe or meal in one request.
Use cases
Diet and fitness apps, recipe sites (nutrition per serving), meal planners, calorie counters, food delivery menus, health chatbots and AI agents that need real nutrient numbers instead of guesses.
Why this API
- Fast: global edge network, answers in milliseconds.
- Official data: USDA FoodData Central, SR Legacy (public domain, CC0). No AI guesses.
- 36 nutrients incl. vitamins A, C, D, E, K, B-complex, minerals, caffeine and alcohol.
- Smart search that prefers the common form of a food ("eggs" → whole raw egg, "milk" → whole milk).
- Recipe calculator: send all ingredients, get per-item and total nutrition.
- Fair pricing: Free plan 500 requests/month, Pro 25,000 for $4.99, Ultra 150,000 for $14.99.
Support
Questions or a feature you need? Open a thread in the Discussions tab.
Pricing
Free plan with 500 calls per month, then Pro (25,000 calls for $4.99/month) and Ultra (150,000 calls for $14.99/month). See all plans.