v1

latestOpenAPI 3.1.02026-07-243452166.7 KB

Suggest API

If applicable, will return a suggestion and alternate suggestions to be displayed to the shopper as alternate search queries to pass to the Autocomplete API to source results.

get/api/suggest/query

Query parameters

siteIdstring required

Unique identifier to associate the Searchspring account making the request to the database. This can be found on the My Account page in the Searchspring Management Console under the Account details section.

qstring
Example:shoe

Query value will search the index for terms that match the query.

languagestring
Example:en

Determine the language model that is used for spell corrections.

suggestionCountinteger
Example:5

Limits the number of possible suggestions that will be returned by our API. These values will be shown to the shopper on the frontend to select. If the shopper selects a suggestion it will be passed to the Autocomplete API request as the q parameter.

productCountinteger
Example:20

Applying this parameter will limit the number of items the Suggest API will scan in order to find matches against the query parameter that is passed. During a scan the Suggest API will attempt to match the query parameter against the Name and SKU core fields.

Response

OK

querystring

Will represent the query the shopper typed in the search bar and was passed as the q parameter.

corrected-querystring

If a spell correction was made to the passed q parameter, the data returned here will be the updated query.