> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.chainstack.com/feedback

```json
{
  "path": "/reference/getblockswithlimit",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# getBlocksWithLimit | Solana

<Note>
  **Range limit:** maximum 500,000 blocks per request. **Archive data:** this method supports fetching historical data on [Global Nodes](/docs/global-elastic-node). See [Solana method limits](/docs/limits#solana-method-limits).
</Note>

# Solana `getBlocksWithLimit` method

The Solana `getBlocksWithLimit` method returns a list of confirmed blocks starting from a specified slot for a maximum limit.

This method provides a list of block heights that have been confirmed by the network. It is useful for retrieving a specific number of blocks for analysis or display.

<Check>
  **Get your own node endpoint today**

  [Start for free](https://console.chainstack.com/) and get your app to production levels immediately. No credit card required.

  You can sign up with your GitHub, X, Google, or Microsoft account.
</Check>

## Parameters

* `startSlot` — the start slot of the range.
* `limit` — the maximum number of blocks to return.

## Response

* `value` — an array of confirmed block heights starting from the `startSlot` up to the specified `limit`.

## Use case

A practical use case for `getBlocksWithLimit` is to retrieve a specific number of confirmed blocks for analysis or display. This can be useful for block explorers, wallets, or other applications that need to display or make use of this information.


## OpenAPI

````yaml /openapi/solana_node_api/getBlocksWithLimit.json POST /9de47db917d4f69168e3fed02217d15b
openapi: 3.0.0
info:
  title: getBlocksWithLimit example
  version: 1.0.0
  description: This is an API example for Solana's getBlocksWithLimit.
servers:
  - url: https://nd-326-444-187.p2pify.com
security: []
paths:
  /9de47db917d4f69168e3fed02217d15b:
    post:
      tags:
        - query
      summary: getBlocksWithLimit
      operationId: getBlocksWithLimit
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: integer
                  default: 1
                jsonrpc:
                  type: string
                  default: '2.0'
                method:
                  type: string
                  default: getBlocksWithLimit
                params:
                  type: array
                  items:
                    type: integer
                    description: >-
                      The start slot of the blocks and the maximum number of
                      blocks
                    default: 166974442
                  default:
                    - 166974442
                    - 100
      responses:
        '200':
          description: Blocks details
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                  id:
                    type: integer
                  result:
                    type: array
                    items:
                      type: integer

````