Food & Drink — entry 009 of 20

Open Food Facts

Verified Jul 2026

Open Food Facts is a crowdsourced, open database of food products worldwide, covering ingredients, nutrition facts, allergens, and Nutri-Score/Eco-Score ratings, with full bulk exports available alongside the live API. A live GET against the real gateway, world.openfoodfacts.org, returned a genuine product record while carrying Access-Control-Allow-Origin: *, resolving cors unknown -> yes; auth None was reconfirmed by the same keyless 200.

Open Food Facts is a free, crowdsourced database of food products worldwide -- ingredients, nutrition facts, allergens, and Nutri-Score/Eco-Score ratings, looked up by barcode or full-text search. A live GET this run against a filter-less `/search` returned `{"count":4654144,...}` -- a live, dated counter, not a fixed fact -- and a real product lookup returned genuine data with no credentials.

food-dataopen-datanutritionbarcode
AuthenticationNone requiredCall it straight away — no key, no signup.
HTTPSSupportedTraffic is encrypted in transit.
CORSEnabledCallable directly from browser JavaScript.
PricingFreeNo paid tier — free for the documented use case.
FormatsJSON, CSVResponses can be requested as JSON or CSV.

GreatAPIs Score

Score80out of 100
Authentication25/25No authentication required
Pricing20/20Free to use
Docs0/20No docs or spec available
Formats15/15Supports 2 response formats
Freshness20/20Verified within 6 months

Embed this badge

Scored 80 on greatapis.com
<a href="https://greatapis.com/api/open-food-facts/"><img src="https://greatapis.com/badge/open-food-facts.svg" alt="Scored 80 on greatapis.com"></a>

Auth quickstart

  1. No API key, signup, or credit card required -- a live GET this run against `/product/737628064502.json` returned a genuine product record with zero credentials, carrying `access-control-allow-origin: *` so a browser `fetch()` works too.
Stored keyNo key stored

Your key is stored only in this browser (localStorage) and sent directly to the API — never to greatapis.

Look up a product by barcode

GEThttps://world.openfoodfacts.org/api/v2/product/737628064502.json?fields=product_name,brands,nutriscore_grade,code

200 application/json; charset=utf-8

{"code":"0737628064502","product":{"brands":"Simply Asia, Thai Kitchen","code":"0737628064502","nutriscore_grade":"d","product_name":"Thai peanut noodle kit includes stir-fry rice noodles & thai peanut seasoning"},"status":1,"status_verbose":"product found"}

The `fields` param is doing real work here -- a full product record carries hundreds of fields (ingredients, allergens, images, per-nutrient breakdowns, ...), so a real client should always ask for only the fields it needs. `status`/`status_verbose` on the envelope, not the HTTP status code, is how a lookup's outcome is actually reported (see the gotcha below).

Try it

Developer reference

Base URLhttps://world.openfoodfacts.org/api/v2
Key endpoints
  • GET/product/{barcode}.json
  • GET/search

Gotchas & limits

  • A barcode that doesn't exist is **HTTP 200 with `"status":0`**, not a 404 -- a live GET this run against `/product/0000000000000.json` returned `200 {"code":"00000000","status":0,"status_verbose":"no code or invalid code"}` and no `product` key at all. Always check the `status` field in the body; the HTTP status code alone can't tell success from a miss.
  • `/search` needs at least one real filter to be reliable -- a live GET this run against `/search?categories_tags=en:sodas&page_size=2` returned a genuine `{count, page, page_count, page_size, products}` envelope, but a bare filter-less `/search` intermittently returned a `503 Page temporarily unavailable` maintenance page instead of JSON on the same run. Don't rely on an unfiltered search in production code.
  • The stored `url` (`world.openfoodfacts.org/data`) is a bulk-export documentation page, not the API gateway -- the real gateway used above, `world.openfoodfacts.org/api/v2`, is a different path on the same host and isn't linked from that page.