Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

AccelerateSearch REST API

All routes are versioned under /api/v1/. The OpenAPI specification is served at /api-docs/openapi.json and the Swagger UI at /swagger-ui/.

The response format for errors is:

{
  "error": "code_snake_case",
  "message": "Human-readable description.",
  "code": 404
}

System (no auth required)

MethodPathDescription
GET/healthHealth check
GET/versionBinary version info (version, commit SHA, commit date)
GET/statsGlobal statistics (collection count, document count)
GET/metricsPrometheus metrics (gated by [metrics].enabled)
GET/instance-idPer-instance UUID

All other endpoints require the master key or a scoped API key in the Authorization: Bearer <key> header.

Collections

MethodPathDescription
POST/api/v1/collectionsCreate collection
GET/api/v1/collectionsList collections
GET/api/v1/collections/{uid}Get collection
PATCH/api/v1/collections/{uid}Update collection metadata
DELETE/api/v1/collections/{uid}Delete collection
GET/api/v1/collections/{uid}/statsCollection stats
GET/api/v1/collections/{uid}/settingsGet full settings blob
PATCH/api/v1/collections/{uid}/settingsUpdate full settings blob
DELETE/api/v1/collections/{uid}/settingsReset settings to defaults

Per-setting endpoints (leaf GET / PUT / DELETE)

The following “leaf” settings each have their own GET/PUT/DELETE trio so clients can manage individual settings without round-tripping the full CollectionSettings blob:

MethodPath
GET / PUT / DELETE/api/v1/collections/{uid}/settings/filterable-attributes
GET / PUT / DELETE/api/v1/collections/{uid}/settings/sortable-attributes
GET / PUT / DELETE/api/v1/collections/{uid}/settings/searchable-attributes
GET / PUT / DELETE/api/v1/collections/{uid}/settings/displayed-attributes
GET / PUT / DELETE/api/v1/collections/{uid}/settings/stop-words
GET / PUT / DELETE/api/v1/collections/{uid}/settings/ranking-rules
GET / PUT / DELETE/api/v1/collections/{uid}/settings/typo-tolerance
GET / PUT / DELETE/api/v1/collections/{uid}/settings/distinct-field
GET / PUT / DELETE/api/v1/collections/{uid}/settings/synonyms
GET / PATCH / DELETE/api/v1/collections/{uid}/settings/embedders

The embedders leaf uses PATCH (not PUT) because the embedder configuration is a JSON object that is deep-merged, not replaced.

Documents

MethodPathDescription
POST/api/v1/collections/{uid}/documentsAdd or replace documents (upsert by primary key)
PUT/api/v1/collections/{uid}/documentsPartial update by primary key (only supplied fields are written)
GET/api/v1/collections/{uid}/documentsList documents (paginated)
GET/api/v1/collections/{uid}/documents/{id}Get a single document by primary key
DELETE/api/v1/collections/{uid}/documents/{id}Delete one document
DELETE/api/v1/collections/{uid}/documentsDelete every document in the collection
POST/api/v1/collections/{uid}/documents/delete-batchBulk delete by an array of IDs
GET/api/v1/collections/{uid}/documents/export?format=Export as ndjson, json, or csv
MethodPathDescription
POST/api/v1/collections/{uid}/searchFull search (POST is recommended for complex filters)
GET/api/v1/collections/{uid}/search?q=&offset=&limit=&filter=&facets=Search (GET, lightweight)
GET/api/v1/collections/{uid}/autocomplete?q=&limit=FST-backed term suggestions
POST/api/v1/multi-searchMulti-collection search

Search request body

{
  "q": "rust search",
  "offset": 0,
  "limit": 20,
  "filter": "rating >= 4 AND status = \"active\"",
  "facets": ["category", "brand"],
  "attributes_to_retrieve": ["id", "title", "price"],
  "attributes_to_highlight": ["title", "body"],
  "sort": ["price:asc"],
  "show_ranking_score": true,
  "hybrid": { "semantic_ratio": 0.5, "embedder": "default" },
  "vector": [0.1, 0.2, 0.3],
  "distinct": "sku"
}

Search response

{
  "query": "rust search",
  "hits": [
    {
      "document": { "id": "1", "title": "Rust in Action", "price": 39.95 },
      "formatted": { "title": "<em>Rust</em> in Action" },
      "ranking_score": 0.86
    }
  ],
  "offset": 0,
  "limit": 20,
  "estimatedTotalHits": 142,
  "processingTimeMs": 4,
  "facetDistribution": { "category": { "counts": { "book": 87, "video": 55 } } }
}

Autocomplete response

{
  "query": "rus",
  "suggestions": [
    { "term": "rust",     "total_term_freq": 1234 },
    { "term": "rusty",    "total_term_freq":  17  },
    { "term": "russian",  "total_term_freq":   9  }
  ],
  "processingTimeMs": 1
}

Filter expression grammar

expr        := or
or          := and ( "OR" and )*
and         := not ( "AND" not )*
not         := "NOT" not | atom
atom        := "(" expr ")" | comparison
comparison  := field op value
op          := "=" | "!=" | ">" | ">=" | "<" | "<=" | "TO"
            | "IN" | "NOT" "IN" | "EXISTS" | "IS" "NULL" | "IS" "NOT" "NULL"
            | "CONTAINS" | "STARTS_WITH" | "ENDS_WITH" | "LIKE"
            | "GEO_BBOX" lat lng lat lng
            | "GEO_RADIUS" lat lng meters
value       := number | string | bool | null | array

LIKE patterns use % for “any” and _ for “single character”.

Tasks

MethodPathDescription
GET/api/v1/tasksList tasks (paginated)
GET/api/v1/tasks/{taskUid}Get a single task by UID
DELETE/api/v1/tasksCancel every queued/pending task
POST/api/v1/tasks/cancelCancel a subset of tasks by filter (uid prefix, type, status)

API Keys

MethodPathDescription
GET/api/v1/keysList keys
POST/api/v1/keysCreate key
GET/api/v1/keys/{key_or_uid}Get key by raw key value or UID
PATCH/api/v1/keys/{key_or_uid}Update key metadata (name, scopes, expiry)
DELETE/api/v1/keys/{key_or_uid}Delete key

Tenant Tokens

MethodPathDescription
POST/api/v1/tenant-tokensMint a short-lived HS256 JWT scoped to a search API key

Snapshots

MethodPathDescription
POST/api/v1/snapshotsCreate snapshot
GET/api/v1/snapshotsList snapshots
GET/api/v1/snapshots/{name}Get snapshot info
DELETE/api/v1/snapshots/{name}Delete snapshot
POST/api/v1/snapshots/{name}/restoreRestore snapshot

Indexes (alias for collections)

The /api/v1/indexes/* routes are aliases for /api/v1/collections/* and accept the same payloads. They exist for Meilisearch compatibility on the search-rules endpoint (which lives at /api/v1/indexes/{uid}/settings/rules).

MethodPathDescription
POST/api/v1/indexesCreate index
GET/api/v1/indexesList indexes
GET/api/v1/indexes/{uid}Get index
PATCH/api/v1/indexes/{uid}Update index metadata
DELETE/api/v1/indexes/{uid}Delete index
GET/api/v1/indexes/{uid}/statsIndex stats
POST/api/v1/swap-indexesAtomically swap two indexes

Search Rules (curated queries)

MethodPathDescription
GET/api/v1/indexes/{uid}/settings/rulesGet ruleset
POST/api/v1/indexes/{uid}/settings/rulesReplace ruleset
DELETE/api/v1/indexes/{uid}/settings/rulesDelete ruleset

Hooks (webhooks)

MethodPathDescription
GET/api/v1/hooksList hooks
GET/api/v1/hooks/{id}Get hook
POST/api/v1/hooksCreate hook
PATCH/api/v1/hooks/{id}Update hook
DELETE/api/v1/hooks/{id}Delete hook

Network and experimental features

MethodPathDescription
GET/api/v1/networkCluster network info (skeleton)
GET/api/v1/experimental-featuresList feature toggles
PATCH/api/v1/experimental-featuresUpdate feature toggles

OpenAPI and Swagger

PathDescription
/api-docs/openapi.jsonOpenAPI 3.1 spec in JSON
/swagger-ui/Interactive Swagger UI (HTML)
/swagger-ui/{tail:.*}Swagger UI assets

Both are gated by the [api_docs] TOML section. Disabling either key returns a 404 for that path.