Edamam nutrition API

Food & Drink / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

The Edamam Nutrition Analysis API parses natural-language food descriptions such as "1 cup of oatmeal" or "200g chicken breast" and returns detailed nutritional breakdowns including calories, macros, vitamins, and minerals. You need a free app ID and app key from the Edamam developer portal to use it. It is ideal for diet apps, meal planners, or any tool where users input food descriptions.

💡

Beginner Tip

The API parses ingredient strings in natural language — you can send phrases like "2 tbsp olive oil" and it will extract the quantity, unit, and food automatically.

Available Data

recipe name and ingredients
nutritional values
calorie count
serving size
preparation time
Use case: Integrate nutrition analysis data into web and mobile applications

Example Response

JSON Response
{
  "recipe": "Chicken Stir Fry",
  "calories": 380,
  "protein_g": 32,
  "carbs_g": 28,
  "fat_g": 14,
  "ingredients": [
    "chicken breast",
    "bell pepper",
    "soy sauce",
    "garlic"
  ],
  "prep_time_minutes": 20
}

Field Reference

calories Total calories for all ingredients combined.
totalWeight Total weight in grams of all ingredients.
totalNutrients Object keyed by nutrient code (e.g., PROCNT for protein) with label, quantity, and unit.
totalDaily Percentage of daily recommended intake for each nutrient, based on a 2000-calorie diet.
ingredients Parsed ingredient list with each item's nutritional breakdown and confidence score.

Implementation Example

const url = "https://developer.edamam.com/edamam-docs-nutrition-api";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized app_id or app_key is wrong or missing.
Register at https://developer.edamam.com and copy both the app_id and app_key to your request query string.
555 Parsing Error — could not identify the ingredient The ingredient string is too vague or misspelled.
Be more specific: include a quantity and unit (e.g., 100g brown rice instead of just rice).
totalNutrients is empty for a valid food The serving size may be 0 or the ingredient unit is unrecognized.
Include an explicit quantity (1 cup, 200g, etc.) rather than sending just a food name.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Food & Drink
Difficulty Intermediate
Verified: 2026-04-04

Recipes Using Edamam nutrition

Build something with this API. Each recipe includes step-by-step instructions and code outlines.

Similar APIs

View All →