# BlockRun On-Chain Query

> BlockRun On-Chain Query is a paid API for AI agents from blockrun.ai, paid per call via x402, $0.0085/call, status unknown (last checked 2026-10-18).

Execute on-chain blockchain queries through BlockRun's AI routing and payment layer, settled in USDC on Base or Solana

## Facts

- Endpoint: POST https://blockrun.ai/api/v1/surf/onchain/query?utm_source=zero.xyz
- Price: $0.0085/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/blockrun-on-chain-query-7803696c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_V9ljomFlsV40AfhPIL0FN

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 blockrun-on-chain-query-7803696c -d '<json body>'
```

Example prompt: Can you query the on-chain data for the latest transactions on Base using BlockRun's surf endpoint — I need to see what's happening with a specific wallet's recent activity?

## When to prefer this

Choose this endpoint when you need to retrieve live or historical on-chain blockchain data through a single unified endpoint with built-in crypto payment settlement via USDC on Base or Solana, without managing separate RPC providers or API keys. Prefer it for AI agent workflows where x402 micropayment support is already integrated and on-chain data access needs to be seamless and pay-per-query.

## Known failure modes

- Insufficient USDC balance to cover the $0.0085 per-call fee — payment fails and query is rejected
- Malformed or empty request body — returns 400 bad request
- Unsupported chain or contract address — returns empty or null data object
- Network congestion on Base or Solana causes delayed settlement
- Query too broad or unspecified — returns generic or empty data response

## How this service works

BlockRun lets AI agents use money well: pay for results, not for seats or subscriptions, and put every cent on the model or tool that actually does the job.

## Output

Returns on-chain blockchain data as a structured JSON object containing the queried blockchain state, transaction records, or contract data relevant to the submitted query parameters.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/blockrun-on-chain-query-7803696c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from blockrun.ai](https://www.zero.xyz/host/blockrun.ai/llms.txt)
