FoodData Central API
Overview
FoodData Central is the USDA's authoritative nutritional database API, giving access to detailed nutrient profiles for hundreds of thousands of foods including branded products, raw ingredients, and restaurant items. You need a free API key from the USDA's FoodData website to make requests. It is an excellent choice for building calorie trackers, meal planners, or diet analysis tools.
Beginner Tip
Register for a free API key at https://fdc.nal.usda.gov/api-key-signup.html — it is issued instantly and lets you make up to 3,600 requests per hour per IP address.
Available Data
Example 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
fdcId Unique FoodData Central identifier for the food item. description Human-readable name or description of the food. dataType Category of the food entry (e.g., Branded, SR Legacy, Foundation). foodNutrients List of nutrient objects each containing nutrient name, unit, and amount per 100g. brandOwner Company that owns the branded food product (only present for Branded data type). servingSize Standard serving size in grams or milliliters. Implementation Example
const url = "https://fdc.nal.usda.gov/";
// 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
Matrix Score Breakdown
Partially tested on Apr 5, 2026
Technical Specifications
Similar APIs
View All →CMS.gov
The CMS.gov Provider Data API gives access to Medicare and healthcare provider quality data from the Centers for Medicare and Medicaid Services.
Infermedica
Infermedica is an AI-powered health API that analyzes symptom descriptions in plain text and suggests possible conditions or next steps.
Lexigram
Lexigram is a clinical NLP API that reads medical text and identifies clinical concepts like diagnoses, medications, and procedures using standardized ontologies.
Nutritionix
⭐ Beginner's PickNutritionix gives you access to the world's largest verified nutrition database, allowing you to look up calories, macronutrients, and micronutrients for branded and restaurant foods.
openFDA
⭐ Beginner's PickopenFDA provides free public access to FDA datasets covering drug adverse events, product recalls, medical device reports, and food safety alerts.