# Open Food Facts Barcode Nutrition Lookup

> Open Food Facts Barcode Nutrition Lookup is a paid API for AI agents from payai.agentstools.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-15).

Look up a packaged food product by GTIN/barcode and return its normalized nutrition profile, allergens, diet flags, Nutri-Score, and NOVA classification via Open Food Facts.

## Facts

- Endpoint: GET https://payai.agentstools.dev/nutrition/barcode
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/open-food-facts-barcode-nutrition-lookup-43da4c5e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_SMLoS5XD6Hd6dofCcJavS

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability open-food-facts-barcode-nutrition-lookup-43da4c5e
```

Example prompt: Can you pull up the nutrition info, allergens, Nutri-Score, and NOVA rating for the product with barcode 5449000000996?

## When to prefer this

Use this endpoint when you have a physical product barcode (EAN/UPC/GTIN) and need structured nutrition data, allergen information, or dietary classification (Nutri-Score, NOVA) for a globally sold packaged food. Prefer this over manual ingredient lookup when a barcode is available and you need standardized, machine-readable output.

## Known failure modes

- Barcode not found in Open Food Facts database — returns empty or 404-like response
- Invalid barcode format (fewer than 8 or more than 14 digits) — returns validation error
- Product exists but has incomplete data — partial nutrition profile returned
- Upstream Open Food Facts API unavailable — returns service error
- Barcode resolves to non-food product with no nutrition data

## How this service works

Look up a packaged product by GTIN/barcode via Open Food Facts (global). Returns the normalized nutrition profile plus allergens, diet flags, Nutri-Score and NOVA.

## Output

Returns a normalized nutrition profile (macronutrients, energy, etc.), allergen list, dietary flags (vegan, vegetarian, gluten-free, etc.), Nutri-Score letter grade, and NOVA food processing classification for the matched packaged product.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "barcode"
     ],
     "properties": {
      "barcode": {
       "type": "string",
       "description": "GTIN/barcode, 8-14 digits (EAN-8/UPC-A/EAN-13/GTIN-14)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/open-food-facts-barcode-nutrition-lookup-43da4c5e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from payai.agentstools.dev](https://www.zero.xyz/host/payai.agentstools.dev/llms.txt)
