--- title: collectionByHandle - Storefront API description: Find a collection by its handle. api_version: 2025-10 api_name: storefront type: query api_type: graphql source_url: html: 'https://shopify.dev/docs/api/storefront/latest/queries/collectionByHandle' md: 'https://shopify.dev/docs/api/storefront/latest/queries/collectionByHandle.md' --- # collection​By​Handle query Deprecated. Use [collection](https://shopify.dev/docs/api/admin-graphql/latest/queries/collection) instead. Find a collection by its handle. ## Arguments * handle [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) required The handle of the collection. *** ## Possible returns * Collection [Collection](https://shopify.dev/docs/api/storefront/latest/objects/Collection) A collection represents a grouping of products that a shop owner can create to organize them or make their shops easier to browse. * 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. * namespace [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) ### Arguments The container the metafield belongs to. If omitted, the app-reserved namespace will be used. * key [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) required The identifier for the metafield. *** * 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. * first [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int) ### Arguments Returns up to the first `n` elements from the list. * after [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) Returns the elements that come after the specified cursor. * last [Int](https://shopify.dev/docs/api/storefront/latest/scalars/Int) Returns up to the last `n` elements from the list. * before [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) Returns the elements that come before the specified cursor. * 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. * 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. *** * 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/current/queries/search) or [predictiveSearch](https://shopify.dev/docs/api/storefront/current/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. *** ## Examples * ### collectionByHandle reference ## Query Reference ```graphql { collectionByHandle(handle) { # collectionByHandle fields } } ```