Search (v2)
Get Suggestions
Returns suggestions for a given query. Call this while the user is typing to help
the user find what they're looking for. The suggestions are of two types:
- suggestions for search queries that are related to the current query
- suggestions for categories that are related to the current query
Example response:
<pre>
{
"suggestions_request_id": "c6fa5efd-1bde-43a8-9ac4-434605f53024",
"suggestions": [
{
"type": "query",
"title": "red hat",
"suggestions_result_id": "60c54958-8f2d-4ffd-a343-d316e79593b8"
},
{
"category_id": "sweaters-hoodies",
"title": "Sweaters & Hoodies",
"page_url": "https://foobar.com/sweaters-hoodies",
"type": "category",
"suggestions_result_id": "b11ee4a9-0d95-4559-b1fa-76479ca3e3ea"
}
]
}
</pre>
GET
/
v2
/
search
/
suggestions
Query Parameters
tenant
string
requiredmarket
string
requiredlocale
string | null
query
string | null
user_id
string | null
Minimum length:
1
session_id
string | null
Minimum length:
1
dsid
string | null
Minimum length:
1
metadata
any | null
port
integer | null
Response
200 - application/json
suggestions_request_id
string
requiredsuggestions
object[]
requiredList of suggestions for search queries that should be shown to the user while they are typing.
Was this page helpful?