# Linea eth_getBlockByNumber

> Get block by block number on Linea.

# `eth_getBlockByNumber`

<Description />

## Parameters

- `blockParameter`: (string) [_required_] A hexadecimal block number, or one of the tags `latest`, `earliest`, `pending` or `finalized`. See the [default block parameter](https://ethereum.org/en/developers/docs/apis/json-rpc/#default-block).
  :::warning
  `safe` isn't supported. Use `finalized` instead.
  Learn more about [Linea's layer 2 finalization](https://docs.linea.build/developers/guides/finalized-block).
  :::
- `show transaction details flag`: [_required_] If set to `true`, returns the full transaction objects. If `false` returns only the hashes of the transactions.

## Returns

<Returns />

## Example

<Example />

### Request

<Tabs>
  <TabItem value="curl">

```bash
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}'
```

  </TabItem>
  <TabItem value="WSS">

```bash
wscat -c wss://linea-mainnet.infura.io/ws/v3/<YOUR-API-KEY> -x '{"jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x5BAD55", false], "id": 1}'
```

  </TabItem>
</Tabs>

### Response

<Response />
