> ## Documentation Index
> Fetch the complete documentation index at: https://buttercms.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Collections

> Collections are structured data tables with a custom schema — great for reusable lists like team members, testimonials, FAQs, and categories.

## What is a Collection?

A Collection is a schema you define using a combination of simple Field Types (like Number Fields, Short Text Fields, and Date Fields). You add items matching this schema to your Collection, and then the entire Collection (or a filtered version of it) can be queried from the API and returned as JSON data.

It might help to think of a Collection as a table of structured data, like a spreadsheet:

* Each field on the Collection schema is like a table column.
* Each collection item represents a row of the table.

## Querying Collections

Collections can be queried in two main ways:

* They can be queried directly from the API via any of the Collections endpoints.
* They can be linked to other Content Types (like Single Pages, Page Types, or other Collections) via Reference Fields.

When you link content via a Reference Field, such as linking a Collection to a Page, it will show up in the API response for the parent Content Type.

## Collections at a glance

| Characteristic    | Description                                                                                               |
| ----------------- | --------------------------------------------------------------------------------------------------------- |
| **Structure**     | Table-like data using a user-defined schema                                                               |
| **API access**    | Query Collections directly from the API, or query referenced <br />content through a linked Page          |
| **Relationships** | Link Collections to Pages or other Collections via Reference fields                                       |
| Limited fieldset  | Collections can use most Field Types, **except**:<br />Components, Component Pickers, and Repeater fields |

## Common use cases

{/* /SOURCE */}

### Categories and tags

You can use Collections as facets (filterable properties) for your Pages. For example, if you were making a recipe app, your Recipe Page Type might include Reference Fields linking to Collections of key ingredients or main meals.

### Testimonials

You can use Collections to store reusable promotional content that can be referenced by multiple pages, like testimonials, G2 Badge ratings, CTA content, and more.

### Related data tables

Use Collections as tables of related data, which you can query directly. For example, a music site might have:

* **Artists Collection**: *name*, *headshot*, *genre*
* **Albums Collection:** *album name*, *cover art*, *release date*, and *artist* (which could be a Reference Field back to your Artists Collection!)

<Info>
  Collections best practices:

  * Keep fields narrowly focused on the item type.
  * Use references instead of duplicating data.
  * By default, collection items have an ID number instead of a slug, but you can add a slug field if your frontend needs stable URLs, as the collections GET endpoint allows for dot-notation-based field filtering.
</Info>

## Learn more

<CardGroup cols={2}>
  <Card title="Field Types reference" icon="input-text" href="../field-types/field-basics">
    All available field types and options you can use in Pages and Collections
  </Card>

  <Card title="Creating Collections" icon="input-text" href="../../create-content/creating-editing-content/add-pages-collections-posts/creating-collections">
    Learn how to create and link to Collections in the ButterCMS dashboard
  </Card>

  <Card title="API: Read Collections" icon="code" href="../../api-reference/collections/retrieve-collection">
    REST API to fetch collection items
  </Card>

  <Card title="API: Create Collections" icon="pen" href="../../api-reference/collections/create-collection-item">
    REST API for creating, editing, and deleting collection items
  </Card>
</CardGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Blog Engine" icon="newspaper" href="./blog-engine">
    Built-in blog solution
  </Card>

  <Card title="Components" icon="puzzle-piece" href="../field-types/components">
    Reusable content blocks
  </Card>
</CardGroup>
