Get a block by number, hash or tag
/v1/chains/{chain}/blocks/{id}Returns one block of one chain: its number, hash, time, the address that produced it, how much gas it used, and the hashes of the transactions it contains. Use it for a block page in an explorer, to follow a chain block by block, or to turn a block number a user typed into a block. To see a transaction in full, take a hash from data.transactions and fetch it with the transaction endpoint.
What you can pass. {chain} is a chain ID, eip155:1 (Ethereum), eip155:143 (Monad) or eip155:5042 (Arc). {id} says which block:
| Form | Example | Meaning |
|---|---|---|
| Decimal number | 26149668 | The block with that number. No leading zeros. |
| Block hash | 0x44197de439609e2d858fab83f3018ba37537816a3275ee3f037587c018c129fa | The block with that hash. Any letter case. |
latest | latest | The newest block. |
safe | safe | The newest block the chain's validators have voted safe to build on. |
finalized | finalized | The newest block the chain has finalized. It will never be replaced. |
A block number written in hexadecimal, such as 0x18f0224, answers 301 with a Location header holding the same request under the decimal number. Follow it; it costs nothing.
What comes back: data is the block (kind block): number, hash, parent_hash (the previous block), time, miner (the address that receives the block's rewards and tips), gas_used and gas_limit, base_fee_per_gas, tx_count, transactions (the hash of every transaction, in block order) and ext.evm with extras that only some blocks have. meta.finality is finalized or confirmed, and meta.as_of repeats the block's number, hash and time together with the chain's newest finalized block. The tags move as the chain grows, so links.self keeps the tag you used; use data.number or data.hash to refer to that exact block later.
Path parameters
| Name | Type | Description |
|---|---|---|
chainRequired | string | The chain to read, as a CAIP-2 chain ID: |
idRequired | string | Which block to return. It is one of:
A number written in hexadecimal, such as |
Response
The block, wrapped in the {data, meta, links} envelope. data.kind is block.
| Field | Type | Description |
|---|---|---|
| base_fee_per_gas | string | The minimum price per unit of gas for a transaction to be included in this block, in wei (the base fee of EIP-1559). Omitted for blocks before Ethereum's London upgrade (block 12,965,000), which had no base fee. |
| chain | string | The chain this block belongs to. |
| ext | object | Extra fields that are specific to one kind of chain, grouped by kind. |
| gas_limit | integer | The most gas the block was allowed to use in total. |
| gas_used | integer | The total gas used by all the transactions in the block. Gas measures computation. |
| hash | string | The hash of this block. |
| kind | string | Always |
| miner | string | The address that receives the block's rewards and transaction tips. It is the block producer's fee recipient (called the miner before Ethereum moved to proof of stake). |
| number | integer | The block number, which counts blocks from 0 at the start of the chain. |
| parent_hash | string | The hash of the previous block, the one numbered |
| time | string | When the block was produced, to whole seconds. |
| transactions | array of strings | The hash of every transaction in the block, in the order they were executed. Fetch one with the transaction endpoint. The list is empty for a block with no transactions. |
| tx_count | integer | How many transactions the block contains. It equals the length of |
Cost
1 credit. A block is read within 400 ms when you give a number or tag, and within 1.5 s when you give a hash.
Errors
| Status | Code |
|---|---|
| 400 | invalid_id |
| 404 | unsupported_chainnot_found |
| 429 | rate_limitedcredits_exhausted |
| 500 | internal |
| 503 | upstream_unavailable |
| 504 | deadline_exceeded |
400 invalid_id if the chain ID or block ID is malformed, for example abc, a number with leading zeros or a hash of the wrong length. 404 unsupported_chain if the chain ID is well formed but not served. 404 not_found if the chain has no such block: a number above the latest block, an unknown hash, or the hash of a block that is no longer part of the chain. 429 rate_limited or credits_exhausted. 503 upstream_unavailable or 504 deadline_exceeded if the chain data source is down or slow; retry.