> For the complete documentation index, see [llms.txt](https://docs.aethercube.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aethercube.fr/developers/backend-api/directory.md). Agents can also search and read this documentation through its [MCP server](https://docs.aethercube.fr/~gitbook/mcp).

# Server directory

Use this page if you want to build a server browser, a Discord bot or a status page. The directory is the live list of game servers: a server enters it by sending heartbeats and leaves it when they stop. See [Online mode, TLS and the directory](https://docs.aethercube.fr/developers/running-a-server/online-mode-tls-and-directory.md).

All routes are under `/api/v1/servers` and are rate limited per client IP (default 60 requests per minute).

## Authentication

With the backend setting `directory.require_auth: true`, which is the default, a bearer token is required:

```
Authorization: Bearer <access token>
```

The token needs no specific scope. With `false`, anonymous callers can list servers and read public and unlisted details. Private servers stay hidden. A token that is present but invalid is always rejected.

## `GET /api/v1/servers`

Lists the live public servers.

| Parameter                    | Values                                                            | Default   |
| ---------------------------- | ----------------------------------------------------------------- | --------- |
| `page`                       | 1 to 1 000 000                                                    | 1         |
| `limit`                      | 1 to the backend's maximum page size (100 by default)             | 20        |
| `search`                     | At most 64 characters. Case-insensitive part of the name.         | none      |
| `region`                     | A region from `/servers/regions`.                                 | any       |
| `version`                    | A semantic version. Exact match on `game_version`.                | any       |
| `protocol_version`           | 1 to 65535. Exact match.                                          | any       |
| `tag`                        | Repeatable. **All** listed tags must be present.                  | none      |
| `status`                     | `online`, `maintenance` or `any`                                  | `online`  |
| `min_players`, `max_players` | 0 to 10000. Inclusive bounds on `players_online`.                 | unset     |
| `sort`                       | `players` (most first), `players_asc`, `name`, `newest`, `oldest` | `players` |

An invalid value is `400 VALIDATION_FAILED`. An unknown `sort` is `400 INVALID_SORT`.

Servers that are starting or stopping appear only with `status=any`.

```json
{
  "success": true,
  "data": {
    "items": [
      {
        "id": "00000000-0000-0000-0000-000000000000",
        "name": "Aether EU #1",
        "description": "A survival server.",
        "address": "play.example.org",
        "port": 25565,
        "region": "eu-west",
        "game_version": "1.0.0",
        "protocol_version": 1,
        "players_online": 12,
        "max_players": 100,
        "status": "online",
        "tags": ["survival"],
        "visibility": "public",
        "last_heartbeat": "2026-11-24T12:00:00Z",
        "tls": { "spki_blake3": "..." }
      }
    ],
    "pagination": { "page": 1, "limit": 20, "total": 1, "total_pages": 1 }
  }
}
```

| Field                              | Meaning                                                                                                        |
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `id`                               | The server id.                                                                                                 |
| `name`, `description`              | Public text.                                                                                                   |
| `address`, `port`                  | Where to connect.                                                                                              |
| `region`                           | The region.                                                                                                    |
| `game_version`, `protocol_version` | What the server runs. A client connects only when `protocol_version` matches its own.                          |
| `players_online`, `max_players`    | Load and capacity.                                                                                             |
| `status`                           | `online`, `maintenance`, `starting`, `stopping` or `offline`.                                                  |
| `tags`                             | The server's tags.                                                                                             |
| `visibility`                       | `public`, `unlisted` or `private`.                                                                             |
| `last_heartbeat`                   | Time of the last accepted heartbeat.                                                                           |
| `tls.spki_blake3`                  | Present only when the owner registered a fingerprint. The BLAKE3 hash of the server's public key, for pinning. |

The public form never contains the owner, credentials or administrative status.

## `GET /api/v1/servers/regions`

The region whitelist of the backend (`master.regions`), for use as the `region` filter.

## `GET /api/v1/servers/tags`

The tags in use, for use as the `tag` filter.

## `GET /api/v1/servers/{id}`

One server.

* A malformed or unknown id, or a server that an administrator disabled, gives `404 SERVER_NOT_FOUND`.
* A `private` server is visible only to its owner and to players the owner granted access. Everyone else gets `404`.
* A live server returns its current entry. A server that is registered but not live returns its stored data with `status: "offline"` and `players_online: 0`.

## Liveness

A server disappears from the list at most 20 seconds after its last heartbeat. Only `public` servers are listed. `unlisted` servers are reachable by id and never listed.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aethercube.fr/developers/backend-api/directory.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
