Get Trending Searches
Follow this tutorial to get the list of the most popular words and phrases that the users search for.
Prerequisites
-
Access to the Search Intelligence service API console
. -
Access to the Search Intelligence service API console
. -
Access to the Search Intelligence service API console: https://{tenant}.iss.commerce.eu.context.cloud.sap/search-intelligence/ where {tenant} is a placeholder for your tenant name.
-
Access to the Search Intelligence service API console: https://{tenant}.iss.commerce.us.context.cloud.sap/search-intelligence/ where {tenant} is a placeholder for your tenant name.
-
Access to the Trending Search Terms user interface in Intelligent Selling Services.
-
The tracking of KeywordSearch events properly configured.
-
The Trending Search Terms feature enabled. For information on how to enable this feature, refer to the Trending Search Terms user interface.
Procedure
curl -X 'GET' \
'https://{tenant}-{site}.api.eu.context.cloud.sap/search-intelligence/v1/sites/{site}/trendingSearches' \
-H 'accept: application/json'
curl -X 'GET' \
'https://{tenant}-{site}.api.us.context.cloud.sap/search-intelligence/v1/sites/{site}/trendingSearches' \
-H 'accept: application/json'
curl -X 'GET' \
'https://{tenant}.iss.commerce.eu.context.cloud.sap/search-intelligence/v1/sites/{site}/trendingSearches' \
-H 'accept: application/json'
curl -X 'GET' \
'https://{tenant}.iss.commerce.us.context.cloud.sap/search-intelligence/v1/sites/{site}/trendingSearches' \
-H 'accept: application/json'
URI Parameters:
-
{tenant}: Provide your tenant name.
-
{site}: Provide your site identifier.
{
"updatedAt": "2024-04-11T08:58:05.747359Z",
"searchPhrases": [
{
"searchPhrase": "book",
"count": 45
},
{
"searchPhrase": "beauty products",
"count": 31
},
{
"searchPhrase": "office supplies",
"count": 22
}
]
}
Response details:
-
searchPhrases: Contains a list of trending search terms with the most popular ones at the top of the list.
Field
Type
Example
Description
searchPhrase
String
office supplies
The search phrase, always in lower case.
count
Number
22
The number of users who searched for the phrase.
-
updatedAt: The timestamp in ISO8601 format, indicating when the list was last updated.