loading

search

Background

The search configuration in the initialization is used to control the default initial search and the number of results per page. It can be used to set a default initial search on both vertical and universal search pages.

    search: {
      verticalKey: 'verticalKey', //don't specify this property if universal
      limit: '20', //not applicable to universal search
      defaultInitialSearch: 'What is Yext Answers?',
    }

Example

search API
Property Type Default Description
verticalKey
string
The vertical key to use for searches, passed to certain components. Required if a defaultInitialSearch is supplied.
limit
string
20
The number of results to display per page, defaults to 20. Maximum is 50.
defaultInitialSearch
string
A default search to use on page load when the user hasn’t provided a query. If set to “”, the SearchBar’s allowEmptySearch must be set to true.