Introduction

The wix-search API allows you to create a custom site search experience for your site visitors. For example, you can use a text input element to get a search phrase from site visitors, search your store products for the phrase, and display the matching store products in a repeater.

You can filter, sort, and apply facets (categorize) the results of a site search.

To enable Search API functionality for your site, you must add the Wix Site Search application to your site. After installing the app you can delete the Search Bar, but make sure to leave the Search Results page on your site. Note that you cannot use the Search API to control the Wix Search Bar or Search Results page.

The Search API searches supported site documents and returns matching search results in Document form. The following documents are currently supported:

  • Site pages: All regular and dynamic site pages with SEO indexing enabled. Note that Wix site pages are indexed by default. Custom router pages and some Wix app pages are not currently included in searches.
  • Wix app content: Pages whose content is extracted from the following database collections: Blog/Posts, Bookings/Services, Forum/Posts & Forum/Comments, and Stores/Products.

To use the search module, import wixSearch from the wix-search module:

Copy
1
Was this helpful?
Yes
No