Skip to content
RAG Repo

Open Food Facts

Open Food Facts is a crowdsourced database of packaged food products from around the world, built the way Wikipedia and OpenStreetMap are: contributors scan a product's barcode with a phone and photograph its ingredient list and nutrition table, and the record fills out from there. A single entry can hold the product name, brand, ingredients, allergens, nutrition facts per 100 g, categories, packaging, and derived scores such as Nutri-Score and the NOVA processing classification. Coverage now runs to millions of products across more than 140 countries.

Getting the data is simple. Full dumps are regenerated nightly in several flavours (a complete MongoDB export, plus CSV and JSONL deltas), and a JSON API resolves a single barcode in real time. For a large corpus, download the bulk export rather than hammering the API. For RAG, one product per passage works well: build a short block naming the product, brand, and ingredients so a retriever can match questions about what a food contains or which items fit a dietary need.

It is the strongest open option for food and nutrition systems: allergen checkers, diet assistants, label explainers, and any tool that turns a barcode into structured facts. The spread of countries also makes it a good base for multilingual product work.

Mind the data quality. Because anyone can contribute, completeness and accuracy swing widely by product and region: popular items in well-served countries are rich, others are thin or carry the odd error, so validate fields before trusting them. The licensing has moving parts too: the database is under the Open Database Licence (ODbL), individual contents under the Database Contents Licence, and product images under CC BY-SA, so the terms differ across the parts. ODbL is share-alike, so any database you derive and distribute must carry the same licence and credit the source.

It is the flagship of a small family; pair it with Open Beauty Facts and Open Products Facts when a project reaches past food.

foodnutritionbarcodecrowdsourcedopen-dataproducts

Related sources