About the Wix Site Search API

Developer Preview
APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.

 

The Wix Site Search API allows you to search and retrieve specific types of documents from a site. The API returns results in the form of site document objects that match your search criteria.

For example, you can use the API to find upcoming events by searching the EVENTS document type.

Supported document types

The Search API supports a variety of document types, each with its own schema that defines how data the documents can be filtered, sorted, and searched:

You can also perform aggregations on the search results. For example, you can aggregate search results of the STORES_PRODUCTS document type to find the lowest price for each brand in your store.

Learn more about the Wix Site Search feature.

Before you begin

It’s important to note the following points before starting to code:

  • The site owner must install the Wix Site Search app.
  • Document types are not the same as Wix app collections. Though they overlap in content, documents are specifically for use by Wix Search.

Use cases

Terminology

  • Document: A document is a structured set of field and value pairs. Each document type corresponds to a specific Wix app on a site and follows a specific Wix Search schema. The following documents are supported:
    • Site pages: All regular and dynamic site pages with SEO indexing enabled. All Wix site pages are indexed by default. Note that custom router pages and some Wix app pages are not currently searchable.
    • Wix app content: Pages whose content is derived from the following schemas for Wix Search: BLOG_POSTS, BOOKINGS_SERVICES, FORUM_CONTENT, EVENTS, STORES_PRODUCT, and PROGALLERY_ITEM.
  • Document type: The specific type of document to search in, as listed in the Supported Document Types section.
  • Aggregation: A search method for grouping data into various categories (facets) and providing summaries for each category. For example, use aggregations to categorize search results by specific price ranges, brand names, or ratings.
Was this helpful?
Yes
No