AACsearch
Api reference

Query suggestions / autocomplete

Returns autocomplete suggestions for a search query prefix. Combines prefix field matching, popular queries from analytics, and fuzzy completion. Results are grouped by source (products, phrases, popular).

Returns autocomplete suggestions for a search query prefix. Combines prefix field matching, popular queries from analytics, and fuzzy completion. Results are grouped by source (products, phrases, popular).

POST
/indexes/{indexId}/suggest

Authorization

BearerAuth
AuthorizationBearer <token>

Search API key (ss_search_*) from the dashboard or keys API. Scopes (search, ingest, admin) are stored on the key; each route requires the matching scope.

In: header

Path Parameters

indexId*string

Search index slug or ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/v1/indexes/string/suggest" \  -H "Content-Type: application/json" \  -d '{    "q": "string"  }'
{
  "prefix": "string",
  "suggestions": [
    {
      "text": "string",
      "score": 0,
      "source": "string",
      "type": "string",
      "highlights": [
        {
          "start": 0,
          "end": 0
        }
      ]
    }
  ],
  "groups": [
    {
      "name": "string",
      "label": "string",
      "suggestions": [
        {
          "text": "string",
          "score": 0,
          "source": "string",
          "type": "string"
        }
      ]
    }
  ],
  "total": 0
}
{
  "error": "string",
  "message": "string",
  "details": null
}
{
  "error": "string",
  "message": "string",
  "details": null
}
{
  "error": "string",
  "message": "string",
  "details": null
}