> ## 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.

# Retrieve Multiple Collections by Key

> Retrieve items from one or more Collections at once, by a comma-delimited list of collection keys.

Retrieve items from one or more Collections in a single request, by passing a comma-delimited list of collection keys. This is the only way to fetch several collections' items in one call; the per-collection `GET /content/{collection_key}/` endpoint always returns exactly one collection.

**Legacy Endpoint**: This is an older, lighter-weight endpoint. With two or more keys, the response has no pagination `meta` and all items for each key are returned. With exactly one key that names a collection, the request is handled by `GET /content/{collection_key}/`: the response includes `meta` (`count`, `next_page`, `previous_page`) and accepts the same `page`, `page_size`, `order`, `preview` and `fields.<name>` parameters.


## OpenAPI

````yaml /api/openapi/read_api.yaml get /content/
openapi: 3.1.0
info:
  title: ButterCMS Read API
  version: 2.0.0
  description: >
    Read endpoints for the ButterCMS API — Pages, Collections, Blog Posts, Blog
    Metadata, and Feeds.
  contact:
    email: support@buttercms.com
  license:
    name: ButterCMS Terms of Service
    url: https://buttercms.com/terms/
servers:
  - url: https://api.buttercms.com/v2
    description: ButterCMS API v2
security:
  - readTokenAuthHeader: []
  - readTokenAuthQuery: []
tags:
  - name: Pages
    description: >
      Retrieve pages from your ButterCMS account.


      **Single Pages**: Use `*` as the page_type to get Single Pages (those
      without a Page Type) which represent unique pages on your site like your
      Homepage. Useful for creating your sitemap.xml.


      **Page Type Pages**: Use the actual page type slug to get pages of that
      specific type. Page Types allow you to create many pages with the same
      structure.


      **Note:** The fields of a page are defined by you, they are customizable.
      Sample responses below contain a basic set of fields for illustrative
      purposes.
  - name: Collections
    description: >
      Retrieve collection items from your ButterCMS account. Collections are
      flexible, user-defined content structures with completely customizable
      field schemas.


      See also: Architecture & Performance for guidance on `levels`, pagination,
      and performance best practices.
  - name: Blog posts
    description: >
      Retrieve blog posts from your ButterCMS account. List blog posts with
      pagination and filtering options, or retrieve individual posts by slug.
  - name: Blog metadata
    description: >
      Retrieve blog-related metadata including authors, categories, and tags.
      These endpoints provide access to the organizational structure of your
      blog content.
  - name: Feeds and utilities
    description: >
      Generate XML feeds for content syndication and SEO.


      - **RSS Feed**: Fully generated RSS 2.0 feed for your blog

      - **Atom Feed**: Standards-compliant Atom 1.0 feed

      - **Sitemap**: XML sitemap for search engine discovery


      All feeds can be filtered by category or tag and include only published
      content from your organization.
  - name: Images - Info
    description: >
      ButterCMS has an integration with
      [Filestack](https://www.filestack.com/docs/api/processing/) for image
      transformations. You can leverage their robust set of image transformation
      capabilities.


      After you upload an image, to create a thumbnail, here's an example:


      - **Original URL**: `https://cdn.buttercms.com/3ccPHhYHTNK2zQ14gCOy`

      - **Thumbnail URL**:
      `https://cdn.buttercms.com/resize=width:100,height:100/3ccPHhYHTNK2zQ14gCOy`


      For complete transformation options and parameters, see the [full
      Filestack documentation](https://www.filestack.com/docs/api/processing/).
paths:
  /content/:
    get:
      tags:
        - Collections
      summary: Retrieve Multiple Collections by Key
      description: >
        Retrieve items from one or more Collections in a single request, by
        passing a comma-delimited list of collection keys. This is the only way
        to fetch several collections' items in one call; the per-collection `GET
        /content/{collection_key}/` endpoint always returns exactly one
        collection.


        **Legacy Endpoint**: This is an older, lighter-weight endpoint. With two
        or more keys, the response has no pagination `meta` and all items for
        each key are returned. With exactly one key that names a collection, the
        request is handled by `GET /content/{collection_key}/`: the response
        includes `meta` (`count`, `next_page`, `previous_page`) and accepts the
        same `page`, `page_size`, `order`, `preview` and `fields.<name>`
        parameters.
      operationId: retrieveCollectionsByKeys
      parameters:
        - name: keys
          in: query
          required: true
          schema:
            type: string
          description: >
            Comma-delimited list of Collection keys to retrieve. Every key must
            match an existing collection, or the request returns a `404`.
          example: navigation_menu_item,navigation_menu
        - $ref: '#/components/parameters/auth_token'
        - name: test
          in: query
          description: >
            Set to 1 to include draft/unpublished collection items (the alias
            used by this legacy endpoint; equivalent to `preview=1` elsewhere).
          required: false
          schema:
            type: integer
            enum:
              - 0
              - 1
            default: 0
        - $ref: '#/components/parameters/locale'
        - $ref: '#/components/parameters/levels'
      responses:
        '200':
          description: >
            Collections retrieved successfully. The `data` object is keyed by
            each requested collection key. For two or more keys there is no
            pagination `meta` and all items for each key are included; a single
            collection key returns the `GET /content/{collection_key}/` shape,
            with `meta`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    additionalProperties:
                      type: array
                      items:
                        $ref: '#/components/schemas/CollectionItemObject'
              examples:
                multiple_collections:
                  summary: Two collections in one request
                  value:
                    data:
                      navigation_menu_item:
                        - meta:
                            id: 790691
                          label: Home
                          url: '#home'
                        - meta:
                            id: 790692
                          label: About
                          url: '#about'
                      navigation_menu:
                        - meta:
                            id: 790697
                          name: Main menu
                          menu_items:
                            - meta:
                                id: 790691
                              label: Home
                              url: '#home'
                            - meta:
                                id: 790692
                              label: About
                              url: '#about'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          description: >
            **Not Found - Unknown Collection Key**


            At least one of the keys in `keys` does not match any collection
            configured for your organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                detail: Content key bogus_key not found
      security:
        - readTokenAuthHeader: []
        - readTokenAuthQuery: []
components:
  parameters:
    auth_token:
      name: auth_token
      in: query
      required: false
      schema:
        type: string
      description: |
        Your ButterCMS read API token
      example: your_api_token
    locale:
      name: locale
      in: query
      description: >
        Set to the api slug of your configured locale (e.g. `en` or `fr`). When
        omitted, this query parameter will default to your organization's
        default locale.
      required: false
      schema:
        type: string
        maxLength: 10
        example: en
      examples:
        english:
          value: en
          description: English locale
        spanish:
          value: es
          description: Spanish locale
        french:
          value: fr
          description: French locale
    levels:
      name: levels
      in: query
      description: >
        Depth of relationship serialization.


        Controls how many levels of referenced content to include:

        - **1**: Direct fields only, references as URIs

        - **2**: Direct fields + one level of references (default)

        - **3-5**: Deeper relationship traversal


        **Important**: Higher levels increase response size. Maximum 10MB per
        response.


        Valid range: 1-5 (inclusive). Values outside this range will be
        automatically capped.
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 5
        default: 2
      examples:
        shallow:
          value: 1
          description: Minimal depth (1 level)
        default:
          value: 2
          description: Default depth (2 levels)
        deep:
          value: 5
          description: Maximum depth (5 levels)
  schemas:
    CollectionItemObject:
      type: object
      description: Individual collection item with dynamic field structure and metadata
      properties:
        meta:
          $ref: '#/components/schemas/CollectionItemMeta'
      additionalProperties: true
      example:
        meta:
          id: 123
        name: The Beatles
        genre: Rock
        formed_year: 1960
        members:
          - John Lennon
          - Paul McCartney
          - George Harrison
          - Ringo Starr
        description: Legendary British rock band
    ErrorResponse:
      type: object
      properties:
        detail:
          type: string
          description: Error message describing what went wrong
          example: Authentication credentials were not provided.
    CollectionItemMeta:
      type: object
      description: Metadata for collection items containing unique identifier
      properties:
        id:
          type: integer
          description: >-
            Unique identifier for the collection item, used for updates and
            deletions
          example: 123
      required:
        - id
  responses:
    UnauthorizedResponse:
      description: Unauthorized - Invalid or missing API token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_token:
              summary: Missing API token (most Read endpoints)
              description: >-
                The message most Read API endpoints (Pages, Blog Posts, Blog
                metadata, Feeds, `/v2/content/?keys=` and single collection
                items) return for a missing token.
              value:
                detail: Incorrect authentication credentials.
            missing_token_collections:
              summary: Missing API token (writes, collection by key, page search)
              description: >-
                Write requests, `GET /v2/content/{key}/` and `GET
                /v2/pages/search/` return this message instead for a missing
                token.
              value:
                detail: Authentication credentials were not provided.
            invalid_token:
              summary: Invalid API token
              value:
                detail: Invalid token.
  securitySchemes:
    readTokenAuthHeader:
      type: apiKey
      in: header
      name: Authorization
      description: >
        Set the `Authorization` header to `Token your_read_api_token`.


        Example: `Authorization: Token abc123def456`


        Note: The header value includes the `Token` prefix. `Authorization:
        Bearer ...` is not accepted and returns 401.


        You can access your API token from your settings page.
    readTokenAuthQuery:
      type: apiKey
      in: query
      name: auth_token
      description: >
        Pass your API token via the `auth_token` parameter on every request:
        `?auth_token=your_read_api_token`.


        You can access your API token from your settings page.


        Requests made with a missing or invalid token will get a 401
        Unauthorized response. All requests must be made over HTTPS.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.