# Food Barcode Facts – Diet Compatibility Check

> Food Barcode Facts – Diet Compatibility Check 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).

Checks whether a packaged food (identified by UPC/EAN barcode) is compatible with a specified diet (vegan, vegetarian, palm-oil-free, or gluten-free) based on ingredient analysis and product labels.

## Facts

- Endpoint: GET https://food-barcode.x402tookit.com/food-diet-check?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-diet-compatibility-check-b083cbdc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AAH_mdqoJwvIAo-EQTxfY

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-diet-compatibility-check-b083cbdc
```

Example prompt: Can you check if the product with barcode 012345678901 is vegan? I want to know whether its ingredients are compatible with a vegan diet.

## When to prefer this

Use this endpoint when you need a quick, structured diet-compatibility verdict for a specific packaged food identified by its UPC or EAN barcode. It is purpose-built for the four diets (vegan, vegetarian, palm-oil-free, gluten-free) and returns interpretable reasons, not just a boolean. Prefer it over a general product lookup endpoint when the user's goal is specifically dietary compliance rather than nutritional analysis or allergen checking.

## Known failure modes

- Barcode not found in database — verdict and name may be null
- Unknown or ambiguous ingredients — degraded flag set to true with reduced confidence
- Diet type not supported — request rejected or empty response
- Incomplete ingredient data — notChecked array lists unverified ingredients
- Stale product data — dataQuality.lastModified may be outdated

## How this service works

Does a packaged food fit a vegan, vegetarian, palm-oil-free or gluten-free diet, per its ingredient analysis and labels.

## Output

Returns a verdict (e.g. 'yes', 'no', 'unknown') on whether the product meets the requested diet, along with the product name, brand, a human-readable summary, a list of reasons supporting the verdict, applicable product labels, analysis tags, data quality indicators (completeness, last modified, has ingredients), and a disclaimer about data reliability.

## 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",
      "diet"
     ],
     "properties": {
      "diet": {
       "type": "string",
       "description": "vegan, vegetarian, palm-oil-free or gluten-free"
      },
      "barcode": {
       "type": "string",
       "description": "UPC or EAN barcode"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "diet": {
       "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"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "quantity": {
       "type": [
        "null",
        "string"
       ]
      },
      "sourceUrl": {
       "type": [
        "null",
        "string"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "attribution": {
       "type": [
        "null",
        "string"
      
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/food-barcode-facts-diet-compatibility-check-b083cbdc/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)
