Skip to main content
GET
/
typeahead
/
suggestions
Get typeahead suggestions
import requests

url = "https://typeahead_id.typeahead.lucidworks.com/typeahead/suggestions"

headers = {
    "Authorization": "<authorization>",
    "Content-Type": "<content-type>"
}

response = requests.get(url, headers=headers)

print(response.text)
[
  "<string>"
]

Headers

Authorization
string
default:{EMBED_TOKEN}
required

This is the unique embed token for the Lucidworks Platform typeahead instance, and is provided by Lucidworks. Each Typeahead instance has an embed token that is used for authentication.

Example:

"qasdlkjdoiu1123455WECMMLLJ22eeg"

Content-Type
string
required

application/json

Query Parameters

prefix
string

Optional parameter that filters suggestions returned. For example, GET /typeahead/suggestions?prefix=El returns the suggestions that begin with the letters El.

limit
integer<int32>
default:10

Optional parameter that limits the number of suggestions returned. For example, GET /typeahead/suggestions?limit=10 returns a maximum of 10 suggestions.

Response

200 - application/json

Suggestions retrieved successfully