---
title: productByHandle - GraphQL Admin
description: |-
Retrieves a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) using its handle. A handle is a unique, URL-friendly string that Shopify automatically generates from the product's title.
Returns `null` if no product exists with the specified handle.
api_version: 2025-10
api_name: admin
type: query
api_type: graphql
source_url:
html: https://shopify.dev/docs/api/admin-graphql/latest/queries/productbyhandle
md: https://shopify.dev/docs/api/admin-graphql/latest/queries/productbyhandle.md
---
# productByHandle
query
Requires `read_products` access scope.
Deprecated. Use [productByIdentifier](https://shopify.dev/docs/api/admin-graphql/latest/queries/productByIdentifier) instead.
Retrieves a [`Product`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product) using its handle. A handle is a unique, URL-friendly string that Shopify automatically generates from the product's title.
Returns `null` if no product exists with the specified handle.
## Arguments
* handle
[String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
required
A unique string that identifies the product. Handles are automatically generated based on the product's title, and are always lowercase. Whitespace and special characters are replaced with a hyphen: `-`. If there are multiple consecutive whitespace or special characters, then they're replaced with a single hyphen. Whitespace or special characters at the beginning are removed. If a duplicate product title is used, then the handle is auto-incremented by one. For example, if you had two products called `Potion`, then their handles would be `potion` and `potion-1`. After a product has been created, changing the product title doesn't update the handle.
***
## Possible returns
* Product
[Product](https://shopify.dev/docs/api/admin-graphql/latest/objects/Product)
The `Product` object lets you manage products in a merchant’s store.
Products are the goods and services that merchants offer to customers. They can include various details such as title, description, price, images, and options such as size or color. You can use [product variants](https://shopify.dev/docs/api/admin-graphql/latest/objects/productvariant) to create or update different versions of the same product. You can also add or update product [media](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/media). Products can be organized by grouping them into a [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/collection).
Learn more about working with [Shopify's product model](https://shopify.dev/docs/apps/build/graphql/migrate/new-product-model/product-model-components), including limitations and considerations.
* availablePublicationsCount
[Count](https://shopify.dev/docs/api/admin-graphql/latest/objects/Count)
The number of [publications](https://shopify.dev/docs/api/admin-graphql/latest/objects/Publication) that a resource is published to, without [feedback errors](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback).
* bundleComponents
[ProductBundleComponentConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/ProductBundleComponentConnection)
non-null
A list of [components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle) that are associated with a product in a bundle.
* first
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
### Arguments
The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* after
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* last
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* before
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* reverse
[Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
Default:false
Reverse the order of the underlying list.
***
* category
[TaxonomyCategory](https://shopify.dev/docs/api/admin-graphql/latest/objects/TaxonomyCategory)
The category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17).
* collections
[CollectionConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/CollectionConnection)
non-null
A list of [collections](https://shopify.dev/docs/api/admin-graphql/latest/objects/Collection) that include the product.
* first
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
### Arguments
The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* after
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* last
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* before
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* reverse
[Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
Default:false
Reverse the order of the underlying list.
* sortKey
[CollectionSortKeys](https://shopify.dev/docs/api/admin-graphql/latest/enums/CollectionSortKeys)
Default:ID
Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).
* query
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).
* * default
string
* collection\_type
string
* handle
string
- Filter by a case-insensitive search of multiple fields in a document.
- Example:
* `query=Bob Norman`
* `query=title:green hoodie`
- Valid values:
* `custom`
* `smart`
* * id
id
* product\_id
id
- Filter by `id` range.
- Example:
* `id:1234`
* `id:>=1234`
* `id:<=1234`
Filter by collections containing a product by its ID.
* * product\_publication\_status
string
* publishable\_status
string
* published\_at
time
- Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published\_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead.
- Valid values:
* `* {channel_app_id}-approved`
* `* {channel_app_id}-rejected`
* `* {channel_app_id}-needs_action`
* `* {channel_app_id}-awaiting_review`
* `* {channel_app_id}-published`
* `* {channel_app_id}-demoted`
* `* {channel_app_id}-scheduled`
* `* {channel_app_id}-provisionally_published`
Example:
* `product_publication_status:189769876-approved`
**Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published\_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values.
- Valid values:
* `* {channel_app_id}-unset`
* `* {channel_app_id}-pending`
* `* {channel_app_id}-approved`
* `* {channel_app_id}-not_approved`
Example:
* `publishable_status:580111-unset`
* `publishable_status:580111-pending`
Filter by the date and time when the collection was published to the Online Store.
* * published\_status
string
* title
string
- Filter resources by their visibility and publication state on a channel. Online store channel filtering: - `online_store_channel`: Returns all resources in the online store channel, regardless of publication status. - `published`/`visible`: Returns resources that are published to the online store. - `unpublished`: Returns resources that are not published to the online store. Channel-specific filtering using the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) with suffixes: - `{channel_app_id}-published`: Returns resources published to the specified channel. - `{channel_app_id}-visible`: Same as `{channel_app_id}-published` (kept for backwards compatibility). - `{channel_app_id}-intended`: Returns resources added to the channel but not yet published. - `{channel_app_id}-hidden`: Returns resources not added to the channel or not published. Other: - `unavailable`: Returns resources not published to any channel.
- Valid values:
* `online_store_channel`
* `published`
* `visible`
* `unpublished`
* `* {channel_app_id}-published`
* `* {channel_app_id}-visible`
* `* {channel_app_id}-intended`
* `* {channel_app_id}-hidden`
* `unavailable`
Example:
* `published_status:online_store_channel`
* `published_status:published`
* `published_status:580111-published`
* `published_status:580111-hidden`
* `published_status:unavailable`
* updated\_at
time
***
* combinedListing
[CombinedListing](https://shopify.dev/docs/api/admin-graphql/latest/objects/CombinedListing)
A special product type that combines separate products from a store into a single product listing. [Combined listings](https://shopify.dev/apps/build/product-merchandising/combined-listings) are connected by a shared option, such as color, model, or dimension.
* combinedListingRole
[CombinedListingsRole](https://shopify.dev/docs/api/admin-graphql/latest/enums/CombinedListingsRole)
The [role of the product](https://shopify.dev/docs/apps/build/product-merchandising/combined-listings/build-for-combined-listings) in a combined listing.
If `null`, then the product isn't part of any combined listing.
* compareAtPriceRange
[ProductCompareAtPriceRange](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductCompareAtPriceRange)
The [compare-at price range](https://help.shopify.com/manual/products/details/product-pricing/sale-pricing) of the product in the shop's default currency.
* contextualPricing
[ProductContextualPricing!](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductContextualPricing)
non-null
The pricing that applies to a customer in a specific context. For example, a price might vary depending on the customer's location. Only active markets are considered in the price resolution.
* context
[ContextualPricingContext!](https://shopify.dev/docs/api/admin-graphql/latest/input-objects/ContextualPricingContext)
required
### Arguments
The context used to generate contextual pricing for the variant.
***
* createdAt
[DateTime!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/DateTime)
non-null
The date and time when the product was created.
* defaultCursor
[String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
non-null
A default [cursor](https://shopify.dev/api/usage/pagination-graphql) that returns the single next record, sorted ascending by ID.
* description
[String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
non-null
A single-line description of the product, with [HTML tags](https://developer.mozilla.org/en-US/docs/Web/HTML) removed.
* truncateAt
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
### Arguments
Truncates a string after the given length.
***
* descriptionHtml
[HTML!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/HTML)
non-null
The description of the product, with HTML tags. For example, the description might include bold `` and italic `` text.
* events
[EventConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/EventConnection)
non-null
The paginated list of events associated with the host subject.
* first
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
### Arguments
The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* after
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* last
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* before
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* reverse
[Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
Default:false
Reverse the order of the underlying list.
* sortKey
[EventSortKeys](https://shopify.dev/docs/api/admin-graphql/latest/enums/EventSortKeys)
Default:ID
Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).
* query
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).
* * action
string
* comments
boolean
* created\_at
time
* id
id
* subject\_type
string
- The action that occured.
- Example:
* `action:create`
Whether or not to include [comment-events](https://shopify.dev/api/admin-graphql/latest/objects/CommentEvent) in your search, passing `false` will exclude comment-events, any other value will include comment-events.
- Example:
* `false`
* `true`
Filter by the date and time when the event happened.
- Example:
* `created_at:>2020-10-21`
* `created_at:=1234`
* `id:<=1234`
The resource type affected by this event. See [EventSubjectType](https://shopify.dev/api/admin-graphql/latest/enums/EventSubjectType) for possible values.
Example:
* `PRODUCT_VARIANT`
* `PRODUCT`
* `COLLECTION`
***
* featuredMedia
[Media](https://shopify.dev/docs/api/admin-graphql/latest/interfaces/Media)
The featured [media](https://shopify.dev/docs/apps/build/online-store/product-media) associated with the product.
* feedback
[ResourceFeedback](https://shopify.dev/docs/api/admin-graphql/latest/objects/ResourceFeedback)
The information that lets merchants know what steps they need to take to make sure that the app is set up correctly.
For example, if a merchant hasn't set up a product correctly in the app, then the feedback might include a message that says "You need to add a price to this product".
* giftCardTemplateSuffix
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The [theme template](https://shopify.dev/docs/storefronts/themes/architecture/templates) that's used when customers view the gift card in a store.
* handle
[String!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
non-null
A unique, human-readable string of the product's title. A handle can contain letters, hyphens (`-`), and numbers, but no spaces. The handle is used in the online store URL for the product.
* hasOnlyDefaultVariant
[Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
non-null
Whether the product has only a single variant with the default option and value.
* hasOutOfStockVariants
[Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
non-null
Whether the product has variants that are out of stock.
* hasVariantsThatRequiresComponents
[Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
non-null
Whether at least one of the product variants requires [bundle components](https://shopify.dev/docs/apps/build/product-merchandising/bundles/add-product-fixed-bundle).
Learn more about [store eligibility for bundles](https://shopify.dev/docs/apps/build/product-merchandising/bundles#store-eligibility).
* id
[ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)
non-null
A globally-unique ID.
* inCollection
[Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
non-null
Whether the product is in a specified [collection](https://shopify.dev/docs/api/admin-graphql/latest/objects/collection).
* id
[ID!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/ID)
required
### Arguments
The ID of the collection to check. For example, `id: "gid://shopify/Collection/123"`.
***
* isGiftCard
[Boolean!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
non-null
Whether the product is a gift card.
* legacyResourceId
[UnsignedInt64!](https://shopify.dev/docs/api/admin-graphql/latest/scalars/UnsignedInt64)
non-null
The ID of the corresponding resource in the REST Admin API.
* media
[MediaConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/MediaConnection)
non-null
The [media](https://shopify.dev/docs/apps/build/online-store/product-media) associated with the product. Valid media are images, 3D models, videos.
* first
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
### Arguments
The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* after
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* last
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* before
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* reverse
[Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
Default:false
Reverse the order of the underlying list.
* sortKey
[ProductMediaSortKeys](https://shopify.dev/docs/api/admin-graphql/latest/enums/ProductMediaSortKeys)
Default:POSITION
Sort the underlying list using a key. If your query is slow or returns an error, then [try specifying a sort key that matches the field used in the search](https://shopify.dev/api/usage/pagination-graphql#search-performance-considerations).
* query
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).
* * id
id
* media\_type
string
- Filter by `id` range.
- Example:
* `id:1234`
* `id:>=1234`
* `id:<=1234`
Valid values:
* `IMAGE`
* `VIDEO`
* `MODEL_3D`
* `EXTERNAL_VIDEO`
***
* mediaCount
[Count](https://shopify.dev/docs/api/admin-graphql/latest/objects/Count)
The total count of [media](https://shopify.dev/docs/apps/build/online-store/product-media) that's associated with a product.
* metafield
[Metafield](https://shopify.dev/docs/api/admin-graphql/latest/objects/Metafield)
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/admin-graphql/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/admin-graphql/latest/scalars/String)
required
The key for the metafield.
***
* metafields
[MetafieldConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/MetafieldConnection)
non-null
A list of [custom fields](https://shopify.dev/docs/apps/build/custom-data) that a merchant associates with a Shopify resource.
* namespace
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
### Arguments
The metafield namespace to filter by. If omitted, the app-reserved namespace will be used.
* keys
[\[String!\]](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
List of keys of metafields in the format `namespace.key`, will be returned in the same format.
* first
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* after
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* last
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* before
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* reverse
[Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
Default:false
Reverse the order of the underlying list.
***
* onlineStorePreviewUrl
[URL](https://shopify.dev/docs/api/admin-graphql/latest/scalars/URL)
The [preview URL](https://help.shopify.com/manual/online-store/setting-up#preview-your-store) for the online store.
* onlineStoreUrl
[URL](https://shopify.dev/docs/api/admin-graphql/latest/scalars/URL)
The product's URL on the online store. If `null`, then the product isn't published to the online store sales channel.
* options
[\[ProductOption!\]!](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductOption)
non-null
A list of product options. The limit is defined by the [shop's resource limits for product options](https://shopify.dev/docs/api/admin-graphql/latest/objects/Shop#field-resourcelimits) (`Shop.resourceLimits.maxProductOptions`).
* first
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
### Arguments
Truncate the array result to this size.
***
* priceRangeV2
[ProductPriceRangeV2!](https://shopify.dev/docs/api/admin-graphql/latest/objects/ProductPriceRangeV2)
non-null
The minimum and maximum prices of a product, expressed in decimal numbers. For example, if the product is priced between $10.00 and $50.00, then the price range is $10.00 - $50.00.
* productComponents
[ProductComponentTypeConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/ProductComponentTypeConnection)
non-null
A list of products that contain at least one variant associated with at least one of the current products' variants via group relationship.
* first
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
### Arguments
The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* after
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* last
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* before
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* reverse
[Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
Default:false
Reverse the order of the underlying list.
***
* productComponentsCount
[Count](https://shopify.dev/docs/api/admin-graphql/latest/objects/Count)
A count of unique products that contain at least one variant associated with at least one of the current products' variants via group relationship.
* productParents
[ProductConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/ProductConnection)
non-null
A list of products that has a variant that contains any of this product's variants as a component.
* first
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
### Arguments
The first `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* after
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come after the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* last
[Int](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Int)
The last `n` elements from the [paginated list](https://shopify.dev/api/usage/pagination-graphql).
* before
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
The elements that come before the specified [cursor](https://shopify.dev/api/usage/pagination-graphql).
* reverse
[Boolean](https://shopify.dev/docs/api/admin-graphql/latest/scalars/Boolean)
Default:false
Reverse the order of the underlying list.
* query
[String](https://shopify.dev/docs/api/admin-graphql/latest/scalars/String)
A filter made up of terms, connectives, modifiers, and comparators. You can apply one or more filters to a query. Learn more about [Shopify API search syntax](https://shopify.dev/api/usage/search-syntax).
* * default
string
* barcode
string
* bundles
boolean
* category\_id
string
* collection\_id
id
* combined\_listing\_role
string
* created\_at
time
* delivery\_profile\_id
id
* error\_feedback
string
- Filter by a case-insensitive search of multiple fields in a document.
- Example:
* `query=Bob Norman`
* `query=title:green hoodie`
Filter by the product variant [`barcode`](https://shopify.dev/api/admin-graphql/latest/objects/ProductVariant#field-barcode) field.
- Example:
* `barcode:ABC-abc-1234`
Filter by a [product bundle](https://shopify.dev/docs/apps/build/product-merchandising/bundles). A product bundle is a set of two or more related products, which are commonly offered at a discount.
- Example:
* `bundles:true`
Filter by the product [category ID](https://shopify.dev/api/admin-graphql/latest/objects/Product#field-category) (`product.category.id`). A product category is the category of a product from [Shopify's Standard Product Taxonomy](https://shopify.github.io/product-taxonomy/releases/unstable/?categoryId=sg-4-17-2-17).
- Example:
* `category_id:sg-4-17-2-17`
Filter by the collection [`id`](https://shopify.dev/api/admin-graphql/latest/objects/Collection#field-id) field.
- Example:
* `collection_id:108179161409`
Filter by the role of the product in a [combined listing](https://shopify.dev/apps/build/product-merchandising/combined-listings).
- Valid values:
* `parent`
* `child`
* `no_role`
Example:
* `combined_listing_role:parent`
Filter by the date and time when the product was created.
- Example:
* `created_at:>'2020-10-21T23:39:20Z'`
* `created_at:=1234`
* `id:<=1234`
Filter by inventory count.
- Example:
* `inventory_total:0`
* `inventory_total:>150`
* `inventory_total:>=200`
Filter by products that have a reduced price. For more information, refer to the [`CollectionRule`](https://shopify.dev/api/admin-graphql/latest/objects/CollectionRule) object.
- Example:
* `is_price_reduced:true`
Filters resources by metafield value. Format: `metafields.{namespace}.{key}:{value}`. Learn more about [querying by metafield value](https://shopify.dev/apps/build/custom-data/metafields/query-by-metafield-value).
- Example:
* `metafields.custom.on_sale:true`
* `metafields.product.material:"gid://shopify/Metaobject/43458085"`
Filter by products that are out of stock in at least one location.
- Example:
* `out_of_stock_somewhere:true`
Filter by the product variant [`price`](https://shopify.dev/api/admin-graphql/latest/objects/Productvariant#field-price) field.
- Example:
* `price:100.57`
Filter by the app [`id`](https://shopify.dev/api/admin-graphql/latest/objects/App#field-id) field.
- Example:
* `product_configuration_owner:10001`
Filter by channel approval process status of the resource on a channel, such as the online store. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#field-Channel.fields.app) (`Channel.app.id`) and one of the valid values. For simple visibility checks, use [published\_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) instead.
- Valid values:
* `* {channel_app_id}-approved`
* `* {channel_app_id}-rejected`
* `* {channel_app_id}-needs_action`
* `* {channel_app_id}-awaiting_review`
* `* {channel_app_id}-published`
* `* {channel_app_id}-demoted`
* `* {channel_app_id}-scheduled`
* `* {channel_app_id}-provisionally_published`
Example:
* `product_publication_status:189769876-approved`
Filter by a comma-separated list of [product types](https://help.shopify.com/manual/products/details/product-type).
- Example:
* `product_type:snowboard`
Filter by a comma-separated list of publication IDs that are associated with the product.
- Example:
* `publication_ids:184111530305,184111694145`
**Deprecated:** This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use [published\_status](https://shopify.dev/api/admin-graphql/latest/queries/products#argument-query-filter-publishable_status) for visibility checks. Filter by the publishable status of the resource on a channel. The value is a composite of the [channel `app` ID](https://shopify.dev/api/admin-graphql/latest/objects/Channel#app-price) (`Channel.app.id`) and one of the valid status values.
- Valid values:
* `* {channel_app_id}-unset`
* `* {channel_app_id}-pending`
* `* {channel_app_id}-approved`
* `* {channel_app_id}-not_approved`
Example:
* `publishable_status:580111-unset`
* `publishable_status:580111-pending`
Filter by the date and time when the product was published to the online store and other sales channels.
- Example:
* `published_at:>2020-10-21T23:39:20Z`
* `published_at:'2020-10-21T23:39:20Z'`
* `updated_at:2020-10-21T23:39:20Z`
* `created_at:=1234`
* `id:<=1234`
Filter by the metafield definition [`key`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-key) field.
- Example:
* `key:some-key`
Filter by the metafield definition [`namespace`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-namespace) field.
- Example:
* `namespace:some-namespace`
Filter by the metafield definition [`ownerType`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-ownertype) field.
- Example:
* `owner_type:PRODUCT`
Filter by the metafield definition [`type`](https://shopify.dev/docs/api/admin-graphql/latest/objects/MetafieldDefinition#field-type) field.
- Example:
* `type:single_line_text_field`
Filter by the date and time when the metafield definition was last updated.
Example:
* `updated_at:>2020-10-21T23:39:20Z`
* `updated_at: {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query {
productByHandle(handle: "there is no product with a handle like this") {
id
title
productType
description
vendor
}
}`,
);
const json = await response.json();
return json.data;
}
```
#### Ruby
```ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
query {
productByHandle(handle: "there is no product with a handle like this") {
id
title
productType
description
vendor
}
}
QUERY
response = client.query(query: query)
```
#### Node.js
```javascript
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: `query {
productByHandle(handle: "there is no product with a handle like this") {
id
title
productType
description
vendor
}
}`,
});
```
#### Response
```json
{
"productByHandle": null
}
```
* ### Retrieve product information using the product handle
#### Query
```graphql
query {
productByHandle(handle: "ipod-nano") {
id
handle
title
productType
description
vendor
priceRangeV2 {
minVariantPrice {
amount
currencyCode
}
maxVariantPrice {
amount
currencyCode
}
}
}
}
```
#### cURL
```bash
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "query { productByHandle(handle: \"ipod-nano\") { id handle title productType description vendor priceRangeV2 { minVariantPrice { amount currencyCode } maxVariantPrice { amount currencyCode } } } }"
}'
```
#### React Router
```javascript
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query {
productByHandle(handle: "ipod-nano") {
id
handle
title
productType
description
vendor
priceRangeV2 {
minVariantPrice {
amount
currencyCode
}
maxVariantPrice {
amount
currencyCode
}
}
}
}`,
);
const json = await response.json();
return json.data;
}
```
#### Ruby
```ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
query {
productByHandle(handle: "ipod-nano") {
id
handle
title
productType
description
vendor
priceRangeV2 {
minVariantPrice {
amount
currencyCode
}
maxVariantPrice {
amount
currencyCode
}
}
}
}
QUERY
response = client.query(query: query)
```
#### Node.js
```javascript
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: `query {
productByHandle(handle: "ipod-nano") {
id
handle
title
productType
description
vendor
priceRangeV2 {
minVariantPrice {
amount
currencyCode
}
maxVariantPrice {
amount
currencyCode
}
}
}
}`,
});
```
#### Response
```json
{
"productByHandle": {
"id": "gid://shopify/Product/440089423",
"handle": "ipod-nano",
"title": "IPod Nano - 8GB",
"productType": "Cult Products",
"description": "It's the small iPod with one very big idea: Video. Now the world's most popular music player, available in 4GB and 8GB models, lets you enjoy TV shows, movies, video podcasts, and more. The larger, brighter display means amazing picture quality. In six eye-catching colors, iPod nano is stunning all around. And with models starting at just $149, little speaks volumes.",
"vendor": "Apple",
"priceRangeV2": {
"minVariantPrice": {
"amount": "199.0",
"currencyCode": "USD"
},
"maxVariantPrice": {
"amount": "199.0",
"currencyCode": "USD"
}
}
}
}
```
* ### Retrieve the ID of a product with a specified handle
#### Query
```graphql
query getProductIdFromHandle($handle: String!) {
productByHandle(handle: $handle) {
id
}
}
```
#### Variables
```json
{
"handle": "element"
}
```
#### cURL
```bash
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "query getProductIdFromHandle($handle: String!) { productByHandle(handle: $handle) { id } }",
"variables": {
"handle": "element"
}
}'
```
#### React Router
```javascript
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query getProductIdFromHandle($handle: String!) {
productByHandle(handle: $handle) {
id
}
}`,
{
variables: {
"handle": "element"
},
},
);
const json = await response.json();
return json.data;
}
```
#### Ruby
```ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
query getProductIdFromHandle($handle: String!) {
productByHandle(handle: $handle) {
id
}
}
QUERY
variables = {
"handle": "element"
}
response = client.query(query: query, variables: variables)
```
#### Node.js
```javascript
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `query getProductIdFromHandle($handle: String!) {
productByHandle(handle: $handle) {
id
}
}`,
"variables": {
"handle": "element"
},
},
});
```
#### Response
```json
{
"productByHandle": {
"id": "gid://shopify/Product/20995642"
}
}
```
[Open in GraphiQL](http://localhost:3457/graphiql?query=query%20%7B%0A%20%20productByHandle\(handle%3A%20%22there%20is%20no%20product%20with%20a%20handle%20like%20this%22\)%20%7B%0A%20%20%20%20id%0A%20%20%20%20title%0A%20%20%20%20productType%0A%20%20%20%20description%0A%20%20%20%20vendor%0A%20%20%7D%0A%7D)
##### GQL
```graphql
query {
productByHandle(handle: "there is no product with a handle like this") {
id
title
productType
description
vendor
}
}
```
##### cURL
```bash
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2025-10/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "query { productByHandle(handle: \"there is no product with a handle like this\") { id title productType description vendor } }"
}'
```
##### React Router
```javascript
import { authenticate } from "../shopify.server";
export const loader = async ({request}) => {
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
query {
productByHandle(handle: "there is no product with a handle like this") {
id
title
productType
description
vendor
}
}`,
);
const json = await response.json();
return json.data;
}
```
##### Node.js
```javascript
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: `query {
productByHandle(handle: "there is no product with a handle like this") {
id
title
productType
description
vendor
}
}`,
});
```
##### Ruby
```ruby
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~QUERY
query {
productByHandle(handle: "there is no product with a handle like this") {
id
title
productType
description
vendor
}
}
QUERY
response = client.query(query: query)
```
## Response
JSON
```json
{
"productByHandle": null
}
```