Skip to main content
The Lucidworks Typeahead Service API returns a list of suggestions created in Lucidworks Platform Core Settings. Using the unique TYPEAHEAD_ID for your Typeahead configuration, you can retrieve a list of suggestions based on the characters included in the request.
For detailed API specifications in Swagger/OpenAPI format, see Platform APIs.

Prerequisites

To use this API, you need:
  • Typeahead suggestions entered in Lucidworks Platform Core Settings.
  • The unique TYPEAHEAD_ID for your typeahead implementation. Contact your Lucidworks Platform representative for this information.

Unique values for the typeahead use case

Some query parameters unique to the typeahead use case can be used in the URL of the GET request of the Core Settings Typeahead Service API, including prefix and limit. Refer to the API spec for more information.

Example GET request with prefix query parameter

Request
curl --request GET \
  --url  https://{TYPEAHEAD_ID}.typeahead.lucidworks.com/typeahead/suggestions?prefix=El \
  --header 'Accept: application/json' \
  --header 'Authorization: Basic abcdefgh1234567' \
  --header 'Content-type: application/json' \
  --data ''

Response

The API call returns suggestions that begins with the letters El.
[
  "Elastic",
  "Electrical",
  "Electric",
  "Electronics",
  "Elegant",
  "Element",
  "Elevator",
  "Elite",
  "Elixir",
  "Ellipse"
]
If the request does not include a query parameter after the ? in the URL of the request, the complete list of suggestions is returned.