Skip to main content

Get Search Suggestions

Use the Search Suggestions API to retrieve search autocomplete suggestions from your AddSearch index.

API Endpoint

GET /v1/suggest/{index_public_key}

Replace {index_public_key} with your index public key.

Query Parameters

Required

ParameterDescriptionType
termPrefix of the suggestionstring

Optional

ParameterDescriptionTypeNotes
sizeNumber of suggestions to returnintDefault is 10
languageFilter suggestions by languagestringTwo-letter ISO 639-1 language code (e.g., en for English)

Example Request

GET https://api.addsearch.com/v1/suggest/1bed1ffde465fddba2a53ad3ce69e6c2?term=api

Example Response

{
"suggestions": [
{ "value": "api" },
{ "value": "api call" },
{ "value": "rest api" },
{ "value": "search api" }
]
}

Response Fields

FieldDescriptionType
suggestionsArray of suggestion objectsArray of objects with key value

Additional Information

  • Authentication is not required to access this endpoint.
  • The default rate limit is 5 requests per second per IP address.
  • To request a higher rate limit, contact AddSearch Support.