Admin endpoints require an admin token (configurable via --admin-token).

Add Instance

POST /api/v1/admin/instances

Request body:

{
  "url": "https://my-instance.example.com",
  "type": "searxng",
  "name": "My SearXNG"
}

Update Instance

PUT /api/v1/admin/instances/:id

Request body (all fields optional):

{
  "name": "New Name",
  "type": "searxng"
}

Remove Instance

DELETE /api/v1/admin/instances/:id

Force Health Check

POST /api/v1/admin/instances/:id/check

Triggers an immediate health check for the specified instance. Useful for testing or when you need an up-to-date status immediately.

Export All Instances

GET /api/v1/admin/instances/export

Returns the full directory as a JSON array. Useful for backups.

Import Instances

POST /api/v1/admin/instances/import

Request body: JSON array of instance objects.

[
  {
    "url": "https://instance-a.example.com",
    "type": "searxng",
    "name": "Instance A"
  },
  {
    "url": "https://instance-b.example.com",
    "type": "invidious",
    "name": "Instance B"
  }
]