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

# Indexes

> Crawl a website into a searchable index for a workspace

An index is a crawled website turned into searchable pages. Creating one starts a background
crawl, so the index begins in a pending state and moves to indexed when it finishes. Indexes
belong to a workspace, so pass `workspace_id` on reads and writes. Reads need `models:read`
and writes need `models:write`.

## List indexes

```
GET /api/v1/indexes?workspace_id=ws_1
```

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://platform.nemu.cc/api/v1/indexes?workspace_id=ws_1' \
    -H 'Authorization: Bearer <access_token>'
  ```

  ```ts SDK theme={null}
  const indexes = await workspace.indexes.list();
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "data": [
      {
        "id": "idx_1",
        "workspace_id": "ws_1",
        "base_url": "https://example.com",
        "title": "Example docs",
        "page_count": 24,
        "pages": [],
        "status": "INDEXED",
        "error": null,
        "created_at": "2026-01-04T10:22:00.000Z",
        "updated_at": "2026-01-04T10:30:00.000Z"
      }
    ]
  }
  ```
</ResponseExample>

<ResponseField name="data.status" type="string">
  One of `PENDING`, `INDEXING`, `INDEXED`, or `FAILED`.
</ResponseField>

## Get an index

```
GET /api/v1/indexes/{id}?workspace_id=ws_1
```

## Create an index

```
POST /api/v1/indexes
```

<ParamField body="workspace_id" type="string" required>
  The workspace the index belongs to.
</ParamField>

<ParamField body="url" type="string" required>
  The site to crawl.
</ParamField>

<ParamField body="title" type="string">
  A label for the index.
</ParamField>

<ParamField body="max_pages" type="integer">
  A cap on how many pages to crawl.
</ParamField>

<RequestExample>
  ```ts SDK theme={null}
  const index = await workspace.indexes.create({
    url: "https://example.com",
    title: "Example docs",
    max_pages: 50,
  });
  ```
</RequestExample>

## Delete an index

```
DELETE /api/v1/indexes/{id}
```
