Microproduct Data GuideBeginner

Open Food Facts

Collaborative packaged-food product records for building barcode lookup, label, and nutrition-comparison tools.

Report a Problem

At a Glance

Difficulty
Beginner — comfortable for a first prototype
Size
Large · 0.1–20 GB
Formats
JSON, CSV
Access
API or Download
API Key
Not Required
Provider
Open Food Facts
Updates
Continuous
Last Verified
Aug 18, 2026
Source Type
Nonprofit Source
  • Python Syntax Checked
  • Runnable Notebook

From Source to Product Signal

Test a Product Idea in Four Steps

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.

1

Check the Setup

  • Python 3.10 or newer
  • A notebook environment such as Jupyter or Google Colab
  • An internet connection
2

Access the Data

  1. 1.Read the terms of use, including attribution and share-alike for derivative databases.
  2. 2.Request one product by barcode with a descriptive User-Agent.
  3. 3.Keep the barcode, product name, and Nutri-Score if present.
Open Official Source
3

Run the Python Example

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())
4

Test a Useful Signal

Look Up One Packaged Food by Barcode

Test whether Open Food Facts can power a bounded product-fact card.

  1. 01Keep barcode, product name, brands, and Nutri-Score.
  2. 02Record missing nutrition or ingredient fields instead of filling them from other sites.
  3. 03Attribute Open Food Facts under ODbL and note that images and third-party packaging rights are separate.

Dataset Details

Open Food Facts is a nonprofit source. Last verified 2026-08-18. Temporal coverage: continuously updated product records.

Geography

Formats

Provider

Open Food Facts

Data Terms

Open Database License

Send Feedback