File size: 6,066 Bytes
11e0253
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
bb99daf
 
 
11e0253
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
---
pretty_name: NutrientsDB Sample Data
language:
- en
tags:
- nutrition
- food-composition
- nutrient-database
- json
---

# NutrientsDB Sample Data

A small, representative sample from [NutrientsDB](https://www.nutrientsdb.com/), the global
food composition database for developers, researchers, and AI builders.

The full database has **2.9M+ food entries** across **86 nutrient fields**, normalized to
standard units and deduplicated across 180+ countries. This repo contains a tiny slice so
you can inspect the shape of the data before getting the full dataset.

## What's here

| File | Description |
| --- | --- |
| [`sample.json`](sample.json) | 1,000 food entries with the complete 86-field nutrient schema |

This mirrors the free 1,000-food sample available at [nutrientsdb.com](https://www.nutrientsdb.com/).

Github: https://github.com/colinearstudio/nutrientsdb-sample
Hf: https://huggingface.co/datasets/colinearstudio/nutrientsdb

## Working with the data

The data is plain JSON, so it loads in any language with no database server required.

```python
import json

with open("sample.json") as f:
    foods = json.load(f)

for food in foods:
    n = food["nutrients"]
    print(food["name"], n["energy_kcal"], "kcal")
```

## Data schema

Each record has a stable `public_id`, a human-readable `name`, and a `nutrients` object.
All 86 nutrient keys are present on every entry. Values are numbers, or `null` when a
source does not report that nutrient.

```json
{
  "public_id": 2923506,
  "name": "Turkey, drumstick, from whole bird, meat only, raw",
  "nutrients": {
    "energy_kcal": 109.0,
    "protein_g": 23.66,
    "fat_g": 1.48,
    "carbs_g": 0.14,
    "vitamin_b12_ug": 0.63,
    "potassium_mg": 242.0
  }
}
```

All values are per 100 g of the food, the standard basis for food composition data.

## Units

The unit is encoded as a suffix on each field name.

| Suffix | Unit |
| --- | --- |
| `_g` | grams (g) |
| `_mg` | milligrams (mg) |
| `_ug` | micrograms (mcg) |
| `_kcal` | kilocalories (kcal) |

### Energy and macronutrients

| Field | Unit | Description |
| --- | --- | --- |
| `energy_kcal` | kcal | Total food energy |
| `protein_g` | g | Total protein |
| `fat_g` | g | Total fat (lipids) |
| `carbs_g` | g | Total carbohydrate |
| `fiber_g` | g | Dietary fiber |
| `starch_g` | g | Starch |
| `water_g` | g | Water content |
| `alcohol_g` | g | Alcohol (ethanol) |

### Carbohydrates and sugars

| Field | Unit | Description |
| --- | --- | --- |
| `sugar_g` | g | Total sugars |
| `sugar_added_g` | g | Added sugars |
| `glucose_g` | g | Glucose (dextrose) |
| `fructose_g` | g | Fructose |
| `galactose_g` | g | Galactose |
| `sucrose_g` | g | Sucrose |
| `lactose_g` | g | Lactose |
| `maltose_g` | g | Maltose |

### Fats and fatty acids

| Field | Unit | Description |
| --- | --- | --- |
| `saturated_fat_g` | g | Total saturated fat |
| `monounsaturated_fat_g` | g | Total monounsaturated fat |
| `polyunsaturated_fat_g` | g | Total polyunsaturated fat |
| `trans_fat_g` | g | Trans fat |
| `cholesterol_mg` | mg | Cholesterol |
| `fatty_acid_4_0_g` | g | Butyric acid (4:0) |
| `fatty_acid_16_0_g` | g | Palmitic acid (16:0) |
| `fatty_acid_18_0_g` | g | Stearic acid (18:0) |
| `fatty_acid_18_1_g` | g | Oleic acid (18:1) |
| `fatty_acid_18_2_n6_g` | g | Linoleic acid (18:2 n-6) |
| `fatty_acid_18_3_n3_g` | g | Alpha-linolenic acid, ALA (18:3 n-3) |
| `fatty_acid_20_5_n3_g` | g | Eicosapentaenoic acid, EPA (20:5 n-3) |
| `fatty_acid_22_6_n3_g` | g | Docosahexaenoic acid, DHA (22:6 n-3) |

### Minerals

| Field | Unit | Description |
| --- | --- | --- |
| `calcium_mg` | mg | Calcium |
| `iron_mg` | mg | Iron |
| `magnesium_mg` | mg | Magnesium |
| `phosphorus_mg` | mg | Phosphorus |
| `potassium_mg` | mg | Potassium |
| `sodium_mg` | mg | Sodium |
| `chloride_mg` | mg | Chloride |
| `zinc_mg` | mg | Zinc |
| `copper_mg` | mg | Copper |
| `manganese_mg` | mg | Manganese |
| `selenium_ug` | mcg | Selenium |
| `iodine_ug` | mcg | Iodine |
| `fluoride_ug` | mcg | Fluoride |
| `chromium_mg` | mg | Chromium |
| `molybdenum_ug` | mcg | Molybdenum |
| `phytate_mg` | mg | Phytate (phytic acid) |

### Vitamins

| Field | Unit | Description |
| --- | --- | --- |
| `vitamin_a_rae_ug` | mcg | Vitamin A (retinol activity equivalents) |
| `thiamin_mg` | mg | Vitamin B1 (thiamin) |
| `riboflavin_mg` | mg | Vitamin B2 (riboflavin) |
| `niacin_mg` | mg | Vitamin B3 (niacin) |
| `niacin_equivalents_mg` | mg | Niacin equivalents (NE) |
| `pantothenic_acid_mg` | mg | Vitamin B5 (pantothenic acid) |
| `vitamin_b6_mg` | mg | Vitamin B6 |
| `biotin_ug` | mcg | Vitamin B7 (biotin) |
| `folate_ug` | mcg | Folate (B9) |
| `vitamin_b12_ug` | mcg | Vitamin B12 |
| `vitamin_c_mg` | mg | Vitamin C (ascorbic acid) |
| `vitamin_d_ug` | mcg | Vitamin D |
| `vitamin_e_mg` | mg | Vitamin E (alpha-tocopherol) |
| `vitamin_k_ug` | mcg | Vitamin K |
| `choline_mg` | mg | Choline |

### Carotenoids

| Field | Unit | Description |
| --- | --- | --- |
| `alpha_carotene_ug` | mcg | Alpha-carotene |
| `beta_carotene_ug` | mcg | Beta-carotene |
| `beta_cryptoxanthin_ug` | mcg | Beta-cryptoxanthin |
| `lutein_zeaxanthin_ug` | mcg | Lutein and zeaxanthin |
| `lycopene_ug` | mcg | Lycopene |

### Amino acids

All amino acids are reported in grams.

| Field | Description | Field | Description |
| --- | --- | --- | --- |
| `histidine_g` | Histidine | `alanine_g` | Alanine |
| `isoleucine_g` | Isoleucine | `arginine_g` | Arginine |
| `leucine_g` | Leucine | `aspartic_acid_g` | Aspartic acid |
| `lysine_g` | Lysine | `cystine_g` | Cystine |
| `methionine_g` | Methionine | `glutamic_acid_g` | Glutamic acid |
| `phenylalanine_g` | Phenylalanine | `glycine_g` | Glycine |
| `threonine_g` | Threonine | `proline_g` | Proline |
| `tryptophan_g` | Tryptophan | `hydroxyproline_g` | Hydroxyproline |
| `valine_g` | Valine | `serine_g` | Serine |
| `tyrosine_g` | Tyrosine | | |

### Other compounds

| Field | Unit | Description |
| --- | --- | --- |
| `caffeine_mg` | mg | Caffeine |
| `theobromine_mg` | mg | Theobromine |