USDA FoodData Central Scraper avatar

USDA FoodData Central Scraper

Pricing

from $3.00 / 1,000 results

Go to Apify Store
USDA FoodData Central Scraper

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

Crawler Bros

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

6 days ago

Last modified

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:

FieldDescription
fdcIdUSDA FDC unique ID
descriptionFood name
dataTypeFoundation / SR Legacy / Branded / Survey (FNDDS) / Experimental
foodCategoryCategory (e.g. Fruits, Vegetables, Dairy)
brandNameBrand name (Branded foods only)
ingredientsFull ingredient list
servingSizeServing size in grams
servingSizeUnitUnit string (g, ml, oz, etc.)
caloriesEnergy (kcal per 100g)
proteinProtein (g per 100g)
fatTotal fat (g per 100g)
carbohydratesTotal carbohydrates (g per 100g)
fiberDietary fiber (g per 100g)
sugarTotal sugars (g per 100g)
sodiumSodium (mg per 100g)
cholesterolCholesterol (mg per 100g)
potassiumPotassium (mg per 100g)
calciumCalcium (mg per 100g)
ironIron (mg per 100g)
vitaminCVitamin C (mg per 100g)
vitaminAVitamin A (IU per 100g)
nutrientCountTotal number of nutrient entries in record
scrapedAtISO 8601 timestamp of extraction

Fields with no available data are omitted from the record.

Input parameters

ParameterTypeDescription
modeSelectsearchFoods (default): search by keyword · getFoodDetails: lookup by FDC ID · listFoods: browse by data type
queryTextSearch keyword (required for searchFoods mode). E.g. apple, chicken breast, whole wheat bread
fdcIdsString listOne or more FDC IDs for getFoodDetails mode (e.g. 171705, 454004)
dataTypeSelectData type for listFoods mode: Foundation, SR Legacy, Branded, Survey (FNDDS), Experimental
apiKeyTextYour 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)
maxItemsIntegerMaximum 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 typeDescription
FoundationCarefully curated reference foods with extensive nutrient data. Best for research and nutrition analysis.
SR LegacyUSDA Standard Reference database (~8,000 foods). The classic reference used by nutritionists for decades.
BrandedCommercial 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.
ExperimentalResearch 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.