<!-- Canonical: https://docs.linea.build/api/reference/eth-getblocktransactioncountbyhash -->

> For the complete Linea documentation index, see [llms.txt](/llms.txt).
> Agents can fetch this page as Markdown at [https://docs.linea.build/api/reference/eth-getblocktransactioncountbyhash.md](https://docs.linea.build/api/reference/eth-getblocktransactioncountbyhash.md).

# eth_getBlockTransactionCountByHash

# `eth_getBlockTransactionCountByHash`

Returns the number of transactions in a block, given the block hash.

## Parameters

-   `blockHash`: _[required]_ 32-byte hash of a block.

## Returns

Hexadecimal integer of the transaction count, or `null` if no block is found.

## Example

### Request

```bash
curl https://rpc.linea.build \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockTransactionCountByHash",
    "params": [
      "0x8ebe90fa04dbbf92199c07cbb56c1f908343c69f3dd246a2f7d95272589dc550"
    ],
    "id": 1
  }'
```

### Response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1"
}
```
