> For a complete page index of the Captain API documentation, fetch https://docs.captain.dev/llms.txt?excludeSpec=true

# List Indexes

GET https://acme.captain.dev/v1/indexes

List the indexes the key writes, with the fields Get Index returns.

Reference: https://docs.captain.dev/reference/product-search/indexes/list-indexes

## Authentication

- `Authorization` header (bearer token, required) — A write key, issued by Captain. Server side only. Sent as Authorization: Bearer \<key>.

## Response

### 200

indexes

- `indexes` (list of Index, optional)
- `limits` (V1IndexesGetResponsesContentApplicationJsonSchemaLimits, optional)

## Types

### Index

- `name` (string, optional) — the index name
- `id_field` (string, optional) — Create Index only: the field that holds each record's id
- `status` (enum, optional) — empty: no records yet. pending: changes were accepted and are being applied. building: Captain is refreshing suggestions and spelling in the background, and search serves as usual. ready: every change is applied.
  - Allowed values: `empty`, `pending`, `building`, `ready`
- `record_count` (integer, optional) — Records the index holds, built or not.
- `staged_records` (integer, optional) — the same value as record_count, under its older name
- `staged_documents` (integer, optional) — the same value as record_count, under its older name
- `pending_changes` (boolean, optional) — True while accepted changes are still being applied.
- `staged_changes_since_build` (boolean, optional) — the same value as pending_changes, under its older name
- `object_search` (boolean, optional) — true for an index with typed fields: every index Create Index makes, and an Algolia import sent with object_search true. Settings apply to these
- `build_id` (string, optional, nullable) — the build search serves; null before the first one
- `last_job` (string, optional, nullable) — the id of the index's latest job, for Get Job
- `last_build_at` (integer, optional, nullable) — unix seconds the serving build finished; null when nothing is served, or for a build whose finish time was not recorded
- `created_at` (integer, optional) — unix seconds
- `serving` (IndexServing, optional, nullable) — The build search is serving, and how many records it holds.

### V1IndexesGetResponsesContentApplicationJsonSchemaLimits

### IndexServing

The build search is serving, and how many records it holds.

- `build` (string, optional, nullable)
- `records` (integer, optional)
- `documents` (integer, optional) — the same value as records, under its older name

## Examples

**Response**

```json
{
  "indexes": [
    {
      "name": "products",
      "status": "ready",
      "record_count": 12840,
      "staged_records": 12840,
      "staged_documents": 12840,
      "pending_changes": false,
      "staged_changes_since_build": false,
      "object_search": true,
      "build_id": "b20260928211503",
      "last_job": "job_20260928211502_4f9c1a",
      "last_build_at": 1759094251,
      "created_at": 1759093140,
      "serving": {
        "build": "b20260928211503",
        "records": 12840,
        "documents": 12840
      }
    },
    {
      "name": "products-staging",
      "status": "empty",
      "record_count": 0,
      "staged_records": 0,
      "staged_documents": 0,
      "pending_changes": false,
      "staged_changes_since_build": false,
      "object_search": true,
      "build_id": null,
      "last_job": null,
      "last_build_at": null,
      "created_at": 1759430001,
      "serving": null
    }
  ],
  "limits": {
    "max_documents": null,
    "documents_per_request": 1000,
    "max_records": null
  }
}
```

**SDK Code**

```python Python REST
import json
import requests

BASE_URL = "https://acme.captain.dev"
API_KEY = "your_write_key"

headers = {
    "Authorization": f"Bearer {API_KEY}",
}

response = requests.get(
    f"{BASE_URL}/v1/indexes",
    headers=headers,
    timeout=30.0,
)

print(json.dumps(response.json(), indent=2))
```

```typescript TypeScript REST
const BASE_URL = "https://acme.captain.dev";
const API_KEY = "your_write_key";

const response = await fetch(`${BASE_URL}/v1/indexes`, {
  method: "GET",
  headers: {
    Authorization: `Bearer ${API_KEY}`,
  },
});

const result = await response.json();
console.log(JSON.stringify(result, null, 2));
```