---
title: "Performs an autocomplete search on a table"
method: POST
path: "/autocomplete"
tags: ["Search"]
---

# Performs an autocomplete search on a table

`POST /autocomplete`

The method expects an object with the following mandatory properties:
* the name of the table to search
* the query string to autocomplete
For details, see the documentation on [**Autocomplete**](Autocomplete.md)
An example: ``` {
  "table":"table_name",
  "query":"query_beginning"
}         ```
An example of the method's response:

 ```
 [
   {
     "total": 3,
     "error": "",
     "warning": "",
     "columns": [
       {
         "query": {
           "type": "string"
         }
       }
     ],
     "data": [
       {
         "query": "hello"
       },
       {
         "query": "helio"
       },
       {
         "query": "hell"
       }
     ]
   }
 ] 
 ```

For more detailed information about the autocomplete queries, please refer to the documentation [here](https://manual.manticoresearch.com/Searching/Autocomplete).

## Request body

- AutocompleteRequest — Object containing the data for performing an autocomplete search.
  - `table` string, required — The table to perform the search on
  - `query` string, required — The beginning of the string to autocomplete
  - `options` object — Autocomplete options - layouts: A comma-separated string of keyboard layout codes to validate and check for spell correction. Available options - us, ru, ua, se, pt, no, it, gr, uk, fr, es, dk, de, ch, br, bg, be. By default, all are enabled. - fuzziness: (0,1 or 2) Maximum Levenshtein distance for finding typos. Set to 0 to disable fuzzy matching. Default is 2 - prepend: true/false If true, adds an asterisk before the last word for prefix expansion (e.g., *word ) - append: true/false If true, adds an asterisk after the last word for prefix expansion (e.g., word* ) - expansion_len: Number of characters to expand in the last word. Default is 10.

## Response `200`

Ok

- object[]

## Other responses

- `default` — error

## Changes

- **2025-02-13** `8f90aac993c7` — 1 info
  - endpoint added
- **2024-11-14** `88a0ac494d8e` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/manticoresoftware/apis/manticore-search-client/changes/autocomplete/post.md)

---

[API](https://skmtc.dev/manticoresoftware/apis/manticore-search-client.md) · [All operations](https://skmtc.dev/manticoresoftware/apis/manticore-search-client/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/manticoresoftware/manticore-search-client/revisions/eb39c8083035/schema)
