Get Autocomplete Suggestions
curl --request GET \
--url https://api.cludo.com/api/v4/{customerId}/{engineId}/autocomplete \
--header 'Authorization: <api-key>'import requests
url = "https://api.cludo.com/api/v4/{customerId}/{engineId}/autocomplete"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.cludo.com/api/v4/{customerId}/{engineId}/autocomplete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.cludo.com/api/v4/{customerId}/{engineId}/autocomplete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"fields": {
"Title": "Search API reference",
"Url": "https://docs.example.com/search-api"
},
"id": "https://docs.example.com/search-api"
}
],
"suggestions": [
"search api",
"search analytics"
],
"totalResults": 6,
"totalSuggestions": 2,
"queryId": "b7e4d2c1-8f3a-4e1b-9c6d-2a8f4e7b1c5d"
}{
"message": "The request could not be processed. Check the request body and required parameters."
}{
"message": "unauthorized"
}{
"status": "InternalServerError",
"code": 500,
"messages": [
"Error occur. Please contact support with error ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}Search
Autocomplete
Returns typeahead suggestions as the user types. Autocomplete can be configured to display document titles, but this is an account-wide setting — contact Cludo support to enable it.
GET
/
api
/
v4
/
{customerId}
/
{engineId}
/
autocomplete
Get Autocomplete Suggestions
curl --request GET \
--url https://api.cludo.com/api/v4/{customerId}/{engineId}/autocomplete \
--header 'Authorization: <api-key>'import requests
url = "https://api.cludo.com/api/v4/{customerId}/{engineId}/autocomplete"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.cludo.com/api/v4/{customerId}/{engineId}/autocomplete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.cludo.com/api/v4/{customerId}/{engineId}/autocomplete', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"results": [
{
"fields": {
"Title": "Search API reference",
"Url": "https://docs.example.com/search-api"
},
"id": "https://docs.example.com/search-api"
}
],
"suggestions": [
"search api",
"search analytics"
],
"totalResults": 6,
"totalSuggestions": 2,
"queryId": "b7e4d2c1-8f3a-4e1b-9c6d-2a8f4e7b1c5d"
}{
"message": "The request could not be processed. Check the request body and required parameters."
}{
"message": "unauthorized"
}{
"status": "InternalServerError",
"code": 500,
"messages": [
"Error occur. Please contact support with error ID: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
]
}Autocomplete strategies
Autocomplete can be configured to display document titles instead of plain suggestions. This is an account-wide setting — contact Cludo support to enable it. When title-based autocomplete is enabled, suggestions are backed by real indexed documents. You can narrow results using thefilters query parameter with any indexed field:Authorizations
SiteKeyBasicAuth
SiteKey authentication. Pass the full value including the SiteKey prefix: SiteKey <base64(customerId:engineId:searchKey)>. Example: SiteKey dGVzdDoxMjM0NTY3Ojk4NzY1. See the Authentication guide for details.
Path Parameters
Your Cludo account ID. Find it in MyCludo.
Query Parameters
Response
Autocomplete suggestions returned successfully.
Was this page helpful?

