# Open Food Facts Barcode Nutrition Lookup

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

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://api.agentstools.dev/nutrition/barcode?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/open-food-facts-barcode-nutrition-lookup-584b344b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_uedmFbffdgAcj98X17NNt

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-584b344b
```

Example prompt: Can you look up the nutrition info, allergens, and Nutri-Score for the product with barcode 3017620422003?

## When to prefer this

Use this endpoint when you need to look up packaged food product details (nutrition, allergens, diet flags, Nutri-Score, NOVA) by scanning or providing a GTIN/barcode. It leverages the global Open Food Facts crowd-sourced database and is ideal for consumer food apps, diet tracking, grocery comparison, or allergen screening. Prefer this over manual nutrition search endpoints when you have the exact barcode, as it returns richer structured data including processing classification (NOVA) and health scores (Nutri-Score).

## Known failure modes

- Barcode not found in Open Food Facts database — product may be too regional or not yet crowd-sourced
- Invalid barcode format (not 8–14 digits) — returns validation error
- Product exists in database but nutrition data is incomplete — partial fields returned
- Network timeout or upstream Open Food Facts API unavailability — returns 5xx error
- Barcode digit check failure — malformed GTIN rejected before lookup

## 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 (calories, macros, micronutrients), list of allergens, dietary compatibility flags (vegan, vegetarian, gluten-free, etc.), Nutri-Score letter grade (A–E), and NOVA food processing classification (1–4) for the matched product from the Open Food Facts global database.

## 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-584b344b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentstools.dev](https://www.zero.xyz/host/api.agentstools.dev/llms.txt)
