Check the setup
- Python 3.10 or newer
- A notebook environment such as Jupyter or Google Colab
- An internet connection
Collaborative packaged-food product records for building barcode lookup, label, and nutrition-comparison tools.
From source to product signal
Open Food Facts publishes packaged-product facts, including Nutri-Score and ingredient lists, under ODbL. Start with one barcode and a custom User-Agent. Contributor data can be incomplete, images have a separate share-alike licence, and the database is not medical advice.
Install the packages, then run the notebook cell.
python -m pip install pandas requests
import pandas as pd
import requests
response = requests.get(
"https://world.openfoodfacts.org/api/v2/product/737628064502.json",
headers={
"User-Agent": (
"TrilemmaDataCatalogExample/1.0 "
"(https://data.trilemma.foundation)"
)
},
timeout=30,
)
response.raise_for_status()
product = pd.json_normalize(response.json()["product"])
print(product.filter(regex="code|product_name|nutriscore|brands").head())Test a useful signal
Test whether Open Food Facts can power a bounded product-fact card.
Open Food Facts is a nonprofit source. Last verified 2026-08-18. Temporal coverage: continuously updated product records.