The Smidge food database

The Smidge database holds 3,467,777 packaged-food products, merged by barcode from Open Food Facts and USDA FoodData Central Branded Foods. This page says what is in it, how it is built, how much of each field is filled in, and where it is wrong. Every number below comes from a saved query.

What it is

The database is one SQLite file with a row per barcode: a name, a brand, calories and nutrients per 100 g, a serving and package size where known, categories, and a few fields that only Open Food Facts supplies. Rows with the same name and brand are also gathered into groups, so a search shows one product instead of dozens of repeats. The Foods page searches it, and the blog's data posts run saved queries against it.

The build behind this page
ItemValue
Products (rows, one per barcode)3,467,777
Groups (one per name and brand)2,784,193
Largest group1,214 entries
Built16 November 2026
Open Food Facts changes applied through15 November 2026
USDA Branded Foods release29 October 2026

The largest group is "Aceite de oliva virgen extra" with no brand. The database is a snapshot: a product added to either source after those dates is not in it. The file is used by Smidge and is not offered for download.

Sources and licenses

The two sources and the license each one states
SourceWhat Smidge takes from itLicense as stated by the source
Open Food FactsNames, brands, nutrients (from the label, or an estimate from the ingredient list), serving and package size, categories, scan counts, the Nutri-Score grade, the NOVA group, and the United States tagDatabase under the Open Database License; individual contents under the Database Contents License; product images under Creative Commons Attribution ShareAlike (terms of use)
USDA FoodData Central, Branded FoodsNames, brands, nutrients, serving size and category textPublic domain and not copyrighted, published under CC0 1.0 Universal (FoodData Central)

The USDA Branded Foods data is label data collected through a public-private partnership; its data documentation lists the Branded Foods data source as manufacturers, based on food label information (data documentation). The FoodData Central home page says the Branded Foods Product Database, provided by the Global Data Synchronization Network (GDSN), is updated monthly, and that it no longer receives new or updated food component information from Label Insight after 16 November 2023.

This page states the licenses of the sources as they publish them and gives no advice about reusing the combined file. The file holds no product images.

Food data from USDA FoodData Central (public domain) and Open Food Facts (Open Database License).

How it is built

The build reads the full Open Food Facts product dump and the newest USDA Branded Foods release, keeps each source as it last described every barcode, and then makes one product row per barcode. The build tooling can then apply Open Food Facts' daily change files and load a newer USDA release. These are the rules, as the build code has them.

Barcodes

A barcode has its leading zeros dropped and is kept as a number. A code with any character that is not a digit is discarded, and so is one with fewer than 4 or more than 14 digits. So a 12-digit UPC-A code and the same code written as a 13-digit EAN with a leading zero become one row. If two Open Food Facts codes collapse into one barcode, the more recent edit is kept. For USDA, only the newest label revision of a barcode is kept, and discontinued products are skipped.

Which source's nutrients win

USDA's values are used when they pass the checks below. If they do not, or USDA has no entry, Open Food Facts' label values are used. If the label gives no calories, Open Food Facts' own estimate from the ingredient list is used.

Open Food Facts label values are read in this order:

  1. Its per-100 g aggregate for the product as sold.
  2. If that has no calories, the preferred as-sold label set: manufacturer-entered before read off the packaging, then per 100 g before per serving. A per-serving set is converted only when the serving is 10 to 5,000 g or ml.
  3. If neither has calories, the flat per-100 g values that older Open Food Facts documents carry.

The checks reject a nutrient set when:

Two single values are dropped on their own, without rejecting the product: a sodium value outside 0 to 42,000 mg, and a saturated fat value outside 0 to 100 g or more than 0.5 g above the fat itself. A product with no valid nutrients, or no name, is left out of the file.

Each row records the decision in rule, and whose nutrients it carries in nutrient_source.

Rows by merge rule. Rows with the rules usda and usda+off both carry USDA nutrients (431,856 rows, 12.5%); off and off:usda_invalid both carry Open Food Facts label values (3,008,719 rows, 86.8%).
RuleWhat decided the rowRows
offOpen Food Facts label values; no valid USDA entry3,003,421
usdaUSDA values passed the checks413,030
off_estimateOpen Food Facts estimate from the ingredient list, because the label gave no calories27,058
usda+offUSDA values, with gaps filled from Open Food Facts label values whose calories agree within the larger of 5 kcal or 10%18,826
off:usda_invalidA USDA entry failed the checks; Open Food Facts label values used5,298
off_estimate:usda_invalidA USDA entry failed the checks; Open Food Facts estimate used144

An estimate never fills a gap in label data, and a nutrient that is missing is filled from Open Food Facts only when both sources agree on calories. In total 27,202 rows carry the estimate (nutrient_source off_estimate). Of the 3,467,777 rows, 437,298 have a USDA entry, and 5,442 of those had a USDA entry that failed the checks.

Names, brands, serving and the rest

The name and the first listed brand come from Open Food Facts, with USDA's name, written in title case when it is all capitals, used where Open Food Facts has none (63,555 rows). Serving size comes from USDA first. Package size, scan count, Nutri-Score and NOVA come from Open Food Facts only. Open Food Facts scans are unique scans, which the search uses to rank popular products higher.

Nutrient columns hold amounts per 100 g, or per 100 ml for a product measured in milliliters. A serving or package size in milliliters is stored as if it were grams, and the file has no column saying which unit a product used.

Fields

The table shows how many groups, counting each group's shown row, and how many rows have a value. A zero counts as a value; a blank does not.

Share with a value, by field. Groups: 2,784,193. Rows: 3,467,777.
FieldMeaningGroupsRows
kcalCalories per 100 g100.0%100.0%
proteinGrams per 100 g98.9%98.9%
carbsCarbohydrates, grams per 100 g98.8%98.8%
fatGrams per 100 g98.7%98.7%
sat_fatSaturated fat, grams per 100 g88.8%89.7%
sugarTotal sugars, grams per 100 g91.5%92.2%
fiberGrams per 100 g53.5%51.6%
sodium_mgMilligrams per 100 g; from sodium, else salt divided by 2.586.2%86.3%
serving_gServing size in grams50.0%46.1%
package_gPackage size in grams, Open Food Facts only31.4%29.8%
nutriscoreOpen Food Facts' Nutri-Score grade, a to e39.4%39.1%
novaOpen Food Facts' NOVA group, 1 to 432.3%30.3%
categoriesUp to three category tags, or USDA's category text (non-empty)48.8%48.0%
scansOpen Food Facts unique scans (above 0)40.4%38.6%

Other columns are always filled: barcode, name, brand (an empty string when there is none), is_us, nutrient_source, name_source, rule and grp. The column fdc_id, the USDA identifier, is filled for the 437,298 rows with a USDA entry. A serving of 1 to 500 g, the range the shown-row rule below treats as believable, is listed on 49.5% of groups and 45.6% of rows.

The column is_us is 1 when Open Food Facts tags the product for the United States, or when its USDA entry has the United States as its market country. It marks 890,831 rows (25.7%) and 732,443 groups (26.3%). It is not a country: the file has no country column.

Groups and the shown row

One product often has many barcodes: package sizes, countries, repackagers and repeat entries. Rows with the same name and brand form a group. The name and brand are compared as lowercase letters and digits only, so "Coca-Cola" and "coca cola" are one name; a different spelling or a different brand text makes a separate group. The 3,467,777 rows make 2,784,193 groups.

Groups by number of entries
Entries in the groupGroupsRowsGroups with a differing entry
12,515,6152,515,6150
2171,303342,60662,412
3 to 573,325257,76542,802
6 to 1015,297111,83911,667
11 to 507,753147,4096,771
51 to 10062042,355604
over 10028050,188278

In all, 268,578 groups hold more than one entry, and those groups contain 952,162 rows. Every row keeps its own values, and the file records, for each row, which row of its group is the shown one.

The shown row is chosen in steps:

  1. Each row gets a signature: calories rounded to the nearest 5, and protein, carbs and fat each rounded to the nearest 2 g, with a missing macro counted as its own value.
  2. The group's most common signature is picked. On a tie, a signature that includes a row with USDA nutrients wins.
  3. Within that signature, the row with USDA nutrients comes first, then a row with a serving of 1 to 500 g, then the row with the most Open Food Facts scans, then the lowest barcode.

A group's scan count is the sum over all its rows. That is what the Foods page ranks on, together with how many entries the group has.

When entries disagree

Entries for the same name and brand do not always agree. An entry counts as differing when its calories are further from the shown row's than the larger of 3 kcal or 5% of the larger of the two values. Of the 268,578 groups with more than one entry, 124,534 have at least one differing entry, and there are 286,651 differing entries across all groups.

The five largest groups and the calorie range inside each
Name (no brand)EntriesDifferingLowest kcalHighest kcal
Aceite de oliva virgen extra1,214237100924
Huile d'olive7294210900
Parmigiano Reggiano613140462
Comté6122350472
Chocolat6102590810

The file does not decide which entry is right. The shown row is the most common reading, and the group's calorie range is kept beside it.

Categories, NOVA and Nutri-Score

Categories are the last three English tags (those starting with en:) of an Open Food Facts product, joined with a vertical bar, most specific last. Where Open Food Facts has none, the USDA category text is used. Of all rows, 1,539,168 have Open Food Facts tags, 123,673 have USDA text and 1,804,936 have no category. The file also holds a statistics table for the 3,305 category tags that appear on at least 60 groups.

The Nutri-Score grade and the NOVA group are Open Food Facts' own. They are copied even when USDA's nutrients win, and a product that exists only in USDA has neither. Open Food Facts values of "unknown" and "not applicable" are stored as no grade.

Nutri-Score grades in the file
GradeRowsGroups
a196,725159,188
b153,360122,625
c285,588237,337
d344,967275,548
e375,793302,700
none2,111,3441,686,795
NOVA groups in the file
NOVA groupRowsGroups
1125,702106,414
245,49232,410
3203,733176,213
4676,658582,979
none2,416,1921,886,177

What the file does not have

A product that the sources list without valid nutrients or without a name is not in the file, and the file does not record how many were left out.

Known issues

These counts are of rows (barcodes) unless stated. They are not errors in every case: a count shows how many rows have a pattern, not how many are wrong.

Rows with patterns worth knowing about
PatternRows
Calories exactly 065,391
Calories above 900 per 100 g (the checks allow up to 950)1,068
Protein, carbs and fat adding up to more than 100 g per 100 g (the checks allow up to 110 g)10,832
Sugar above carbohydrates by more than 0.5 g (not checked by the build)2,940
Fiber above carbohydrates by more than 0.5 g (not checked by the build)45,172
Serving size above 500 g12,251
No brand813,416
Nutrients estimated from the ingredient list27,202
USDA nutrients on a row not tagged for the United States1,011
Groups with at least one differing entry124,534

How the blog uses it

Each data post on the blog is built from a saved query: a SQL file that reads the database and writes a CSV, in a study folder next to the post. The post's method box names the build date and the source releases, shows the saved query, and links the CSV for download. The queries behind this page are saved the same way, one file per table above.

The study runner has a --check mode that reruns every saved query read-only, and compares each result byte for byte with the saved CSV and the database's SHA-256 with the record. It passes for this page's queries on this build, whose SHA-256 is ec976861b4c3b3d36088ef464b1e691d29b31227e73fbf222ae74179afe046bb. The database file is not published, so the check is run by Smidge.

Corrections

Found a wrong number on this page, or a product that looks wrong in the search? Write to support and say which page and which figure.

Last updated 17 November 2026

Know the number. Log it in a sentence.
Smidge for iPhone and Android.
QR code that opens smidge.fit/get

Scan with your phone camera to open Smidge in the App Store or Google Play.