Skip to main content

eth_getBlockByNumber RPC Method

Returns information of the block matching the given block number.

Updated on
May 06, 2026

Parameters

blockNumber/tag
string
REQUIRED

The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized

transaction detail flag
boolean
REQUIRED

The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions

Returns

object
object

A block object, or null when no block was found. The block object contains the following fields:

baseFeePerGas

A string of the base fee encoded in hexadecimal format. Please note that this response field will not be included in a block requested before the EIP-1559 upgrade

difficulty

The integer of the difficulty for this block encoded as a hexadecimal

extraData

The “extra data” field of this block

gasLimit

The maximum gas allowed in this block encoded as a hexadecimal

gasUsed

The total used gas by all transactions in this block encoded as a hexadecimal

hash

The block hash of the requested block. null if pending

logsBloom

The bloom filter for the logs of the block. null if pending

miner

The address of the beneficiary to whom the mining rewards were given

mixHash

A string of a 256-bit hash encoded as a hexadecimal

nonce

The hash of the generated proof-of-work. null if pending

number

The block number of the requested block encoded as hexadecimal. null if pending

parentHash

The hash of the parent block

receiptsRoot

The root of the receipts trie of the block

sha3Uncles

The SHA3 of the uncles data in the block

size

The size of this block in bytes as an Integer value encoded as hexadecimal

stateRoot

The root of the final state trie of the block

timestamp

The UNIX timestamp for when the block was collated

totalDifficulty

The integer of the total difficulty of the chain until this block encoded as a hexadecimal

transactions

An array of transaction objects - please see eth_getTransactionByHash for exact shape

transactionsRoot

The root of the transaction trie of the block

uncles

An array of uncle hashes

withdrawals
array

Withdrawal objects for this block (EIP-4895). Omitted on pre-Shanghai blocks.

index
string

The index of the withdrawal to uniquely identify each withdrawal

validatorIndex
string

The index of the validator who initiated the withdrawal

address
string

The address to which the withdrawn amount is sent

amount
string

The amount of ether, provided in hexadecimal format, corresponding to a certain value in gwei

withdrawalsRoot
string

Merkle root of withdrawal data (EIP-4895). Omitted on pre-Shanghai blocks.

Request
Response
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": {
5
"difficulty": "0x2",
6
"extraData": "0xd98301090a846765746889676f312e31352e3133856c696e7578000000000000b989f09eae24e338025bd0ee1f28175af6b855d5d4ddc03a9b63a8cb4a188f880944e20efe6de16f84dd67b8903ba90aa44151e0bf0c3da5fc2784f541c5d33600",
7
"gasLimit": "0xe4e1c0",
8
"gasUsed": "0x11f60",
9
"hash": "0x012b6d53af98282f327ab79e2c555ed473db5229a9c1ed6e4a7e55fc9cd24b7c",
10
"logsBloom": "0x00000000000000000000000000000000000000000080000000000000000000000000000000000200000000000002000010000000000000000000000200000040020000000000000020000008000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000010000000000001000010000000000000000000000000000000000000000000000000000000040000000000080000000000000000000000000000000000000000000000000000000002000000000000000000000000008000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000",
11
"miner": "0x0000000000000000000000000000000000000000",
12
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
13
"nonce": "0x0000000000000000",
14
"number": "0xc5043f",
15
"parentHash": "0x927bf234093010ee5c2dd9f87933d9b90b96eb64b8ba99fea73afd90cbcf53a1",
16
"receiptsRoot": "0x618b15e1e08fe489df4b91f45f801067d39580b76a8e016160bb17a72191c95f",
17
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
18
"size": "0x30f",
19
"stateRoot": "0xa05e04d3f1db7078aa2fe572771a04b610c4831a7d2ebb9970e376a5ed8ef0e0",
20
"timestamp": "0x62b597bf",
21
"totalDifficulty": "0x18a087f",
22
"transactions": [
23
"0xbc0a6f998f14ab584752f4762b51192c1779d535b1f70ac9dfba817881d222fa"
24
],
25
"transactionsRoot": "0x0aaad30fea7f0a590dfe8883e9985420d66d4a153141d78c4cada9f73822a15c",
26
"uncles": []
27
}
28
}
1
{
2
"jsonrpc": "2.0",
3
"id": 1,
4
"result": {
5
"difficulty": "0x2",
6
"extraData": "0xd98301090a846765746889676f312e31352e3133856c696e7578000000000000b989f09eae24e338025bd0ee1f28175af6b855d5d4ddc03a9b63a8cb4a188f880944e20efe6de16f84dd67b8903ba90aa44151e0bf0c3da5fc2784f541c5d33600",
7
"gasLimit": "0xe4e1c0",
8
"gasUsed": "0x11f60",
9
"hash": "0x012b6d53af98282f327ab79e2c555ed473db5229a9c1ed6e4a7e55fc9cd24b7c",
10
"logsBloom": "0x00000000000000000000000000000000000000000080000000000000000000000000000000000200000000000002000010000000000000000000000200000040020000000000000020000008000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000010000000000001000010000000000000000000000000000000000000000000000000000000040000000000080000000000000000000000000000000000000000000000000000000002000000000000000000000000008000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000",
11
"miner": "0x0000000000000000000000000000000000000000",
12
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
13
"nonce": "0x0000000000000000",
14
"number": "0xc5043f",
15
"parentHash": "0x927bf234093010ee5c2dd9f87933d9b90b96eb64b8ba99fea73afd90cbcf53a1",
16
"receiptsRoot": "0x618b15e1e08fe489df4b91f45f801067d39580b76a8e016160bb17a72191c95f",
17
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
18
"size": "0x30f",
19
"stateRoot": "0xa05e04d3f1db7078aa2fe572771a04b610c4831a7d2ebb9970e376a5ed8ef0e0",
20
"timestamp": "0x62b597bf",
21
"totalDifficulty": "0x18a087f",
22
"transactions": [
23
"0xbc0a6f998f14ab584752f4762b51192c1779d535b1f70ac9dfba817881d222fa"
24
],
25
"transactionsRoot": "0x0aaad30fea7f0a590dfe8883e9985420d66d4a153141d78c4cada9f73822a15c",
26
"uncles": []
27
}
28
}
Don't have an account yet?
Create your Quicknode endpoint in seconds and start building
Get started for free