The SearchSpring Suggest Legacy API is designed to generate helpful query and product suggestions based on a shopper's input text. This is the legacy version of this endpoint, which replicates the behavior of the older Autocomplete API while using our newest systems.

❗️

This endpoint should not be used for customers integrating using our API as it is deprecated.

API Endpoint URL


https://[siteId].a.searchspring.io/api/suggest/legacy

Request Parameters


❗️

Uses POST. Parameters cannot be passed in the URL.

siteId (Required)

FormatString
DescriptionThe siteId parameter identifies your site. You can find your siteId on the My Account page.
Example Value"scmq7n"

query (Required)

FormatString
DescriptionSearches the search database for the terms in the query.
Example Value"dres"

callback

FormatString
DescriptionThe JSONP callback function name. The SearchSpring API will pass the JSON-encoded response as an argument to the function specified.
Example Values"buildAutocompleteResults" "buildHTML"

termCount

FormatInteger
DescriptionThe number of suggestions to be returned to show the end user.
Default Value4

productCount

FormatInteger
DescriptionThe number of products on a site to scan (Name and SKU core fields) in order to find matches against the query.
Default Value20

Example Request


cURL

curl -X POST https://scmq7n.a.searchspring.io/api/suggest/legacy -H 'Content-Type: application/json' -d '{"siteId": "scmq7n", "query": "dres"}'