USDA FoodData Central Scraper
Pricing
from $3.00 / 1,000 results
USDA FoodData Central Scraper
Scrape USDA FoodData Central - search 600k+ foods, get full nutritional profiles (calories, protein, fat, carbs, vitamins, minerals). Search by keyword, lookup by FDC ID, or browse by data type.
Pricing
from $3.00 / 1,000 results
Rating
0.0
(0)
Developer
Crawler Bros
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
6 days ago
Last modified
Categories
Share
Extract nutritional data for 600,000+ foods from the USDA FoodData Central (FDC) database — the official U.S. government source for food composition data. Get calories, macros (protein, fat, carbs), fiber, sugar, sodium, cholesterol, vitamins, minerals, and more.
What data do you get?
Each record includes:
| Field | Description |
|---|---|
fdcId | USDA FDC unique ID |
description | Food name |
dataType | Foundation / SR Legacy / Branded / Survey (FNDDS) / Experimental |
foodCategory | Category (e.g. Fruits, Vegetables, Dairy) |
brandName | Brand name (Branded foods only) |
ingredients | Full ingredient list |
servingSize | Serving size in grams |
servingSizeUnit | Unit string (g, ml, oz, etc.) |
calories | Energy (kcal per 100g) |
protein | Protein (g per 100g) |
fat | Total fat (g per 100g) |
carbohydrates | Total carbohydrates (g per 100g) |
fiber | Dietary fiber (g per 100g) |
sugar | Total sugars (g per 100g) |
sodium | Sodium (mg per 100g) |
cholesterol | Cholesterol (mg per 100g) |
potassium | Potassium (mg per 100g) |
calcium | Calcium (mg per 100g) |
iron | Iron (mg per 100g) |
vitaminC | Vitamin C (mg per 100g) |
vitaminA | Vitamin A (IU per 100g) |
nutrientCount | Total number of nutrient entries in record |
scrapedAt | ISO 8601 timestamp of extraction |
Fields with no available data are omitted from the record.
Input parameters
| Parameter | Type | Description |
|---|---|---|
mode | Select | searchFoods (default): search by keyword · getFoodDetails: lookup by FDC ID · listFoods: browse by data type |
query | Text | Search keyword (required for searchFoods mode). E.g. apple, chicken breast, whole wheat bread |
fdcIds | String list | One or more FDC IDs for getFoodDetails mode (e.g. 171705, 454004) |
dataType | Select | Data type for listFoods mode: Foundation, SR Legacy, Branded, Survey (FNDDS), Experimental |
apiKey | Text | Your free USDA API key (optional). Get one free at api.data.gov. Without it, the DEMO_KEY is used (30 req/hour, 50 req/day) |
maxItems | Integer | Maximum number of records to return (1–200, default 25) |
Usage examples
Search for foods by keyword
{"mode": "searchFoods","query": "avocado","maxItems": 20}
Look up specific foods by FDC ID
{"mode": "getFoodDetails","fdcIds": ["171705", "2346009", "454004"],"maxItems": 10}
Browse Foundation reference foods
{"mode": "listFoods","dataType": "Foundation","maxItems": 50}
Use your own API key for higher limits
Register for a free key at api.data.gov/signup (no cost, immediate access) to get 1,000 requests/hour instead of the DEMO_KEY limits.
{"mode": "searchFoods","query": "salmon","apiKey": "YOUR_API_KEY_HERE","maxItems": 100}
Data types explained
| Data type | Description |
|---|---|
| Foundation | Carefully curated reference foods with extensive nutrient data. Best for research and nutrition analysis. |
| SR Legacy | USDA Standard Reference database (~8,000 foods). The classic reference used by nutritionists for decades. |
| Branded | Commercial branded foods from manufacturer labels (~400,000 products). |
| Survey (FNDDS) | Foods as consumed in USDA dietary surveys. Includes mixed dishes and food-as-eaten data. |
| Experimental | Research and experimental food data. |
Use cases
- Nutrition analysis apps — build meal planners, recipe calculators, or calorie trackers
- Food research — compare nutrient profiles across food categories
- Diet compliance tools — filter foods by macros or micronutrients
- Restaurant and recipe databases — enrich menus with USDA-verified nutrition data
- Academic research — access standardized nutritional data for studies
- Product development — benchmark branded products against reference foods
API rate limits
The DEMO_KEY (used by default) allows 30 requests/hour and 50 requests/day. This is sufficient for the default maxItems=25 setting.
For higher-volume use, register at api.data.gov for a free personal key with 1,000 requests/hour and no daily cap.
FAQ
Q: Is a USDA API key required? No. The DEMO_KEY works out of the box for typical scraping tasks. Provide your own key only if you need more than 50 requests per day.
Q: What is an FDC ID? The FDC ID (FoodData Central ID) is the unique identifier assigned to each food in the USDA database. You can find FDC IDs by searching at fdc.nal.usda.gov.
Q: Are all nutrient values per 100g? Yes. All macros, vitamins, and mineral values are per 100 grams of the food as reported by the USDA, unless otherwise noted in the original record.
Q: Why are some nutrient fields missing from a record? If the USDA database doesn't have a specific nutrient measurement for a food, that field is omitted from the output (rather than showing null). This ensures clean, reliable data.
Q: How current is the data? The USDA FoodData Central database is continuously updated. The scraper fetches live data from the official USDA API at run time.
Q: How do I find FDC IDs? Visit fdc.nal.usda.gov, search for any food, and copy the FDC ID from the URL or food detail page.