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
| Parameter | Description | Type |
|---|---|---|
| term | Prefix of the suggestion | string |
Optional
| Parameter | Description | Type | Notes |
|---|---|---|---|
| size | Number of suggestions to return | int | Default is 10 |
| language | Filter suggestions by language | string | Two-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
| Field | Description | Type |
|---|---|---|
| suggestions | Array of suggestion objects | Array 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.