# ERC-20 Token Allowance Lookup

> ERC-20 Token Allowance Lookup is a paid API for AI agents from x402-agent-store.rileycraig14.workers.dev, paid per call via x402, $0.09/call, status unknown (last checked 2026-09-15).

Returns the current ERC-20 token spending allowance approved by an owner address for a specific spender on a given chain

## Facts

- Endpoint: GET https://x402-agent-store.rileycraig14.workers.dev/chain/allowance
- Price: $0.09/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-token-allowance-lookup-1cd1ae5e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zgE0tQyItOw47FKWGJTb4

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 erc-20-token-allowance-lookup-1cd1ae5e
```

Example prompt: What's the current USDC allowance that my wallet 0xAbC...123 has approved for the Uniswap router 0xDef...456 on Base? Use the token contract 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48.

## When to prefer this

Use this endpoint when you need a single, on-demand allowance check for a specific owner/spender/token triple on EVM-compatible chains (Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis) without needing an API key. Prefer this over ethers.js or web3 direct calls when operating in a serverless or agent context that benefits from HTTP-based on-chain reads with micropayment billing.

## Known failure modes

- Invalid or non-checksummed address formats return an error
- Unsupported chain identifier returns a validation error
- Token contract address is not a valid ERC-20 contract — returns error or zero allowance
- RPC node unavailability causes timeout or 5xx response
- Missing required query parameters (token, owner, spender) return 400 bad request
- Payment not included or insufficient — returns 402 Payment Required

## How this service works

How much of an ERC-20 token a spender is approved to move from an owner's wallet, via allowance, across Base, Ethereum, Optimism, Arbitrum, Polygon, Gnosis. The approval read every DeFi, swap and trading agent makes before (and after) a transaction to know if an approve is needed. Live public RPC; one paid call at $0.001.

## Output

A JSON object containing the blockchain network, owner address, token contract address, spender address, token decimals, the human-readable allowance as a number, and the raw allowance as a string in the token's base units (e.g. wei for 18-decimal tokens, micro-units for USDC).

## 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": [
      "token",
      "owner",
      "spender"
     ],
     "properties": {
      "chain": {
       "type": "string",
       "description": "base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"
      },
      "owner": {
       "type": "string",
       "description": "Token owner wallet (0x...)"
      },
      "token": {
       "type": "string",
       "description": "ERC-20 token contract (0x...)"
      },
      "spender": {
       "type": "string",
       "description": "Approved spender address (0x...)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "allowance": {
       "type": "number"
      },
      "raw_allowance": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "owner": "0x...",
  "token": "0x...",
  "spender": "0x...",
  "decimals": 6,
  "allowance": 1000,
  "raw_allowance": "1000000000"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-token-allowance-lookup-1cd1ae5e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-agent-store.rileycraig14.workers.dev](https://www.zero.xyz/host/x402-agent-store.rileycraig14.workers.dev/llms.txt)
