Food & Drink — entry 009 of 19
Open Food Facts
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.
GreatAPIs Score
Auth quickstart
- No API key, signup, or credit card required — a live GET this run against
/product/737628064502.jsonreturned a genuine product record with zero credentials, carryingaccess-control-allow-origin: *so a browserfetch()works too.
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
{"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
https://world.openfoodfacts.org/api/v215 requests/minute per IP for read product queries, 10 requests/minute per IP for search queries
- 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.jsonreturned200 {"code":"00000000","status":0,"status_verbose":"no code or invalid code"}and noproductkey at all. Always check thestatusfield in the body; the HTTP status code alone can't tell success from a miss. /searchneeds at least one real filter to be reliable — a live GET this run against/search?categories_tags=en:sodas&page_size=2returned a genuine{count, page, page_count, page_size, products}envelope, but a bare filter-less/searchintermittently returned a503 Page temporarily unavailablemaintenance 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.