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.
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
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
Was this helpful?