> For the complete documentation index, see [llms.txt](https://doc.data123.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.data123.io/reference/api-reference/aleo/rpc-methods/get-blocks.md).

# Get Blocks

## **ENDPOINT**

{% code fullWidth="false" %}

```
GET https://api.data123.io/aleo/<API KEY>/v1/testnet3/blocks?start={start_height}&end={end_height}
```

{% endcode %}

### **Arguments**

<table><thead><tr><th width="198">Parameter</th><th width="128">Type</th><th width="119">Request</th><th>Description</th></tr></thead><tbody><tr><td>start_height</td><td>u32</td><td>Yes</td><td>The starting block height of the requested blocks</td></tr><tr><td>end_height</td><td>u32</td><td>Yes</td><td>The ending block height of the requested blocks</td></tr></tbody></table>

### **Response**

| Parameter | type                                                 | Description           |
| --------- | ---------------------------------------------------- | --------------------- |
| result    | [array](https://developer.aleo.org/concepts/blocks/) | The latest state root |

### Request

{% tabs %}
{% tab title="REST" %}

```bash
curl https://api.data123.io/aleo/<API KEY>/v1/testnet3/blocks?start_height=1000&end_height=1005
```

{% endtab %}

{% tab title="JSON-RPC" %}

<pre class="language-bash"><code class="lang-bash"><strong>curl https://api.data123.io/aleo/&#x3C;API KEY>/rpc/v1/testnet3 \
</strong>    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"getBlocks","params":[1000,1005],"id":1}'
</code></pre>

{% endtab %}
{% endtabs %}
