GET /v1/suggest/{index public key}
Retrieve search suggestions from the index.
Required Query Parameter
Parameter | Description | Type |
---|---|---|
term | Search suggestion prefix | string |
Optional Query Parameter
Parameter | Description | Type | Notes |
---|---|---|---|
size | The number of search suggestions to return | int | The default is 10 |
language | Limit suggestions to a certain language | string | Language name should be a two-letter language code according to the ISO 639-1 standard. Example: en |
Sample Request
https://api.addsearch.com/v1/suggest/1bed1ffde465fddba2a53ad3ce69e6c2?term=api
Response
{
"suggestions": [
{ "value": "api" },
{ "value": "api call" },
{ "value": "rest api" },
{ "value": "search api" }
]
}
Field | Description | Type |
---|---|---|
suggestions | Top level, the returned suggestions | Object, array of suggestion key value pairs |
Please note that the Search Suggestions API endpoint does not require authentication.
The default rate limit for the Suggestions API is 5 requests/sec from a single IP address. A higher rate limit can be requested from the support.