# ERC-20 Allowance Lookup on Base

> ERC-20 Allowance Lookup on Base is a paid API for AI agents from x402-data-api.sigrunner.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-20).

Returns the ERC-20 token allowance granted by an owner to a spender on Base, with raw and formatted values plus an unlimited approval flag.

## Facts

- Endpoint: GET https://x402-data-api.sigrunner.workers.dev/chain/allowance?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/erc-20-allowance-lookup-on-base-169e82b6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1DYz-Xkx2VBG4rdcqErm0

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-allowance-lookup-on-base-169e82b6
```

Example prompt: What is the USDC allowance that wallet 0x5765ae06a52dc7A0BB71c36A11db512c7ea9ed10 has granted to the spender 0x4200000000000000000000000000000000000006 on Base — is it unlimited?

## When to prefer this

Choose this endpoint when an AI agent needs to programmatically check ERC-20 token approvals on Base before executing a trade, transfer, or DeFi interaction — especially when detecting unlimited approvals is important for security gating. Prefer this over general blockchain RPCs when you want a pre-parsed, human-readable allowance with the unlimited flag already computed, without writing custom on-chain call logic.

## Known failure modes

- Invalid or malformed owner/spender/token address returns an error or empty result
- Token address not an ERC-20 contract on Base may return zero allowance or error
- Network/RPC issues on Base may cause timeouts
- Missing required query parameters (owner, token, spender) results in a bad request response
- Payment failure via x402 protocol blocks access to the endpoint

## How this service works

ERC-20 allowance(owner, spender) on Base, raw + formatted, flags unlimited approvals.

## Output

Returns a JSON object containing the chain (base), owner address, token address, spender address, token decimals, the allowance as a human-readable integer, the raw allowance string (in smallest units), and a boolean is_unlimited flag indicating whether the approval is effectively unlimited (max uint256).

## 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",
     "properties": {
      "owner": {
       "type": "string",
       "description": "owner address"
      },
      "token": {
       "type": "string",
       "description": "ERC-20 address"
      },
      "spender": {
       "type": "string",
       "description": "spender address"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "token",
      "owner",
      "spender",
      "allowance_raw",
      "allowance",
      "decimals",
      "is_unlimited",
      "chain"
     ],
     "properties": {
      "chain": {
       "type": "string"
      },
      "owner": {
       "type": "string"
      },
      "token": {
       "type": "string"
      },
      "spender": {
       "type": "string"
      },
      "decimals": {
       "type": "integer"
      },
      "allowance": {
       "type": "integer"
      },
      "is_unlimited": {
       "type": "boolean"
      },
      "allowance_raw": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "owner": "0x5765ae06a52dc7A0BB71c36A11db512c7ea9ed10",
  "token": "0x833589fCd6eDb6E08f4c7C32D4f71b54bdA02913",
  "spender": "0x4200000000000000000000000000000000000006",
  "decimals": 6,
  "allowance": 0,
  "is_unlimited": false,
  "allowance_raw": "0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/erc-20-allowance-lookup-on-base-169e82b6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-data-api.sigrunner.workers.dev](https://www.zero.xyz/host/x402-data-api.sigrunner.workers.dev/llms.txt)
