> ## 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: [
  "0xbfe147b96599be9c1bde4b59689187ba3b60cecb1872144488cbb3b8167d2b5c",
  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": {
    "number": "0x1f42ac4",
    "hash": "0xbfe147b96599be9c1bde4b59689187ba3b60cecb1872144488cbb3b8167d2b5c",
    "mixHash": "0x0d72885160b89d933f84df79d774d2b72d21dc536dfb18b3f91fe72eb7e95a6b",
    "parentHash": "0xbceceb160b3752ef8b7a2b12346f3ab9fa3ed547113fd0871a067d6984a22947",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x242001000108300001000000800000000004000400000000000002100000000808000c0814000000000000000040000000040800000021048224000020204200...",
    "transactionsRoot": "0xb8e17e0cd3d8d14c35c71124947117a672b8cf42e05201d906bf799c2bd6fd8f",
    "stateRoot": "0xe705e3ca1ba8caff78f9072ac7754e9d637bd63f52b83c2a1b312f3ecfbeea2c",
    "receiptsRoot": "0xb43910876ee6950223633e705906738b284af958b071cd4faa4676094921e771",
    "miner": "0xfd5fb23e06e46347d8724486cdb681507592e237",
    "difficulty": "0x0",
    "extraData": "0x01000075300058eeb10001843800000000000000000000000000000000000000",
    "baseFeePerGas": "0x7",
    "size": "0x1b83",
    "gasLimit": "0x77359400",
    "gasUsed": "0x5f57c2",
    "timestamp": "0x6b115c4c",
    "uncles": [],
    "transactions": [
      "0x5dc8d47cfcda136bcd84d3661c7bbaf4e53e23ba70b46bb5a310481ed724a034",
      "0x916661b12998eff4f6a30977204211d93aa60aa3a06bb5d1d178a35a1f28da0c",
      "0x85302bc658ca2eb6a0d9f2018114fdb9938d059153c4def0666fb2a7f0c69492",
      "0x0e166619d0397f6bc0d82df8682cce29866281ac682a96f08df311a5ed6cb8c9",
      "0x1b42e8484080b0a15a1a68442362b44700103851e1a50abd35666ac561a91f15",
      "0x096a6f67f7b4c6a9c272f1ea85d88d83439d93843ebcc0590f3eed87e0985965",
      "0x8912a6da1e0ca339eb875913e7221f926ad2e8eaf11ae0d777821a6182a474c4",
      "0x2e73ed9001c4208a8695174af638de3b118272a1629e37e5387cb81182b8ded2",
      "0x7c4ceb242b453d4a2a48652846f7789ae37680647799e84d628e5c8496c4426b",
      "0xca8903ef0e9e130f24d139c26db36aaebb5643958974e5a87a7183a5296fadfa",
      "0x9e8a45812ef4439f4a44dc9296f55f5218273832c7f3f263b000751e1fea1026"
    ],
    "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "withdrawals": [],
    "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "blobGasUsed": "0x0",
    "excessBlobGas": "0x0",
    "parentBeaconBlockRoot": "0x0000000000000000000000000000000000000000000000000000000000000000"
  }
}
```

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


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