# Food Barcode Facts

> Food Barcode Facts is a paid API for AI agents from food-barcode.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Returns a packaged food product's name, brand, Nutri-Score, NOVA processing group, per-100g nutrition, and data quality by barcode.

## Facts

- Endpoint: GET https://food-barcode.x402tookit.com/food-product?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/food-barcode-facts-68d4c43b
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Q6CmZPCTFsvEfoND2f3mw

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 food-barcode-facts-68d4c43b
```

Example prompt: Can you look up the full nutrition profile and Nutri-Score for barcode 3017620422003 — I want to see what's in it per 100g and how processed it is?

## When to prefer this

Use this endpoint when you need a comprehensive single-call food profile for a packaged product by barcode, including Nutri-Score, NOVA processing classification, and per-100g nutrition. Prefer this over sibling endpoints when you want the full product overview in one call rather than specific sub-queries for allergens, additives, or diet compatibility.

## Known failure modes

- Barcode not found in database — returns null or empty fields
- Invalid barcode format (not 8–14 digits) — input validation error
- Product exists but has incomplete nutrition data — partial results with degraded flag set to true
- Network or upstream Open Food Facts API unavailability — service error
- Payment not processed — x402 payment required error

## How this service works

Packaged food profile by barcode: name, brand, Nutri-Score, NOVA processing group, nutrition per 100 g and data quality.

## Output

Returns a JSON object with the product name, brand, quantity, Nutri-Score letter grade, NOVA processing group and its meaning, per-100g macros and micronutrients (energy, fat, saturated fat, carbohydrates, sugars, fiber, protein, salt, sodium), ingredient list, eco-score, labels, countries sold, a summary verdict with reasons, data quality metadata (completeness, last modified, has ingredients), source URL, attribution, and any data degradation flags.

## 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"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "barcode"
     ],
     "properties": {
      "barcode": {
       "type": "string",
       "description": "UPC or EAN barcode, 8 to 14 digits"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "name": {
       "type": [
        "null",
        "string"
       ]
      },
      "brands": {
       "type": [
        "null",
        "string"
       ]
      },
      "labels": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "barcode": {
       "type": [
        "null",
        "string"
       ]
      },
      "per100g": {
       "type": [
        "null",
        "object"
       ],
       "properties": {
        "fatG": {
         "type": [
          "null",
          "number"
         ]
        },
        "saltG": {
         "type": [
          "null",
          "number"
         ]
        },
        "fiberG": {
         "type": [
          "null",
          "number"
         ]
        },
        "sugarsG": {
         "type": [
          "null",
          "number"
         ]
        },
        "sodiumMg": {
         "type": [
          "null",
          "number"
         ]
        },
        "proteinsG": {
         "type": [
          "null",
          "number"
         ]
        },
        "energyKcal": {
         "type": [
          "null",
          "number"
         ]
        },
        "saturatedFatG": {
         "type": [
          "null",
          "number"
         ]
        },
        "carbohydratesG": {
         "type": [
          "null",
          "number"
         ]
        }
       }
      },
      "reasons": {
       "type": [
        "array",
        "null"
   
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/food-barcode-facts-68d4c43b/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from food-barcode.x402tookit.com](https://www.zero.xyz/host/food-barcode.x402tookit.com/llms.txt)
