Open Food Facts API

Open Food Facts products by barcode: nutrition per 100 g, Nutri-Score, NOVA, allergens and images

endpoints
6
credit per call
1

The Open Food Facts API returns food products from the Open Food Facts database by barcode as JSON: product name, brand, category, images, net content, nutrition per 100 g (energy, fat, saturated fat, carbohydrates, sugars, fibre, protein, salt, sodium), Nutri-Score, NOVA group, Eco-Score, ingredients, allergens, labels, packaging, the stores and the countries where contributors recorded the product.

/open-food-facts/v1

  • POST/open-food-facts/v1/lookup1 credit
  • POST/open-food-facts/v1/batch1 credit
  • POST/open-food-facts/v1/search1 credit
  • POST/open-food-facts/v1/by_brand1 credit
  • POST/open-food-facts/v1/by_prefix1 credit
  • POST/open-food-facts/v1/validate1 credit
6 active endpoints. Every call is 1 credit.Every parameter ↓OpenAPI 3.0 spec ↗

1 credit per call≈ $1/1,000 calls1,000 free credits, no card

Get a free API key
Try it live

Run the call yourself, on the real endpoint

Change a parameter and press Try it. The response on the right is what your code will receive.

Open Food Facts API

4 of 6 endpoints, ready to run

View docs ↗

The Open Food Facts record behind one barcode: name, brand, nutrition per 100 g, Nutri-Score, NOVA, Eco-Score, allergens, stores, countries and the decoded barcode

1 credit1 required · 1 optional
POST/open-food-facts/v1/lookup
idle
// Press "Try it" and this pane shows exactly what the
// live site returned this second — including an empty
// result, if that is the truth. No key, no account.

Try every endpoint in the playground

Endpoints

What Open Food Facts endpoints does ReefAPI ship?

6 live read endpoints. Read-only data API: no writes, no account actions, no dashboard access on the target site.

  • lookup

    1 cr

    Barcode → the Open Food Facts product record.

    required
    barcode
    optional
    off_db
  • batch

    1 cr

    Up to 20 barcodes in one call → one Open Food Facts record per barcode, in input order, each…

    required
    barcodes
    optional
    off_db
  • search

    1 cr

    Free-text product search in Open Food Facts → product cards (barcode, name, brand, category,…

    required
    query
    optional
    category, off_db, page, page_size
  • by_brand

    1 cr

    Every Open Food Facts product of a brand → product cards with pagination.

    required
    brand
    optional
    category, off_db, page, page_size
  • by_prefix

    1 cr

    GS1 company prefix (the first 6+ digits of a barcode) → the Open Food Facts products whose ba…

    required
    prefix
    optional
    off_db, page, page_size
  • validate

    1 cr

    Validate and decode a barcode with no network call.

    required
    barcode
    optional
    —

Every parameter, every allowed value →

Missing a Open Food Facts endpoint, or need a source we don't have yet?Contact us real people · same-day reply.
How it works

How the Open Food Facts API works

Open Food Facts is a normal ReefAPI surface — the same four rules that hold for every other engine on the key.

Authenticate01
x-api-key header

No OAuth app, no request signing, no per-site account. One key covers all 746 engines.

Call02
POST /open-food-facts/v1/…

Every route is a POST with a JSON body. Parameters are validated against the published schema before anything is charged.

Pay03
1 credit per call

Credits, not seats. Failed and blocked calls are never charged, and nothing is cached: every call reads the source live.

Read04
{ ok, data, meta, error }

One envelope everywhere. meta carries latency_ms, record_count and the endpoint that answered.

Recipe

From a shelf of barcodes to nutrition facts and allergens

Check the codes first, then read the food records in batches of 20. Old POST /barcode/v1/... calls keep working unchanged; the call for Open Food Facts on its own is POST /open-food-facts/v1/<action>.

01validate
POST/open-food-facts/v1/validate
{"barcode": "5449000000996"}

No network call: check digit, GTIN type, 13-digit form and the GS1 issuing country (Belgium / Luxembourg for this code). A code that fails here would never have matched.

02batch
POST/open-food-facts/v1/batch
{"barcodes": ["3017620422003", "5449000000996"]}

One record per barcode in input order, each with found and checked flags. A barcode Open Food Facts does not hold comes back as its decoded identifier instead of a product, and only found barcodes are billed.

03lookup
POST/open-food-facts/v1/lookup
{"barcode": "3017620422003"}

On 2026-11-21: Nutella by Ferrero, 539 kcal, 30.9 g fat, 56.3 g sugars and 0.107 g salt per 100 g, Nutri-Score e, NOVA 3, Eco-Score f, allergens milk, nuts and soybeans, net content 400 g, sold in Belgium, France, Germany and Luxembourg.

For each barcode: the product name, brand, nutrition per 100 g, Nutri-Score, NOVA group, Eco-Score, allergens, images, stores and countries where Open Food Facts contributors recorded it.

request
curl -X POST https://api.reefapi.com/open-food-facts/v1/lookup \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"barcode":"3017620422003"}'
response envelope
{
  "ok": true,
  "data": { … },
  "meta": {
    "api": "open-food-facts",
    "endpoint": "lookup",
    "mode": "live",
    "latency_ms": …,
    "record_count": …
  },
  "error": null
}
Fields

What an Open Food Facts field contains

Fields that read differently from how they look. Each row was measured through this API on 2026-11-21.

FieldWhat it holds
nutritionValues per 100 g as Open Food Facts stores them: energy_kcal_100g, energy_kj_100g, fat_100g, saturated_fat_100g, carbohydrates_100g, sugars_100g, fiber_100g, proteins_100g, salt_100g, sodium_100g, plus nutriscore_grade, nova_group and ecoscore_grade. Nutella: 539 kcal, 2,252 kJ, salt 0.107 g.
nutriscore_grade, nova_group, ecoscore_gradeNutri-Score a to e, NOVA processing group 1 to 4 and Eco-Score a to f, as computed by Open Food Facts. A product without enough data has "unknown" or no value.
countries, storesWhere contributors recorded the product on sale: Nutella listed Belgium, France, Germany and Luxembourg and 8 stores (Aldi, Auchan, Carrefour, Casino, Intermarché, Leclerc, Lidl, Super U). These are contributor records, not a distribution list.
issuing_countryDecoded from the barcode's GS1 prefix (3017620422003: France / Monaco). It names the GS1 office that issued the company prefix, not the country where the product was made.
weight, net_contentThe declared net content ("400 g" → weight 400, weight_unit g, weight_type net_content). Volumes such as 330 ml come back as net_content with is_volume true.
found, identifier (batch)Every input barcode gets a row in input order. A barcode Open Food Facts does not hold has found false and an identifier block (GTIN type, check digit, GS1 prefix, issuing country) instead of a product.
count (search)The number of matching products. On broad words it stops at 10,000, which is a ceiling, not a count.

Names, categories and ingredient text are in the language the contributor used. The same product can appear under several barcodes, one per pack size or country.

Coverage

What Open Food Facts returns, measured

Every number below was read through this API on 2026-11-21.

A food barcode

3017620422003 returned Nutella (Ferrero) in 2.9 seconds: category, description, image, nutrition per 100 g (539 kcal, 2,252 kJ, fat 30.9 g, saturated fat 10.6 g, carbohydrates 57.5 g, sugars 56.3 g, protein 6.3 g, salt 0.107 g), Nutri-Score e, NOVA group 3, Eco-Score f, allergens, labels (Vegetarian, No gluten), packaging, 8 stores and 4 countries.

Countries and languages

Open Food Facts is one worldwide database. The 20 Coca-Cola rows of one by_brand page included products named in English, French, German, Spanish, Arabic and Malay, with barcodes issued in the United Kingdom, Belgium, Algeria, Chile, Hungary, Malaysia, India and Colombia. Names and categories are in the language the contributor used.

Brands

by_brand coca-cola: 1,514 products, 20 per page, each with barcode, name, category, image, Nutri-Score and quantity.

GS1 prefix

by_prefix 5449000 returned 8 products (Coca-Cola, Cappy, Ciel, Hawai) and issuing country Belgium / Luxembourg. It reads the most-scanned Open Food Facts products and keeps those starting with the prefix, so a rare prefix can return none; the decoded country always comes back.

Keyword search

search coca cola zero returned 20 rows per page with barcode, name, brand, category, image, Nutri-Score, NOVA group and quantity. On broad words the total stops at 10,000, which is a ceiling, not a count.

Non-food barcodes

10 of 10 barcodes a customer sent (goods from the United States, China and Spain, among them cosmetics, apparel and a drug-store item) were NOT_FOUND, and 0 of 20 Japanese and German office-supply barcodes were found in Open Products Facts. Each miss still returned the decoded code: GTIN type, valid check digit, GS1 prefix and issuing country. For general merchandise use the upcitemdb API.

Beauty, pet food and other products

off_db beauty, petfood or products reads Open Beauty Facts, Open Pet Food Facts or Open Products Facts. lookup, batch, by_brand and by_prefix read those databases; search does not use your words in those three databases (a perfume name in beauty returned hand soaps and body washes) and ranks by words only in the food database.

Limits

Open Food Facts is filled in by contributors: a product can lack nutrition, Nutri-Score ("unknown") or an image, and ingredient text is what was typed in. No prices and no retailer offers come back.

Use cases

What people build with Open Food Facts

The jobs this data is most often used for.

01

Show nutrition facts, Nutri-Score and allergens in a food-scanning or diet app from the barcode a user scans.

02

Enrich a grocery product feed with names, brands, images and nutrition by barcode, 20 barcodes per call.

03

Flag products with a given allergen or a poor Nutri-Score across a retailer's assortment.

04

List every product of a food brand recorded in Open Food Facts, with barcodes and Nutri-Scores.

6

endpoints

1

credit per call

Pricing

What Open Food Facts data costs

The cheapest call here is 1 credit, so $15/mo (Pro) buys 10,000 of them — $1.50 per 1,000 credits. Credits roll over and never expire, and failed or blocked calls are not charged.

$0.67–$1.50 / 1,000 credits
Full pricing →
  • 1,000 free credits on signup, no card
  • One key, all 746 APIs, one credit pool
  • Failed and blocked calls are never charged
  • Credits roll over and never expire
no credit card1,000 free credits · instant API key · pay by card or crypto
Quickstart

Call it in two lines

Sign up, get 1,000 credits and one key that works on every engine. Then this is the whole protocol.

curl
curl -X POST https://api.reefapi.com/open-food-facts/v1/lookup \
  -H "x-api-key: $REEF_KEY" \
  -H "content-type: application/json" \
  -d '{"barcode":"3017620422003"}'
python
import os
import requests

REEF_KEY = os.environ["REEF_KEY"]

r = requests.post(
    "https://api.reefapi.com/open-food-facts/v1/lookup",
    headers={"x-api-key": REEF_KEY},
    json={
        "barcode": "3017620422003"
    },
    timeout=90,
)
print(r.json()["data"])
FAQ

Have a question? We got answers.

The questions people actually ask before wiring up Open Food Facts.

Is there an Open Food Facts API?▾

Yes. The open-food-facts API on ReefAPI returns Open Food Facts products by barcode as JSON: nutrition per 100 g, Nutri-Score, NOVA group, Eco-Score, ingredients, allergens, images, stores and countries, with brand, keyword and GS1 prefix search on top. Open Food Facts publishes its database openly and needs no key; this API adds barcode validation, 20-barcode batches and one response shape. The call is POST /open-food-facts/v1/<action>; old POST /barcode/v1/... calls keep working unchanged.

Which countries' products are in Open Food Facts?▾

Products from every country contributors have added. One page of 20 Coca-Cola products on 2026-11-21 held barcodes issued in the United Kingdom, Belgium, Algeria, Chile, Hungary, Malaysia, India and Colombia, named in English, French, German, Spanish, Arabic and Malay. The countries field says where each product was recorded on sale.

Can I get the Nutri-Score and nutrition facts from a barcode?▾

Yes, when the product's record has them. lookup returns nutrition per 100 g, Nutri-Score, NOVA group and Eco-Score: Nutella (3017620422003) came back with Nutri-Score e, NOVA 3, Eco-Score f, 539 kcal and 56.3 g sugars per 100 g on 2026-11-21.

Does it return allergens and ingredients?▾

Yes, as the record lists them. Nutella returned allergens milk, nuts and soybeans, labels Vegetarian and No gluten, and packaging details. Ingredient text is what contributors typed, so its length and language vary per product.

Does it work for non-food barcodes?▾

Mostly not. On 2026-11-21, 10 of 10 barcodes a customer sent (goods from the United States, China and Spain, among them cosmetics and apparel) were NOT_FOUND, and 0 of 20 Japanese and German office-supply barcodes were found in Open Products Facts. Each miss still returned the decoded barcode. For electronics, books, toys and apparel, use the upcitemdb API.

Can I look up many barcodes at once?▾

Yes. batch takes up to 20 barcodes per call and returns one row per barcode in input order, each with found and checked flags. Only barcodes that are found are billed.

Can I search by brand or by company prefix?▾

Yes. by_brand coca-cola returned 1,514 products, 20 per page. by_prefix 5449000 returned 8 products and issuing country Belgium / Luxembourg; it reads the most-scanned Open Food Facts products, so a rare prefix can return none while the decoded country still comes back.

What about cosmetics and pet food?▾

Set off_db to beauty (Open Beauty Facts), petfood (Open Pet Food Facts) or products (Open Products Facts). search ranks by your words only in the food database; in the other three it lists products without using the words.

Does it return prices?▾

No. Open Food Facts records products, not prices or retailer offers. For retailer offers by barcode use the upcitemdb API.

What is the Open Food Facts API?▾

Open Food Facts API is a ReefAPI endpoint group for food products by barcode from open food facts: nutrition per 100 g, nutri-score, nova, eco-score, ingredients, allergens, images, plus brand and keyword search. It returns live JSON through POST requests under /open-food-facts/v1.

Is the Open Food Facts API free to try?▾

Yes. ReefAPI starts with 1,000 free credits, no card required. Open Food Facts calls use the same shared credit balance as every other ReefAPI engine.

Do I need an Open Food Facts login or account?▾

No login to Open Food Facts is needed for the API response. You call ReefAPI with your x-api-key header, and the playground can run live examples before you create a production key.

How fresh is the Open Food Facts data?▾

The page example is captured from a live lookup call, and production requests fetch live data through ReefAPI rather than a static sample.

How many credits does the Open Food Facts API use?▾

Open Food Facts actions currently cost 1 credit per successful call. Failed or blocked calls are free. All APIs draw from one credit pool.

Same key

19 Utilities & AI APIs on the same key

One key, one credit pool, one response envelope. If you are pulling Open Food Facts, you are one call away from the rest of the category — no second contract, no second integration.

Contact

Need something this API does not do?

Name the endpoint, the field, or a source we do not carry yet. We ship new APIs every week and you would be first to get the key. Real people read every message and reply the same day.

0/4000

No account needed · we reply from [email protected]

Try it on your own data before you pay anything

The call above is the real endpoint, not a recording. A free key gives you 1,000 credits, the other 745 APIs, and the same envelope everywhere.

Endpoints, parameters and credit costs on this page are read from the live catalog and cannot drift from what the API accepts. Field notes were captured on 2026-11-21.