# Open Food Facts Product

One packaged food product by barcode — brand, ingredients, allergens, nutri-score, and the nutrition table per 100 g, from the open food database.

- Method: `GET`
- Path: `/v1/food/barcode/{barcode}`

**Parameters**

| Name | Type | | Description |
|---|---|---|---|
| `barcode` | path segment | required | The EAN/UPC barcode printed on the package. |
| `max_age` | integer (seconds) | optional | Ask for data no older than this. Clamped to the product's own floor, so it can narrow the window but never force a refresh on every call. |

**Example request**

```bash
curl https://api.diraz.ae/v1/food/barcode/%7Bbarcode%7D \
  -H "Authorization: Bearer drz_live_…"
```

**Example response**

```json
{
  "data": {
    "barcode": "3017620422003",
    "name": "Nutella",
    "brand": "Ferrero",
    "quantity": "400 g",
    "categories": ["en-breakfasts", "en-spreads"],
    "ingredients": "Sugar, palm oil, hazelnuts, skimmed milk powder...",
    "allergens": ["en:milk", "en:nuts"],
    "nutriscore_grade": "e",
    "nova_group": 4,
    "serving_size": "15 g",
    "energy_kcal_100g": 539,
    "sugars_g_100g": 56.3,
    "salt_g_100g": 0.107,
    "fat_g_100g": 30.9,
    "proteins_g_100g": 6.3,
    "image": "https://images.openfoodfacts.org/images/products/301/762/042/2003/front_en.4.400.jpg",
    "url": "https://world.openfoodfacts.org/product/3017620422003"
  },
  "meta": {
    "request_id": "req_7Q2fK4mZ",
    "as_of": "2026-08-20T16:30:00.000Z",
    "age_seconds": 120,
    "next_update_at": "2026-08-20T17:00:00.000Z"
  }
}
```