# OneSource Ethereum Block Header by Number

> OneSource Ethereum Block Header by Number is a paid API for AI agents from api.onesource.io, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-13).

Fetches an Ethereum block header and its transaction hashes by block number, tag, or hex value via eth_getBlockByNumber

## Facts

- Endpoint: GET https://api.onesource.io/api/chain/block/:number
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onesource-ethereum-block-header-by-number-974e6003
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WpS22K-QFrdchYlEuBnu6

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 onesource-ethereum-block-header-by-number-974e6003
```

Example prompt: Can you pull the block header and transaction hashes for Ethereum mainnet block number 20000000?

## When to prefer this

Use this endpoint when you need block-level metadata and transaction hashes for a specific Ethereum or Sepolia block, especially when identified by number, tag (latest/pending/earliest/safe/finalized), or hex value. Prefer this over raw RPC providers when you need a simple REST interface with x402 micropayment billing rather than managing a full RPC connection.

## Known failure modes

- Invalid block number format returns an error
- Block number beyond the current chain head returns not found
- Invalid network enum value returns a validation error
- Pending or future block may return null if not yet available
- Request without valid x402 payment returns 402 Payment Required

## How this service works

Fetch an Ethereum block header and transaction hashes by number, tag, or hex via eth_getBlockByNumber

## Output

Returns an Ethereum block header object including fields like block hash, parent hash, miner, timestamp, gas used, gas limit, and an array of transaction hashes for all transactions included in that block.

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onesource-ethereum-block-header-by-number-974e6003/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.onesource.io](https://www.zero.xyz/host/api.onesource.io/llms.txt)
