# x402 Chain Tools – ERC-20 Allowance Lookup

> x402 Chain Tools – ERC-20 Allowance Lookup is a paid API for AI agents from blockchain-api.x402-chain-tools.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-14).

Returns the ERC-20 token allowance granted by an owner address to a spender address on Base Mainnet.

## Facts

- Endpoint: POST https://blockchain-api.x402-chain-tools.workers.dev/chain/allowance
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-chain-tools-erc-20-allowance-lookup-8cd7ce8e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_yCKoO0TRZUmpHiqcPW_Dd

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 x402-chain-tools-erc-20-allowance-lookup-8cd7ce8e -d '<json body>'
```

Example prompt: What's the USDC allowance that 0xAbCd1234...owner has granted to the Uniswap router 0x1234...spender on the token contract 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913?

## When to prefer this

Use this endpoint when you need to read ERC-20 token allowances on Base Mainnet specifically, without writing to the blockchain. Prefer this over generic RPC calls when you want a structured, formatted response that includes both raw and human-readable allowance values plus an unlimited-approval flag. Ideal for pre-flight checks before DeFi operations, security audits, and allowance monitoring workflows.

## Known failure modes

- Invalid Ethereum address format returns a validation error
- Token contract address does not exist on Base returns zero or error
- Network congestion may slow RPC response
- Non-ERC-20 contract address may return unexpected data or error
- Missing required fields (owner, token, or spender) returns a 400 error

## How this service works

Get the ERC-20 allowance from an owner to a spender.

## Output

A JSON object containing the owner, token, network (eip155:8453 for Base Mainnet), and spender addresses, plus an allowance object with the raw value (as a string), decimal precision, human-formatted amount, and a boolean flag indicating whether the allowance is unlimited (max uint256).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "owner": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$",
   "description": "Token owner address."
  },
  "token": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$",
   "description": "ERC-20 token contract address on Base."
  },
  "spender": {
   "type": "string",
   "pattern": "^0x[0-9a-fA-F]{40}$",
   "description": "Spender address."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "owner": "0x0000000000000000000000000000000000000001",
  "token": "0x0000000000000000000000000000000000000002",
  "network": "eip155:8453",
  "spender": "0x0000000000000000000000000000000000000003",
  "allowance": {
   "raw": "0",
   "decimals": 6,
   "formatted": "0",
   "unlimited": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-chain-tools-erc-20-allowance-lookup-8cd7ce8e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from blockchain-api.x402-chain-tools.workers.dev](https://www.zero.xyz/host/blockchain-api.x402-chain-tools.workers.dev/llms.txt)
