Universal Search: Autocomplete

Retrieve a list of suggested queries across all verticals in the experience based on the characters already typed by the user. This API is meant to be hit after each keystroke.

path Parameters
accountId
required
string
query Parameters
v
required
string

A date in YYYYMMDD format.

experienceKey
required
string

String key that uniquely identifies the Search experience.

locale
required
string

The locale code of the experience (e.g. en_GB).

input
string

The partial search term from the user.

version
string

The label or version number of the experience configuration to use. Label options are STAGING or PRODUCTION. STAGING uses the Latest version of the configuration. If omitted the PRODUCTION label will be used.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "response": {
    }
}

Universal Search: Query

Search for entities across all verticals within a Search experience. Modules are returned for all verticals with relevant entities. Further fine tuning and filtering of the results can then be done using the vertical query endpoint. A maximum of 50 verticals can be queried with this endpoint.

In order prevent bot traffic from using Search API Capacity, you must integrate with the Search API from the front end of your application. The Search API's Bot Detection feature requires the API to be called directly from the end-user's web browser. If you must integrate with the Search API via another mechanism, all traffic will be charged against your search capacity and some features of Search Analytics, such as Search Terms and Search Term Clustering may not work.

path Parameters
accountId
required
string
query Parameters
v
required
string

A date in YYYYMMDD format.

experienceKey
required
string

String key that uniquely identifies the Search experience.

locale
required
string

The locale code of the experience (e.g. en_GB). Only returns entities that have an entity profile associated with this locale.

input
required
string

The search term of the user.

version
string

The label or version number of the experience configuration to use. Label options are STAGING or PRODUCTION. STAGING uses the Latest version of the configuration. If omitted the PRODUCTION label will be used.

location
string

The user's location as a comma separated latitude and longitude (e.g. "40.740957,-73.987565").

session_id
string

UUID used to track session state when cookies are blocked.

limit
string

JSON object specifying the limit for each vertical. Each key is a vertical key and the value for each of those keys is a number 1-50 that denotes the limit for that vertical. This parameter should be provided as a URL-encoded string containing a JSON object.

queryTrigger
string

String value that is logged to analytics denoting the trigger for the query. Options include:

  • suggest, sent if the query is triggered from a spelling correction.
  • initialize, sent if the query is being triggered by a default initial search (in other words, the user did not enter query).
context
string

Context is an arbitrary JSON object that is passed to query rules to be used for triggering rules as well as passing data to those rules. This parameter should be provided as a URL-encoded string containing a JSON object.

referrerPageUrl
string

The URL of the webpage that directed to the page this request was made from.

skipSpellCheck
boolean

If true the query will skip spell checking.

restrictVerticals
string

A comma-separated list of verticals (e.g. "people,locations"). If specified, only results from these verticals will be returned.

ignoreQueryRules
boolean

When set to true, ignores any Query Rules that would otherwise affect the results. Defaults to false.

queryId
string

UUID of the query; recommended when moving through results, to associate multiple requests to the same query.

source
string

Indicates where the query is coming from (e.g. "HOME_HEADER" or "TICKET_FORM"). Can be used in Analytics reports via the Integration Source dimension. Defaults to "STANDARD".

jsLibVersion
string

The version of the Search UI used for this request. Deprecated.

Responses

Response samples

Content type
application/json
{
  • "meta": {
    },
  • "response": {
    }
}