> ## Documentation Index
> Fetch the complete documentation index at: https://docs.validationcloud.io/llms.txt
> Use this file to discover all available pages before exploring further.

# eth_getBlockByHash

Returns information about a block by hash.

This method will use `40` [Compute Units](https://docs.validationcloud.io/nodeapi/about/billing.md).

***

## Reference: [Here](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash)

## **Parameters**

1. `DATA`, 32 Bytes - Hash of a block.
2. `Boolean` - If `true` it returns the full transaction objects, if `false` only the hashes of the transactions are returned.

```javascript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
params: [
  "0x8aa29d1d553e01967d72dea6f60cf1c07c6563c85fa673ebb1e5e17dd27d6bd9",
  false
]
```

## **Returns**

`Object` - A block object, or `null` when no block was found:

* `number`: `QUANTITY` - the block number. `null` when its pending block.
* `hash`: `DATA`, 32 Bytes - hash of the block. `null` when its pending block.
* `parentHash`: `DATA`, 32 Bytes - hash of the parent block.
* `nonce`: `DATA`, 8 Bytes - hash of the generated proof-of-work. `null` when its pending block.
* `sha3Uncles`: `DATA`, 32 Bytes - SHA3 of the uncles data in the block.
* `logsBloom`: `DATA`, 256 Bytes - the bloom filter for the logs of the block. `null` when its pending block.
* `transactionsRoot`: `DATA`, 32 Bytes - the root of the transaction trie of the block.
* `stateRoot`: `DATA`, 32 Bytes - the root of the final state trie of the block.
* `receiptsRoot`: `DATA`, 32 Bytes - the root of the receipts trie of the block.
* `miner`: `DATA`, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
* `difficulty`: `QUANTITY` - integer of the difficulty for this block.
* `totalDifficulty`: `QUANTITY` - integer of the total difficulty of the chain until this block.
* `extraData`: `DATA` - the "extra data" field of this block.
* `size`: `QUANTITY` - integer the size of this block in bytes.
* `gasLimit`: `QUANTITY` - the maximum gas allowed in this block.
* `gasUsed`: `QUANTITY` - the total used gas by all transactions in this block.
* `timestamp`: `QUANTITY` - the unix timestamp for when the block was collated.
* `transactions`: `Array` - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
* `uncles`: `Array` - Array of uncle hashes.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "hash": "0x8aa29d1d553e01967d72dea6f60cf1c07c6563c85fa673ebb1e5e17dd27d6bd9",
    "parentHash": "0x4fdcb1daa062e327e14d37a70e098c68c84241e149ee40143b5df18aecc09651",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "miner": "0x4200000000000000000000000000000000000011",
    "stateRoot": "0xa80f80f6268c41014b663a319bc59a8d1b8245995f00cf50ab41ceeba519d0e4",
    "transactionsRoot": "0xc09e56e9e4e551e347009e598513369d4e222971254b2760f2ab7226edd9e149",
    "receiptsRoot": "0x480f50400694b6b507d41b573ae1b47b1b232771e2ff22f4e6092b42824508b0",
    "logsBloom": "0x2101800000101000000100002040000000000000000000000000000000000120000800000080000000000281010000000000018c000002208000025000000010...",
    "difficulty": "0x0",
    "number": "0x24bcf00",
    "gasLimit": "0x10b07600",
    "gasUsed": "0x10be3d",
    "timestamp": "0x6b1298d7",
    "extraData": "0x010000006400000016000000000007a120",
    "mixHash": "0x754e9f9385227c0fb0c6347e1b3c58bb5f979d2a2baf7af5cb6e23c9e3dd449f",
    "nonce": "0x0000000000000000",
    "baseFeePerGas": "0x7a120",
    "withdrawalsRoot": "0x59c288c0fa8daccf674b60e1daf1e9cb2e8783f7a1f5c68f0614e8b095a28042",
    "blobGasUsed": "0x89350",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x328ef4312005c5f8158cb5d291b6de3b46402b4d2c846d4b4a333a0193e7da4b",
    "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "size": "0x11f8",
    "uncles": [],
    "transactions": [
      "0x3c2ce509c485854992d5de1e47a8202a0b3e93e2270226a5c0a0b80a487e292d",
      "0x976ede826ce145939ff1d6ba66d01aa5c8e9aea7fba57db427949a4516f870ce",
      "0x96aae3174fd229f1341f81d58a5dd6de7fa1fe7158f294c269f7ec604daceb81"
    ],
    "withdrawals": []
  }
}
```

```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://mainnet.worldchain.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x8aa29d1d553e01967d72dea6f60cf1c07c6563c85fa673ebb1e5e17dd27d6bd9",false],"id":1}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.