# agent402.tools Barcode Lookup (UPC/EAN → Product Info)

> agent402.tools Barcode Lookup (UPC/EAN → Product Info) is a paid API for AI agents from agent402.tools, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Looks up a product by its UPC or EAN barcode number and returns name, brand, category, quantity, and nutrition grade from Open Food Facts.

## Facts

- Endpoint: GET https://agent402.tools/api/barcode-lookup
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-barcode-lookup-upc-ean-product-info-63ea3660
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_RemjHrMBcyeRHz413NA8j

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 agent402-tools-barcode-lookup-upc-ean-product-info-63ea3660
```

Example prompt: What product has the barcode 737628064502? I want to know the brand, product name, category, and nutrition grade.

## When to prefer this

Use this endpoint when you have a numeric UPC or EAN barcode (8–14 digits) and need to identify the corresponding food product and its metadata. Pair with the sibling /api/barcode-decode endpoint when starting from a barcode image rather than a number. Prefer this over general web search when you need structured, machine-readable product data from an open, standardized database.

## Known failure modes

- Barcode not found in Open Food Facts database — returns empty or 404-like response
- Invalid barcode format (not 8–14 digits) — returns validation error
- Product exists but has incomplete data — some fields may be null or missing
- Payment failure — x402 payment of $0.005 USDC not processed

## How this service works

Look up a product by its UPC/EAN barcode number via Open Food Facts (open data): name, brand, category, quantity, and nutrition grade. Pairs with /api/barcode-decode (image → number → product). ?code=737628064502

## Output

Returns structured product data including product name, brand, category, quantity/size, and nutrition grade (e.g. A–E scale from Open Food Facts) for the given UPC/EAN barcode number.

## 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": [
      "code"
     ],
     "properties": {
      "code": {
       "type": "string",
       "description": "UPC/EAN barcode digits (8-14)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "code",
      "found",
      "product"
     ],
     "properties": {
      "code": {
       "type": "string"
      },
      "found": {
       "type": "boolean"
      },
      "product": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "brands": {
         "type": "string"
        },
        "quantity": {
         "type": "string"
        },
        "countries": {
         "type": "string"
        },
        "categories": {
         "type": "string"
        },
        "nutritionGrade": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "code": "737628064502",
  "found": true,
  "product": {
   "name": "Thai peanut noodle kit",
   "brands": "Simply Asia",
   "quantity": "155 g",
   "countries": "United States",
   "categories": "Meals",
   "nutritionGrade": "d"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-barcode-lookup-upc-ean-product-info-63ea3660/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
