# Block402 Ethereum JSON-RPC API

> Block402 Ethereum JSON-RPC API is a paid API for AI agents from api.block402.xyz, paid per call via x402, $0.0025/call, status unknown (last checked 2026-10-12).

Query Ethereum blockchain data via standard JSON-RPC methods through a pay-per-request API designed for AI agents

## Facts

- Endpoint: POST https://api.block402.xyz/rpc/ethereum?utm_source=zero.xyz
- Price: $0.0025/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/block402-ethereum-json-rpc-api-8c86c784
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_7YmNEEIQYmuazwcf7hlGc

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 block402-ethereum-json-rpc-api-8c86c784 -d '<json body>'
```

Example prompt: What's the current ETH balance of wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045, and what's the current gas price on Ethereum right now?

## When to prefer this

Choose this endpoint when an AI agent needs to query live Ethereum blockchain state — balances, transactions, blocks, logs, contract code — on a pay-per-request basis without committing to a subscription. Ideal for agents that need occasional or unpredictable Ethereum RPC access and want to pay per call in USDC via x402. Prefer over free public RPC nodes when reliability and metered billing matter, and over subscription RPC providers when usage is sporadic.

## Known failure modes

- Invalid or unsupported JSON-RPC method returns an error response
- Malformed params array causes a parse or invalid params error
- Querying a block or transaction hash that doesn't exist returns null result
- Payment failure or insufficient USDC balance prevents request from being processed
- Rate limiting or network congestion may cause timeouts
- Write methods (eth_sendRawTransaction, eth_sign, etc.) are not supported as this is read-only

## How this service works

Blockchain intelligence for AI agents. Query blockchain data through a read-only, pay-per-request API with x402.

## Output

A JSON-RPC 2.0 response object containing the result of the requested Ethereum RPC call — which may include block data (hash, number, transactions, timestamp), account balances in wei, transaction details or receipts, contract bytecode, storage values, event logs, gas price estimates, or fee history depending on the method called.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "id": {
   "type": [
    "string",
    "integer"
   ]
  },
  "method": {
   "enum": [
    "eth_chainId",
    "eth_blockNumber",
    "eth_syncing",
    "net_version",
    "net_listening",
    "net_peerCount",
    "web3_clientVersion",
    "eth_gasPrice",
    "eth_maxPriorityFeePerGas",
    "eth_blobBaseFee",
    "web3_sha3",
    "eth_getBlockTransactionCountByNumber",
    "eth_getUncleCountByBlockNumber",
    "eth_getBlockByNumber",
    "eth_getTransactionByBlockNumberAndIndex",
    "eth_getUncleByBlockNumberAndIndex",
    "eth_getRawTransactionByBlockNumberAndIndex",
    "eth_getBlockTransactionCountByHash",
    "eth_getUncleCountByBlockHash",
    "eth_getBlockByHash",
    "eth_getTransactionByBlockHashAndIndex",
    "eth_getUncleByBlockHashAndIndex",
    "eth_getRawTransactionByBlockHashAndIndex",
    "eth_getBalance",
    "eth_getTransactionCount",
    "eth_getCode",
    "eth_getStorageAt",
    "eth_getTransactionByHash",
    "eth_getTransactionReceipt",
    "eth_getRawTransactionByHash",
    "eth_feeHistory",
    "eth_call",
    "eth_estimateGas",
    "eth_createAccessList",
    "eth_getProof",
    "eth_getLogs",
    "eth_getBlockReceipts"
   ],
   "type": "string"
  },
  "params": {
   "type": "array",
   "maxItems": 20
  },
  "jsonrpc": {
   "const": "2.0"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "id": 1,
  "result": "0x1",
  "jsonrpc": "2.0"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/block402-ethereum-json-rpc-api-8c86c784/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.block402.xyz](https://www.zero.xyz/host/api.block402.xyz/llms.txt)
