---
title: Collection - Storefront API
description: >-
  A group of products [organized by a

  merchant](https://help.shopify.com/manual/products/collections) to make their

  store easier to browse. Collections can help customers discover related
  products

  by category, season, promotion, or other criteria.


  Query a collection's products with [filtering
  options](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products)

  like availability, price range, vendor, and tags. Each collection includes

  [`SEO`](/docs/api/storefront/2026-10/objects/SEO)

  information, an optional

  [`Image`](/docs/api/storefront/2026-10/objects/Image), and

  supports custom data through
  [`metafields`](/docs/api/storefront/2026-10/objects/Metafield).
api_version: 2026-10
source_url:
  html: 'https://shopify.dev/docs/api/storefront/latest/objects/Collection'
  md: 'https://shopify.dev/docs/api/storefront/latest/objects/Collection.md'
api_name: storefront
api_type: graphql
type: object
---

# Collection

object

Requires `unauthenticated_read_product_listings` access scope.

A group of products [organized by a merchant](https://help.shopify.com/manual/products/collections) to make their store easier to browse. Collections can help customers discover related products by category, season, promotion, or other criteria.

Query a collection's products with [filtering options](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections/filter-products) like availability, price range, vendor, and tags. Each collection includes [`SEO`](https://shopify.dev/docs/api/storefront/2026-10/objects/SEO) information, an optional [`Image`](https://shopify.dev/docs/api/storefront/2026-10/objects/Image), and supports custom data through [`metafields`](https://shopify.dev/docs/api/storefront/2026-10/objects/Metafield).

## Fields

* description

  [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String)

  non-null

  Stripped description of the collection, single line with HTML tags removed.

  * truncate​At

    [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int)

    ### Arguments

    Truncates a string after the given length.

  ***

* description​Html

  [HTML!](https://shopify.dev/docs/api/storefront/latest/scalars/HTML)

  non-null

  The description of the collection, complete with HTML formatting.

* handle

  [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String)

  non-null

  A human-friendly unique string for the collection automatically generated from its title. Limit of 255 characters.

* id

  [ID!](https://shopify.dev/docs/api/storefront/latest/scalars/ID)

  non-null

  A globally-unique ID.

* image

  [Image](https://shopify.dev/docs/api/storefront/latest/objects/Image)

  Image associated with the collection.

* metafield

  [Metafield](https://shopify.dev/docs/api/storefront/latest/objects/Metafield)

  Token access required

  A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.

  * key

    [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String)

    required

    ### Arguments

    The identifier for the metafield.

  * namespace

    [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

    The container the metafield belongs to. If omitted, the app-reserved namespace will be used.

  ***

* metafields

  [\[Metafield\]!](https://shopify.dev/docs/api/storefront/latest/objects/Metafield)

  non-null Token access required

  A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) that a merchant associates with a Shopify resource.

  * identifiers

    [\[Has​Metafields​Identifier!\]!](https://shopify.dev/docs/api/storefront/latest/input-objects/HasMetafieldsIdentifier)

    required

    ### Arguments

    The list of metafields to retrieve by namespace and key.

    The input must not contain more than `250` values.

  ***

* online​Store​Url

  [URL](https://shopify.dev/docs/api/storefront/latest/scalars/URL)

  The URL used for viewing the resource on the shop's Online Store. Returns `null` if the resource is currently not published to the Online Store sales channel.

* products

  [Product​Connection!](https://shopify.dev/docs/api/storefront/latest/connections/ProductConnection)

  non-null

  List of products in the collection.

  * after

    [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

    ### Arguments

    Returns the elements that come after the specified cursor.

  * before

    [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

    Returns the elements that come before the specified cursor.

  * filters

    [\[Product​Filter!\]](https://shopify.dev/docs/api/storefront/latest/input-objects/ProductFilter)

    Returns a subset of products matching all product filters.

    The input must not contain more than `250` values.

  * first

    [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int)

    Returns up to the first `n` elements from the list.

  * last

    [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int)

    Returns up to the last `n` elements from the list.

  * reverse

    [Boolean](https://shopify.dev/docs/api/storefront/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Product​Collection​Sort​Keys](https://shopify.dev/docs/api/storefront/latest/enums/ProductCollectionSortKeys)

    Default:COLLECTION\_DEFAULT

    Sort the underlying list by the given key.

  ***

* seo

  [SEO!](https://shopify.dev/docs/api/storefront/latest/objects/SEO)

  non-null

  The collection's SEO information.

* title

  [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String)

  non-null

  The collection’s name. Limit of 255 characters.

* tracking​Parameters

  [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

  URL parameters to be added to a page URL to track the origin of on-site search traffic for [analytics reporting](https://help.shopify.com/manual/reports-and-analytics/shopify-reports/report-types/default-reports/behaviour-reports). Returns a result when accessed through the [search](https://shopify.dev/docs/api/storefront/2026-10/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/2026-10/queries/predictiveSearch) queries, otherwise returns null.

* updated​At

  [Date​Time!](https://shopify.dev/docs/api/storefront/latest/scalars/DateTime)

  non-null

  The date and time when the collection was last modified.

***

## Map

### Fields and connections with this object

* [CollectionConnection.nodes](https://shopify.dev/docs/api/storefront/latest/connections/CollectionConnection#returns-nodes)
* [CollectionEdge.node](https://shopify.dev/docs/api/storefront/latest/objects/CollectionEdge#field-CollectionEdge.fields.node)
* [PredictiveSearchResult.collections](https://shopify.dev/docs/api/storefront/latest/objects/PredictiveSearchResult#field-PredictiveSearchResult.fields.collections)
* [Product.collections](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-Product.fields.collections)

### Possible type in

* [Menu​Item​Resource](https://shopify.dev/docs/api/storefront/latest/unions/MenuItemResource)
* [Metafield​Parent​Resource](https://shopify.dev/docs/api/storefront/latest/unions/MetafieldParentResource)
* [Metafield​Reference](https://shopify.dev/docs/api/storefront/latest/unions/MetafieldReference)

***

## Queries

* [collection](https://shopify.dev/docs/api/storefront/latest/queries/collection)

  query

  Retrieves a single [`Collection`](https://shopify.dev/docs/api/storefront/2026-10/objects/Collection) by its ID or handle. Use the [`products`](https://shopify.dev/docs/api/storefront/2026-10/objects/Collection#field-Collection.fields.products) field to access items in the collection.

  * handle

    [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

    ### Arguments

    The handle of the `Collection`.

  * id

    [ID](https://shopify.dev/docs/api/storefront/latest/scalars/ID)

    The ID of the `Collection`.

  ***

* [collections](https://shopify.dev/docs/api/storefront/latest/queries/collections)

  query

  Returns a paginated list of the shop's [collections](https://shopify.dev/docs/api/storefront/2026-10/objects/Collection). Each `Collection` object includes a nested connection to its [products](https://shopify.dev/docs/api/storefront/2026-10/objects/Collection#field-Collection.fields.products).

  * after

    [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

    ### Arguments

    Returns the elements that come after the specified cursor.

  * before

    [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

    Returns the elements that come before the specified cursor.

  * first

    [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int)

    Returns up to the first `n` elements from the list.

  * last

    [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int)

    Returns up to the last `n` elements from the list.

  * query

    [String](https://shopify.dev/docs/api/storefront/latest/scalars/String)

    Apply one or multiple filters to the query. Refer to the detailed [search syntax](https://shopify.dev/api/usage/search-syntax) for more information about using filters.

    * collection\_type
    * title
    * updated\_at

  * reverse

    [Boolean](https://shopify.dev/docs/api/storefront/latest/scalars/Boolean)

    Default:false

    Reverse the order of the underlying list.

  * sort​Key

    [Collection​Sort​Keys](https://shopify.dev/docs/api/storefront/latest/enums/CollectionSortKeys)

    Default:ID

    Sort the underlying list by the given key.

  ***

* [collection​By​Handle](https://shopify.dev/docs/api/storefront/latest/queries/collectionByHandle)

  query

  Deprecated

  * handle

    [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String)

    required

    ### Arguments

    The handle of the collection.

  ***

***

## Collection Queries

### Queried by

* [collection](https://shopify.dev/docs/api/storefront/latest/queries/collection)
* [collections](https://shopify.dev/docs/api/storefront/latest/queries/collections)

***

## Interfaces

* * [Has​Metafields](https://shopify.dev/docs/api/storefront/latest/interfaces/HasMetafields)

    interface

  * [Node](https://shopify.dev/docs/api/storefront/latest/interfaces/Node)

    interface

  * [Online​Store​Publishable](https://shopify.dev/docs/api/storefront/latest/interfaces/OnlineStorePublishable)

    interface

  * [Trackable](https://shopify.dev/docs/api/storefront/latest/interfaces/Trackable)

    interface

***

## Collection Implements

### Implements

* [Has​Metafields](https://shopify.dev/docs/api/storefront/latest/interfaces/HasMetafields)
* [Node](https://shopify.dev/docs/api/storefront/latest/interfaces/Node)
* [Online​Store​Publishable](https://shopify.dev/docs/api/storefront/latest/interfaces/OnlineStorePublishable)
* [Trackable](https://shopify.dev/docs/api/storefront/latest/interfaces/Trackable)
