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

> 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-getblocktransactioncountbynumber.md](https://docs.linea.build/api/reference/eth-getblocktransactioncountbynumber.md).

# eth_getBlockTransactionCountByNumber

# `eth_getBlockTransactionCountByNumber`

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

## Parameters

-   `blockParameter`: _[required]_ Hexadecimal block number, or `latest`, `earliest`, `pending`, `finalized`.

## Returns

Hexadecimal integer of the transaction count.

## Example

Request

LanguageCurlEthers.jsViem

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

Example response

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