# getFirstAvailableBlock

> Returns the oldest block from which every later block can be retrieved with getBlock.

Source: https://docs.constant-k.com/rpc/http/getfirstavailableblock/

`getFirstAvailableBlock` returns the oldest block from which every later block can be retrieved with `getBlock`. On Blade Runner and Nexus tier plans it returns `0`, the genesis block, because [Cube Runner](/cube-runner/) can retrieve every block since genesis from long-term storage.

On Free and Operator tier plans it returns the oldest block from which the region holds every later block, in its cache or its ledger. The value rises as old blocks are pruned. Older blocks are still returned when a cache in any region holds them.

A backward walk through `getBlock` history that needs every block stops at this slot. [`minimumLedgerSlot`](/rpc/http/minimumledgerslot/) marks the same limit for `getTransaction` and `getSignaturesForAddress`.

- Transport: HTTP, JSON-RPC 2.0 `POST` to `https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY` (New York) or `https://rpc-frankfurt.constant-k.com/?api-key=YOUR_API_KEY` (Frankfurt) or `https://rpc-amsterdam.constant-k.com/?api-key=YOUR_API_KEY` (Amsterdam). The key also works as an `x-api-key` header.
- Category: Blocks
- Availability: All plans

## Parameters

None.

## Result

- `result` (integer, optional): The oldest slot from which every later block can be retrieved with `getBlock`. `0` on Blade Runner and Nexus tier plans.

## Example: Get the first available block (Free or Operator)

Request:

```bash
curl "https://rpc-newyork.constant-k.com/?api-key=YOUR_API_KEY" \
  -X POST \
  -H "Content-Type: application/json" \
  -d '{ "jsonrpc": "2.0", "id": 1, "method": "getFirstAvailableBlock" }'
```

Response:

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

## Notes

- On Free and Operator tier plans, a `getBlock` request for a block that no cache, ledger or other region holds returns code `-32001` with HTTP `200`. The message and `data.firstAvailableBlock` carry this value.

