About Collections

A collection stores items that share a structure, much like a table in a relational database. Collections hold the content that a site displays on its pages and the data that its code reads and writes. To see how collections fit with the rest of a site's data, see About the Wix Data Ecosystem.

Each collection defines fields that describe the data its items hold. The CMS doesn't enforce this structure, so an item can still store values that don't match it.

A site can have up to 1,000 collections. Use a separate collection for each kind of content. For example, a real estate site might have separate collections for listings, agents, and contact form submissions.

You can create a collection in the Wix Data view in the Code tab, in the CMS dashboard, or in code with the Data Collections API.

Collection types

A site can have three types of collections:

  • User-created collections: Collections that a Wix user creates on the site, in the CMS dashboard, with a Wix Data script, or with code.
  • App collections: Collections that an installed app adds to the site. See App collections.
  • External collections: Collections from an external database that's connected to the site.

Note: Some Wix Data features work only with user-created collections, such as data events and query caching.

App collections

Apps add their own collections to a site when they're installed, such as Wix Stores and Wix Bookings. These app collections store the app's data and expose it through the same Data API as other collections. Most app collections restrict changes to protect the app's data, but you can still query them and display them on pages.

Work with app collections

For each Wix business solution's app collections, including their IDs, fields, and permissions, see Wix App Collections.

You can also work with this data through the app's own APIs. For example, the Wix Stores APIs include methods for working with products.

In the Wix Data view, app collections appear grouped by the app that owns them, such as Bookings or eCommerce. The group name isn't always the collection ID's prefix, so copy the ID rather than building it from the group name.

Display app collections

Like your own collections, app collections have CMS Data Sources, so you can display their items on pages and in dynamic pages without code, for example in a unique product layout.

Collection IDs

Each collection has a unique ID that you use to refer to it in code.

Note: App collection IDs start with a prefix that names the business solution, in the form <prefix>/<collectionName>. Collections from an external database also have a prefix.

To copy a collection's ID, see Find Collection and Field IDs.

Permissions

Each collection has permissions that control who can read, add, update, and remove its items. You can change the permissions of collections that you create. App collections have fixed permissions.

You can set permissions when you create a collection, change them later in the CMS dashboard, or manage them in code with the Data Collections API.

Indexes

An index stores a collection's field values in an order that's optimized for lookups, separate from the items themselves. When you query by an indexed field, the database searches the index instead of every item, which makes queries faster for searching, filtering, and sorting.

Collections support these types of indexes:

  • Regular indexes: Speed up queries on fields that you search often.
  • Unique indexes: Speed up queries and also prevent two items from having the same value in the indexed field.

You can manage indexes in the CMS dashboard, or in code with the Data Indexes API.

Automatic indexes

For large collections with many queries, Wix identifies slow queries and creates automatic indexes to speed them up. You don't need to do anything to get them.

See also

Last updated: 2 November 2026

Did this help?