Skip to main content

Autocomplete

Autocomplete allows users to offer completions as the user types into a search box in realtime.

caution

This endpoint is very sensible to network latency. If your application isn't able to display autocompletions within ca. 200 milliseconds, users might be annoyed and it might be better to not serve autocompletions at all.

Endpoint

GET /api/v1/search HTTP/1.1
Accept: application/json

Searches in the content database.

Parameters

ParameterInTypeRequiredDescription
qquerystringtrueQuery string
takequeryinteger(int32)falseItems to return at max
skipqueryinteger(int32)falseItems to skip in results

Response

Overview

StatusMeaningDescription
200OKA list of search results
500Internal Server ErrorAn unexpected error on the server side

Response schema

Status Code 200

NameTypeRequiredDescription
totalinteger(int32)trueTotal number of found hits
dataobjectfalseIndividual hits of the search result

Examples

200 response
{
"total": 13,
"data": [
{
"id": "..."
},
...
]
}

Code examples

curl -X GET \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
'/api/v1/search?q=apple'