# skills.onesource.io Ethereum Block by Number

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

Fetch an Ethereum block header and transaction hashes for a given block number, tag, or hex value via eth_getBlockByNumber

## Facts

- Endpoint: GET https://skills.onesource.io/api/chain/block/22000000
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-16
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/skills-onesource-io-f5effde3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9Y1u2IEXUMM3eZFhWPpxT

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 skills-onesource-io-f5effde3
```

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

## When to prefer this

Use this endpoint when you need on-chain block-level data — headers, timestamps, miner info, or transaction hashes — for a specific block by integer, hex, or tag (latest/finalized/etc.) across Ethereum mainnet, Base, Avalanche, MegaETH, or Sepolia. Prefer this over general blockchain explorers when you need programmatic, structured block data without web scraping.

## Known failure modes

- Block number does not exist yet (future block) — returns error or empty
- Invalid hex format for block number — 400 bad request
- Unsupported network value — validation error
- Network RPC timeout or node unavailability — 5xx error
- Block tag 'pending' may return null if no pending block exists

## How this service works

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

## Output

Returns the block header fields (number, hash, parentHash, timestamp, miner, gasUsed, gasLimit, difficulty, etc.) and a list of transaction hashes included in the specified block, sourced via eth_getBlockByNumber from a live Ethereum RPC.

## Example request

```json
{
 "number": "latest",
 "network": "ethereum"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "number": {
   "oneOf": [
    {
     "type": "integer",
     "minimum": 0
    },
    {
     "enum": [
      "latest",
      "pending",
      "earliest",
      "safe",
      "finalized"
     ],
     "type": "string"
    },
    {
     "type": "string",
     "pattern": "^0x[a-fA-F0-9]+$"
    }
   ]
  },
  "network": {
   "enum": [
    "ethereum",
    "sepolia",
    "avax",
    "megaeth",
    "megaeth-testnet",
    "base"
   ],
   "type": "string",
   "default": "ethereum"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "_truncated",
  "_originalSize"
 ],
 "properties": {
  "_truncated": {
   "type": "boolean"
  },
  "_originalSize": {
   "type": "number"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/skills-onesource-io-f5effde3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from skills.onesource.io](https://www.zero.xyz/host/skills.onesource.io/llms.txt)
