Brand-name foods data
Jump to a section
GymFork has about 450,000 brand-name foods sold in Canada and the US built into the app, so you can search them and scan their barcodes. Part of that data comes from Open Food Facts, whose licence asks us to share our copy. This page is where anyone can download it, free.
What the file is
- One SQLite database,
brands.db, zipped with gzip. Built 2026-10-04. It has 450,000 foods and 517,628 barcodes. - For each food: its name and brand, calories, protein, carbs and fat per 100 g, plus fibre, sugar, saturated fat and sodium when the source has them, a serving size when there is one, every barcode it’s sold under, and where it came from: USDA, Open Food Facts, or USDA’s numbers with details (like the serving size) that only Open Food Facts had.
- Numbers are stored as whole tenths to keep the file small (
kcal_x10= 523 means 52.3 calories). The viewbrand_foods_per_100gshows them as plain numbers. - It holds nothing about anyone who uses GymFork. What you log in the app never goes into this file.
- In the app, it sits on your phone: searching it and scanning a barcode that’s in it happen on the phone and send nothing anywhere.
Where the data comes from
- Open Food Facts (https://world.openfoodfacts.org), a free food database built by volunteers. Its database is under the Open Database License (ODbL) and its contents under the Database Contents License (DbCL).
- USDA FoodData Central, Branded Foods (https://fdc.nal.usda.gov), from the U.S. Department of Agriculture, in the public domain (CC0 1.0).
We kept products sold in Canada or the US that list calories, protein, carbs and fat, dropped rows whose numbers can’t be right (calories that don’t add up from protein, carbs and fat, a protein bar or peanut butter listed with no protein, or a bread or bar listed at zero for everything), merged the two sources by barcode (USDA’s numbers win where both have a product, and Open Food Facts fills in what USDA left out), folded pack sizes of the same product into one food, and kept the most scanned products first.
Licence
This database is made available under the Open Database License: https://opendatacommons.org/licenses/odbl/1-0/. Any rights in individual contents of the database are licensed under the Database Contents License: https://opendatacommons.org/licenses/dbcl/1-0/
Contains data from Open Food Facts, available under the Open Database License (ODbL). Contains USDA FoodData Central data, in the public domain.
You can use, share and change this file under the ODbL. If you share a database made from it, share that under the ODbL too, and keep the credit to Open Food Facts. The same notices are inside the file, in its meta table.
Download
- brands.db.gz, 27.1 MB (57.8 MB unzipped).
- sha256 of the download:
0d60c6e251e7114ee51417e6031beadd111d6af38415a7b43681116cf03e8588 - sha256 of
brands.dbonce unzipped:f2e7df944ef21f7741a2bb29c03b2938269b6c173aea31518a8a7cc2fc0b4a15(also in brands.db.sha256)
To open it, unzip it and use any SQLite tool, for example:
gunzip brands.db.gz
sqlite3 brands.db "SELECT * FROM brand_foods_per_100g LIMIT 5"
How we made it
- build_brands.py builds the file (Python 3; for the inputs we use it needs nothing else installed), and schema.sql is its shape.
- Its inputs are the Open Food Facts product export (https://world.openfoodfacts.org/data) and USDA FoodData Central’s Branded Foods download (https://fdc.nal.usda.gov/download-datasets). The script’s own notes say exactly which files and how to run it.
Mistakes
Food data can have mistakes, and some products change their recipe. If a product is wrong in Open Food Facts, anyone can fix it there, and the next version of this file picks the fix up. To tell us, email support@gymfork.com.