Search Term Trends
GET {{baseUrl}}/experimental/search/v0/terms?filter.locationId=98989898&option.type=MOST_FREQUENT&page.size=2&page.offset=0&sort=rank[DESC]
Provides access to current set of most popular search terms at the specified location. Up to 100 terms can be returned by the service. The default sort order is by rank ascending.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
filter.locationId | number | (Required) One or more comma separated ids of the store location(s) to get search trends on, retrieved from the /locations endpoint. | |
option.type | string | The type of search terms to return. Currently, only one value is possible. By making it an enum, it's easy to add others in the future. | |
page.size | number | The number of terms to return per page. | |
page.offset | number | The index of the first term to return, using a 0-based index. | |
sort | string | The sort order for the results. The format is the field name plus the optional [ASC] for ascending or [DESC] descending sort order. If [ASC] or [DESC] are not specified, the sort order is ascending. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept-Language | string | The language or locale accepted by the client application. | |
x-mock-response-code | number | Used to specify the type of response to receive from the mock service. Indicate the desired response code from available codes on this service: 200, 400. |
RESPONSES
status: OK
{"data":[{"term":"eggs","rank":1},{"term":"milk","rank":2}],"meta":{"page":{"offset":0,"size":1,"hasMore":true}}}