# Agent402 ERC-20 Token Allowance Lookup

> Agent402 ERC-20 Token Allowance Lookup is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns the current ERC-20 token allowance granted by an owner wallet to a spender address on a specified EVM network.

## Facts

- Endpoint: POST https://agent402.tools/api/token-allowance
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-erc-20-token-allowance-lookup-2bdaf174
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4VVeEc7MYAGBaPWz9Rn5A

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-erc-20-token-allowance-lookup-2bdaf174 -d '<json body>'
```

Example prompt: Check how much USDC the Uniswap Universal Router (0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD) is allowed to spend from wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 on Ethereum mainnet.

## When to prefer this

Use this endpoint when an AI agent needs to programmatically verify whether a wallet has already approved a specific spender to move ERC-20 tokens before initiating a DeFi transaction. It is preferable over general blockchain RPC calls because it abstracts away raw contract ABI calls, automatically decodes decimals and symbol, flags unlimited approvals, and returns structured JSON. Best suited for pre-transaction checks, security audits of token approvals, and DeFi workflow automation across Ethereum, Base, Polygon, Arbitrum, and Optimism.

## Known failure modes

- Invalid or malformed contract address returns an error or zero allowance
- Unsupported network name causes a 400 or validation error
- Non-ERC-20 contract address (e.g. EOA or NFT contract) may return unexpected results
- Network congestion or Alchemy upstream outage causes timeout
- Owner or spender address not checksummed may cause parsing issues on some chains

## How this service works

How much of an ERC-20 token a spender contract is approved to move from an owner wallet - the approval check an agent runs before a swap, a bridge, or an x402 transferWithAuthorization flow. Returns the allowance as an exact decimal string scaled by the token's decimals, the raw uint256, and an `unlimited` flag for max-uint style approvals.

## Output

Returns a JSON object containing the current allowance as both a raw big-integer string and a human-readable decimal string, along with the token symbol, decimals, chain ID, network name, owner, spender, contract address, data source (Alchemy), whether the approval is unlimited, and a timestamp of when the data was fetched.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "owner": {
   "type": "string",
   "description": "Wallet that granted (or did not grant) the approval."
  },
  "network": {
   "type": "string",
   "description": "ethereum / base / polygon / arbitrum / optimism (default ethereum)."
  },
  "spender": {
   "type": "string",
   "description": "Contract or wallet whose allowance to read."
  },
  "contract": {
   "type": "string",
   "description": "0x-prefixed 40-char ERC-20 contract address."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "raw": "0",
  "owner": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
  "source": "alchemy",
  "symbol": "USDC",
  "chainId": 1,
  "network": "ethereum",
  "spender": "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
  "contract": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "decimals": 6,
  "allowance": "0",
  "fetchedAt": "2026-08-22T12:00:00.000Z",
  "unlimited": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-erc-20-token-allowance-lookup-2bdaf174/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)
