Skip to main content

Barcode API

Barcode nachschlagen​

GET /barcode/{code}

Sucht den Barcode in der Open Food Facts Datenbank.

Parameter: code — EAN-8, EAN-13 oder UPC-A (8–14 Ziffern)

Response 200 (gefunden):

{
"barcode": "4014500513003",
"found": true,
"name": "Weihenstephan — Frische Alpenmilch 3.5%",
"brand": "Weihenstephan",
"categories": ["Milch", "Frischmilch", "Vollmilch"],
"image_url": "https://images.openfoodfacts.org/...",
"quantity": "1L",
"nutriscore": "b"
}

Response 404 (nicht gefunden):

{ "detail": "Product not found in Open Food Facts" }

Response 400 (ungĂĽltiges Format):

{ "detail": "Invalid barcode format" }
Rate-Limiting

Der Backend-Proxy hat ein Timeout von 8 Sekunden fĂĽr die Open Food Facts API. Bei Timeout wird 504 zurĂĽckgegeben.