Skip to main content
Log inSign up

Shopify uses cookies to provide necessary site functionality and improve your experience. By using our website, you agree to our privacy policy and our cookie policy.

query

Requires read_products access scope.

Deprecated. Use `productByIdentifier` instead.

Return a product by its handle.

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


Was this section helpful?

•

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 to create or update different versions of the same product. You can also add or update product media. Products can be organized by grouping them into a collection.

Learn more about working with Shopify's product model, including limitations and considerations.

availablePublicationsCount•

The number of publications that a resource is published to, without feedback errors.

bundleComponents•
non-null

A list of components that are associated with a product in a bundle.

category•

The category of a product from Shopify's Standard Product Taxonomy.

collections•
non-null

A list of collections that include the product.

combinedListing•

A special product type that combines separate products from a store into a single product listing. Combined listings are connected by a shared option, such as color, model, or dimension.

combinedListingRole•

The role of the product in a combined listing.

If null, then the product isn't part of any combined listing.

compareAtPriceRange•

The compare-at price range of the product in the shop's default currency.

contextualPricing•
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. As of API version 2025-04, only active markets are considered in the price resolution.

createdAt•
non-null

The date and time when the product was created.

defaultCursor•
non-null

A default cursor that returns the single next record, sorted ascending by ID.

description•
non-null

A single-line description of the product, with HTML tags removed.

descriptionHtml•
non-null

The description of the product, with HTML tags. For example, the description might include bold <strong></strong> and italic <i></i> text.

events•
non-null

The paginated list of events associated with the host subject.

featuredMedia•

The featured media associated with the product.

feedback•

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•

The theme template that's used when customers view the gift card in a store.

handle•
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•
non-null

Whether the product has only a single variant with the default option and value.

hasOutOfStockVariants•
non-null

Whether the product has variants that are out of stock.

hasVariantsThatRequiresComponents•
non-null

Whether at least one of the product variants requires bundle components.

Learn more about store eligibility for bundles.

id•
non-null

A globally-unique ID.

inCollection•
non-null

Whether the product is in a specified collection.

isGiftCard•
non-null

Whether the product is a gift card.

legacyResourceId•
non-null

The ID of the corresponding resource in the REST Admin API.

media•
non-null

The media associated with the product. Valid media are images, 3D models, videos.

mediaCount•

The total count of media that's associated with a product.

metafield•

A custom field, including its namespace and key, that's associated with a Shopify resource for the purposes of adding and storing additional information.

metafields•
non-null

A list of custom fields that a merchant associates with a Shopify resource.

onlineStorePreviewUrl•

The preview URL for the online store.

onlineStoreUrl•

The product's URL on the online store. If null, then the product isn't published to the online store sales channel.

options•
non-null

A list of product options. The limit is defined by the shop's resource limits for product options (Shop.resourceLimits.maxProductOptions).

priceRangeV2•
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.

productType•
non-null

The product type that merchants define.

publishedAt•

The date and time when the product was published to the online store.

publishedInContext•
non-null

Whether the product is published for a customer only in a specified context. For example, a product might be published for a customer only in a specific location.

publishedOnCurrentPublication•
non-null

Whether the resource is published to the app's publication. For example, the resource might be published to the app's online store channel.

publishedOnPublication•
non-null

Whether the resource is published to a specified publication.

requiresSellingPlan•
non-null

Whether the product can only be purchased with a selling plan. Products that are sold on subscription (requiresSellingPlan: true) can be updated only for online stores. If you update a product to be subscription-only (requiresSellingPlan:false), then the product is unpublished from all channels, except the online store.

resourcePublicationOnCurrentPublication•

The resource that's either published or staged to be published to the publication.

resourcePublications•
non-null

The list of resources that are published to a publication.

resourcePublicationsCount•

The number of publications that a resource is published to, without feedback errors.

resourcePublicationsV2•
non-null

The list of resources that are either published or staged to be published to a publication.

restrictedForResource•

Whether the merchant can make changes to the product when they edit the order associated with the product. For example, a merchant might be restricted from changing product details when they edit an order.

sellingPlanGroups•
non-null

A list of all selling plan groups that are associated with the product either directly, or through the product's variants.

sellingPlanGroupsCount•

A count of selling plan groups that are associated with the product.

seo•
non-null

The SEO title and description that are associated with a product.

status•
non-null

The product status, which controls visibility across all sales channels.

tags•
non-null

A comma-separated list of searchable keywords that are associated with the product. For example, a merchant might apply the sports and summer tags to products that are associated with sportwear for summer.

Updating tags overwrites any existing tags that were previously added to the product. To add new tags without overwriting existing tags, use the tagsAdd mutation.

templateSuffix•

The theme template that's used when customers view the product in a store.

title•
non-null

The name for the product that displays to customers. The title is used to construct the product's handle. For example, if a product is titled "Black Sunglasses", then the handle is black-sunglasses.

totalInventory•
non-null

The quantity of inventory that's in stock.

tracksInventory•
non-null

Whether inventory tracking has been enabled for the product.

translations•
non-null

The published translations associated with the resource.

unpublishedPublications•
non-null

The list of publications that the resource isn't published to.

updatedAt•
non-null

The date and time when the product was last modified. A product's updatedAt value can change for different reasons. For example, if an order is placed for a product that has inventory tracking set up, then the inventory adjustment is counted as an update.

variants•
non-null

A list of variants associated with the product. If querying a single product at the root, you can fetch up to 2000 variants.

variantsCount•

The number of variants that are associated with the product.

vendor•
non-null

The name of the product's vendor.

bodyHtml•

The description of the product, with HTML tags. For example, the description might include bold <strong></strong> and italic <i></i> text.

customProductType•

The custom product type specified by the merchant.

descriptionPlainSummary•
non-null

Stripped description of the product, single line with HTML tags removed. Truncated to 60 characters.

featuredImage•

The featured image for the product.

images•
non-null

The images associated with the product.

metafieldDefinitions•
non-null

List of metafield definitions.

priceRange•
non-null

The price range of the product.

productCategory•

The product category specified by the merchant.

productPublications•
non-null

A list of the channels where the product is published.

publicationCount•
non-null

The number of publications that a resource is published to, without feedback errors.

publications•
non-null

A list of the channels where the product is published.

publishedOnChannel•
non-null

Whether the resource is published to a specific channel.

publishedOnCurrentChannel•
non-null

Whether the resource is published to a channel. For example, the resource might be published to the online store channel.

sellingPlanGroupCount•
non-null

A count of selling plan groups that are associated with the product.

standardizedProductType•

The standardized product type in the Shopify product taxonomy.

storefrontId•
non-null

The Storefront GraphQL API ID of the Product.

As of the 2022-04 version release, the Storefront GraphQL API will no longer return Base64 encoded IDs to match the behavior of the Admin GraphQL API. Therefore, you can safely use the id field's value instead.

totalVariants•
non-null

The number of variants that are associated with the product.

unpublishedChannels•
non-null

The list of channels that the resource is not published to.


Was this section helpful?