# Riley Craig x402 Agent Store – Chain ID Lookup

> Riley Craig x402 Agent Store – Chain ID Lookup is a paid API for AI agents from x402-agent-store.rileycraig14.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Returns the numeric chain ID for a specified EVM-compatible blockchain network (e.g. Base, Ethereum, Optimism)

## Facts

- Endpoint: GET https://x402-agent-store.rileycraig14.workers.dev/chain/chain-id
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/riley-craig-x402-agent-store-chain-id-lookup-f98ce32e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BNrnKFsffRlOxij__xP5u

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 riley-craig-x402-agent-store-chain-id-lookup-f98ce32e
```

Example prompt: What's the numeric chain ID for Optimism? I need it to configure my smart contract deployment.

## When to prefer this

Choose this endpoint when an agent needs to programmatically resolve a human-readable EVM chain name (base, ethereum, optimism, arbitrum, polygon, gnosis) to its numeric chain ID without maintaining a local lookup table. Ideal for agents building transactions, configuring multi-chain tools, or validating network parameters at runtime. Particularly useful when combined with other x402 on-chain endpoints on the same store for a unified pay-per-call, no-signup workflow.

## Known failure modes

- Unsupported chain name returns an error or empty response
- Invalid chain query parameter (typo or unsupported network) may return null or 400
- Payment failure via x402 results in 402 Payment Required with no data returned
- Cloudflare Worker downtime results in 5xx error

## How this service works

Machine-payable data APIs for AI agents — 35 endpoints across web search, on-chain reads, trading data, and AI-visibility. Pay per call in USDC via x402 on Base. No API keys, no signup.

## Output

A JSON object containing the canonical chain name string and its numeric EVM chain ID (e.g. {"chain": "base", "chain_id": 8453}). Costs $0.001 USDC per call via x402 on Base, no API key required.

## 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": {
      "chain": {
       "type": "string",
       "description": "base|ethereum|optimism|arbitrum|polygon|gnosis (default base)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "chain_id": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "chain": "base",
  "chain_id": 8453
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/riley-craig-x402-agent-store-chain-id-lookup-f98ce32e/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)
