Prerequisites
From MyCludo, collect the values for the engine where Pre-search Suggestions are configured:
The feature must also be enabled on your subscription. If Tools > Pre-search Suggestions in MyCludo lets you save terms, the feature is enabled.
Step 1: Build the SiteKey authorization header
The request uses SiteKey authentication. Build the token by Base64-encoding{customerId}:{engineId}:{searchKey}:
Step 2: Call the public settings endpoint
Fetch the website public settings for the engine:Step 3: Parse instantSuggestionsConfiguration
The response contains many website settings. The Pre-search Suggestions field is instantSuggestionsConfiguration.
This field is returned as a JSON-encoded string, so parse the response JSON first, then parse instantSuggestionsConfiguration a second time:
Cludo does not store recent searches for the visitor. If
showRecentSearches is true, store and merge recent searches client-side, for example in localStorage.
