# Base ERC-20 Token Allowance Lookup

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

Returns the current ERC-20 token allowance (approved spending limit) that a spender address has been granted by an owner wallet on Base mainnet.

## Facts

- Endpoint: GET https://agent-data-tools.revmesh2074.workers.dev/base-allowance?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/base-erc-20-token-allowance-lookup-0cae0a61
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_eJaD36jmI334aexbPcHg8

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 base-erc-20-token-allowance-lookup-0cae0a61
```

Example prompt: Check how much USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) my wallet 0x4200000000000000000000000000000000000006 has approved the Uniswap Permit2 contract (0x000000000022D473030F116dDEE9F6B43aC78BA3) to spend on Base.

## When to prefer this

Use this endpoint when an AI agent needs to check ERC-20 token spending permissions on Base mainnet without running its own blockchain node or holding an API key. It is ideal for pre-transaction validation in DeFi workflows (confirming a router can spend tokens before swapping), security audits of wallet approvals, or any agent pipeline that needs real-time on-chain allowance data for a fraction of a cent per call via x402 USDC micropayment.

## Known failure modes

- Invalid or malformed wallet/contract address returns an error
- Token address is not a valid ERC-20 contract on Base — may return empty or error response
- Spender address with no approval returns allowance '0' and approved: false (not an error)
- Network or RPC timeout causes a failed lookup
- Payment failure (insufficient USDC balance or allowance for x402 fee) prevents the request

## How this service works

Read public static documentation as text or Markdown with code, tables, headings and links for $0.002 USDC on Base via x402. Inspect real cached examples and an unsigned quote, then buy with a capped Node CLI. No account or API key. No JavaScript rendering, authenticated or paywalled access. Other paid utilities remain available.

## Output

Returns a JSON object with the chain name ('base'), owner address, token contract address, token symbol, spender address, whether any approval exists (approved boolean), raw allowance in base units, formatted allowance as a human-readable string, token decimals, and a flag indicating whether the approval is unlimited (unlimited boolean).

## 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": {
      "owner": {
       "type": "string",
       "description": "Wallet address that holds the token (0x...)"
      },
      "token": {
       "type": "string",
       "description": "ERC-20 token contract address on Base (0x...)"
      },
      "spender": {
       "type": "string",
       "description": "Address allowed to spend, usually a router or protocol contract (0x...)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "owner": "0x4200000000000000000000000000000000000006",
  "token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
  "symbol": "USDC",
  "spender": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
  "approved": false,
  "decimals": 6,
  "allowance": "0",
  "unlimited": false,
  "allowanceFormatted": "0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/base-erc-20-token-allowance-lookup-0cae0a61/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-data-tools.revmesh2074.workers.dev](https://www.zero.xyz/host/agent-data-tools.revmesh2074.workers.dev/llms.txt)
