Calorie APIFree

A free JSON API for calorie and macronutrient lookup. No API key required.

112 foodsUSDA-based nutrition data
Natural language"2 eggs, toast, and coffee"
5 macrosCalories, protein, carbs, fat, fiber
Quantity parsingHandles "3 slices" automatically

Endpoint

POST https://everyone.food/api/calories

Send a JSON body with a meal field describing what was eaten. The API parses each food item, matches it to the database, and returns per-item and total nutrition data.

Request

Headers

HeaderValue
Content-Typeapplication/json

Body

FieldTypeDescription
mealstringNatural language description of a meal. Supports commas, "and", quantities, and common food names.

Example

curl -X POST https://everyone.food/api/calories \
  -H "Content-Type: application/json" \
  -d '{"meal": "2 eggs, toast, and coffee"}'

Response

Success (200)

{
  "meal": "2 eggs, toast, and coffee",
  "items_matched": 3,
  "items_unmatched": 0,
  "items": [
    {
      "input": "2 eggs",
      "matched": "eggs",
      "quantity": 2.0,
      "serving": "2 large eggs",
      "calories": 310,
      "protein_g": 26.0,
      "carbs_g": 2.2,
      "fat_g": 22.0,
      "fiber_g": 0.0
    },
    {
      "input": "toast",
      "matched": "toast",
      "quantity": 1.0,
      "serving": "1 slice toasted",
      "calories": 94,
      "protein_g": 3.3,
      "carbs_g": 16.5,
      "fat_g": 1.6,
      "fiber_g": 1.0
    },
    {
      "input": "coffee",
      "matched": "coffee",
      "quantity": 1.0,
      "serving": "1 cup black",
      "calories": 5,
      "protein_g": 0.7,
      "carbs_g": 0.0,
      "fat_g": 0.0,
      "fiber_g": 0.0
    }
  ],
  "totals": {
    "calories": 409,
    "protein": 30.0,
    "carbs": 18.7,
    "fat": 23.6,
    "fiber": 1.0
  }
}

Response Fields

FieldTypeDescription
mealstringThe original meal description
items_matchedintegerNumber of food items successfully identified
items_unmatchedintegerNumber of items that couldn't be matched
items[]arrayPer-item breakdown (see below)
totalsobjectSum of all matched items
unmatchedarrayList of food names that couldn't be identified (only present if any)

Item Fields

FieldTypeDescription
inputstringRaw text parsed from the meal string
matchedstringDatabase food name matched to
quantitynumberParsed quantity (default 1.0)
servingstringHuman-readable serving description
caloriesintegerTotal calories for this item × quantity
protein_gnumberProtein in grams
carbs_gnumberCarbohydrates in grams
fat_gnumberFat in grams
fiber_gnumberFiber in grams

GET Endpoint

GET https://everyone.food/api/calories

Returns API metadata: number of foods in the database, supported fields, and usage instructions.

curl https://everyone.food/api/calories
{
  "service": "everyone.food Calorie Counter",
  "foods_in_database": 112,
  "fields": ["calories", "protein_g", "carbs_g", "fat_g", "fiber_g"],
  "supports": "quantity parsing, fuzzy matching, common meals, multi-item meals",
  "usage": "POST /api/calories with JSON {\"meal\": \"2 eggs, toast, and coffee\"}"
}

Try It Live

Usage Tips

Rate Limits

The API is free and has no authentication. Please be reasonable with request volume. If you're building something that needs high throughput, get in touch.