Food Nutrient Database

The U.S. Department of Agriculture provides a fantastic resource for food nutrition data. The formatting however leaves a lot to be desired:

Eww!

Food's an interesting subject, and I've had quite a few itches in the past to create food related web apps. But I was always quickly put off after remembering the state of the data I first had to deal with. Until today.

There's a lot of data included which, quite frankly, doesn't seem very useful (e.g. nutrient "22:1 undifferentiated", whatever that is.) So I've cherry-picked the good stuff, and dumped it as JSON goodness.

Example record:


Notes

  • 6,636 unique foods.
  • 375,176 nutrient figures, avg. 56.5 per food.
  • Foods from the original database without any recorded nutrients have been removed.
  • Nutrients still being researched and without proper names have been removed, e.g. the "22:1 undifferentiated" one.
  • The tags are commonly used words to describe the food, including regional names. For example, "soda" or "pop" for carbonated beverages.
  • The format of the id field in the original database was a 5-digit string (i.e. "001001".) I've converted this to an integer here, 1001, so bare this in mind if you're comparing against other USDA related resources using the original format.
  • 94 unique nutrients across all foods:
    • Energy (kcal)
    • Total lipid (fat)
    • Protein
    • Carbohydrate, by difference
    • Water
    • Ash
    • Sodium, Na
    • Iron, Fe
    • Calcium, Ca
    • Potassium, K
    • Fatty acids, total saturated
    • Cholesterol
    • Vitamin A, IU
    • Vitamin C, total ascorbic acid
    • Phosphorus, P
    • Riboflavin
    • Thiamin
    • Niacin
    • Zinc, Zn
    • Magnesium, Mg
    • Fatty acids, total polyunsaturated
    • Fatty acids, total monounsaturated
    • Copper, Cu
    • Vitamin B-6
    • Fiber, total dietary
    • Vitamin B-12
    • Folate, total
    • Vitamin A, RAE
    • Folate, food
    • Selenium, Se
    • Folic acid
    • Pantothenic acid
    • Folate, DFE
    • Retinol
    • Manganese, Mn
    • Sugars, total
    • Lysine
    • Methionine
    • Isoleucine
    • Leucine
    • Valine
    • Threonine
    • Phenylalanine
    • Histidine
    • Arginine
    • Vitamin E (alpha-tocopherol)
    • Tyrosine
    • Tryptophan
    • Glutamic acid
    • Aspartic acid
    • Serine
    • Cystine
    • Glycine
    • Alanine
    • Proline
    • Alcohol, ethyl
    • Carotene, beta
    • Vitamin D
    • Vitamin D (D2 + D3)
    • Carotene, alpha
    • Cryptoxanthin, beta
    • Vitamin K (phylloquinone)
    • Lycopene
    • Lutein + zeaxanthin
    • Caffeine
    • Theobromine
    • Vitamin B-12, added
    • Choline, total
    • Vitamin E, added
    • Fatty acids, total trans
    • Betaine
    • Tocopherol, gamma
    • Tocopherol, beta
    • Tocopherol, delta
    • Dihydrophylloquinone
    • Fructose
    • Glucose (dextrose)
    • Sucrose
    • Lactose
    • Maltose
    • Galactose
    • Vitamin D3 (cholecalciferol)
    • Hydroxyproline
    • Starch
    • Fatty acids, total trans-monoenoic
    • Fatty acids, total trans-polyenoic
    • Fluoride, F
    • Menaquinone-4
    • Phytosterols
    • Stigmasterol
    • Campesterol
    • Beta-sitosterol
    • Vitamin D2 (ergocalciferol)
    • Adjusted Protein
  • The individual kcal figures for protein, carbs and fat aren't included. See this article on how to calculate them yourself.

Changelog

  • 3rd October 2011: Added tons more portion data.

Download (1.8 MB, extracts to 31.8 MB)

I'm @ashleyw on Twitter. I'd love to hear from you if you've used this database in any of your projects!