> For the complete documentation index, see [llms.txt](/llms.txt).

# `getBlocksWithLimit`

Returns a list of confirmed blocks starting at the given slot, up to the specified limit. This method uses [160 credits](/services/get-started/pricing/) from your daily balance.

## Parameters[​](#parameters "Direct link to Parameters")

- `startSlot`: (integer) _[required]_ - The starting slot number for the range of blocks to query.
- `limit`: (integer) _[required]_ - The maximum number of confirmed blocks to return, starting from the specified slot. Must be no more than 500,000 blocks higher than `startSlot`.
- `config`: (object) _[optional]_ - Configuration object with the following options:  
  - `commitment`: (string) _[optional]_ - The commitment level to use for the query. The default is `finalized`. Possible values are:  
    - `finalized` - Queries the most recent block confirmed by a super majority of the cluster as having reached maximum lockout, meaning the cluster has recognized this block as finalized.
    - `confirmed` - Queries the most recent block that has been voted on by a super majority of the cluster.

## Returns[​](#returns "Direct link to Returns")

`result`: (integer) - An array of `u64` integers representing the block numbers from the `startSlot` up to the specified `limit`.

### Request[​](#request "Direct link to Request")

- curl

```
curl https://solana-mainnet.infura.io/v3/<YOUR-API-KEY> \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id":1, "method":"getBlocksWithLimit", "params":[371661723, 10]}'

```

### Response[​](#response "Direct link to Response")

- JSON

```
{
  "jsonrpc":"2.0",
  "result":[371661723,371661724,371661725,371661726,371661727,371661728,371661729,371661730,371661731,371661732],
  "id":1
}

```
