# Onchain ERC-20 Token Metadata Lookup

> Onchain ERC-20 Token Metadata Lookup is a paid API for AI agents from onchain.x402utils.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-10-02).

Returns ERC-20 token metadata (name, symbol, decimals, total supply) for a given contract address on Base or Ethereum.

## Facts

- Endpoint: GET https://onchain.x402utils.workers.dev/v1/token?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-erc-20-token-metadata-lookup-0b353ab0
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_wOGGMYjLcfzsvAt3BMwxE

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 onchain-erc-20-token-metadata-lookup-0b353ab0
```

Example prompt: Look up the ERC-20 token metadata — name, symbol, decimals, and total supply — for the contract address 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 on Ethereum.

## When to prefer this

Choose this endpoint when you need lightweight, read-only ERC-20 token metadata (name, symbol, decimals, total supply) for a specific contract address on Base or Ethereum without setting up your own RPC infrastructure. It is ideal for AI agents that need on-chain token facts quickly and cheaply ($0.001/call via x402 micropayment) without requiring wallet setup or node access.

## Known failure modes

- Invalid or non-ERC-20 contract address returns an error or empty metadata
- Unsupported chain value returns a validation error
- Contract address not found on the specified chain returns null or error response
- Network/RPC timeout causes a delayed or failed response
- Malformed 0x address format rejected by input validation

## How this service works

Live Base and Ethereum reads for AI agents: balances (ETH + USDC), gas, transaction status, ERC-20 metadata. $0.001 per call via x402 (USDC on Base).

## Output

A JSON object containing the token's name (e.g. 'USD Coin'), symbol (e.g. 'USDC'), number of decimals (e.g. 6), and total supply as a decimal string (e.g. '4000000000.0').

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "address"
     ],
     "properties": {
      "chain": {
       "enum": [
        "base",
        "ethereum"
       ],
       "type": "string",
       "description": "base (default) or ethereum"
      },
      "address": {
       "type": "string",
       "description": "0x-prefixed 20-byte address"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "USD Coin",
  "symbol": "USDC",
  "decimals": 6,
  "total_supply": "4000000000.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-erc-20-token-metadata-lookup-0b353ab0/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from onchain.x402utils.workers.dev](https://www.zero.xyz/host/onchain.x402utils.workers.dev/llms.txt)
