Using suggestions
Suggestions are tips you can use to guide you on the following queries.
The following sections show some examples of suggestion use cases.
Getting a keyphrase suggestion
The following code is a request for a keyphrase suggestion. In this example, you request five suggestions from the original query keyphrase shirt.
The following code shows the corresponding response:
Keyphrase suggestions return a mix of, but not all, suggestion types. You cannot identify the specific type used in the response. The above sample uses the following suggestions types:
-
Shirt is an
autocompletesuggestion. -
Short is a
type_correction. -
Men's Shirt and Shirt Style Guide are
related_searchorquery_expansionsuggestions. -
Shirt on sale is a
recentsearch history suggestion.
Getting a trending category suggestion
The following code is a request for a trending category suggestion. In this example, you request three trending categories.
The following code shows the corresponding response:
Getting an autocomplete suggestion from a specific content
The following code is a request for a autocomplete suggestion. In this example, you request three suggestions for the keyphrase mov.
Request:
The following code shows the corresponding response: