Skip to main content
query

Retrieves a list of products in a store. Products are the items that merchants can sell in their store.

Use the products query when you need to:

  • Build a browsing interface for a product catalog.
  • Create product searching, sorting, and filtering experiences.
  • Implement product recommendations.
  • Sync product data with external systems.

The products query supports pagination to handle large product catalogs and saved searches for frequently used product queries.

The products query returns products with their associated metadata, including:

  • Basic product information (for example, title, description, vendor, and type)
  • Product options and product variants, with their prices and inventory
  • Media attachments (for example, images and videos)
  • SEO metadata
  • Product categories and tags
  • Product availability and publishing statuses

Learn more about working with Shopify's product model.

Anchor to Arguments

ProductConnection arguments

•ProductConnection!
•String

The elements that come after the specified cursor.

•String

The elements that come before the specified cursor.

•Int

The first n elements from the paginated list.

•Int

The last n elements from the paginated list.

•String

A filter made up of terms, connectives, modifiers, and comparators.

nametypedescriptionacceptable_valuesdefault_valueexample_use
defaultstringFilter by a case-insensitive search of multiple fields
in a document.- query=Bob Norman
- query=title:green hoodie
barcodestringFilter by the product variant barcode
field.- barcode:ABC-abc-1234
bundlesbooleanFilter 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.- bundles:true
category_idstringFilter by the product category ID
(product.category.id). A product category is the category of a product
from Shopify's Standard Product Taxonomy.
- category_id:sg-4-17-2-17
collection_ididFilter by the collection id
field.- collection_id:108179161409
combined_listing_rolestringFilter by the role of the product in a combined listing.
- parent
- child
- no_role
-
combined_listing_role:parent
created_attimeFilter by the date and time when the product was
created.- created_at:>'2020-10-21T23:39:20Z'
-
created_at:<now
- created_at:<='2024'
delivery_profile_ididFilter by the delivery profile id
field.- delivery_profile_id:108179161409
error_feedbackstringFilter by products with publishing errors.
gift_cardbooleanFilter by the product isGiftCard
field.- gift_card:true
handlestringFilter by a comma-separated list of product handles.
- handle:the-minimal-snowboard
has_only_compositesbooleanFilter by products that have only
composite variants.- has_only_composites:true
has_only_default_variantbooleanFilter by products that have only a
default variant. A default variant is the only variant if no other variants
are specified.- has_only_default_variant:true
has_variant_with_componentsbooleanFilter by products that have
variants with associated components.-
has_variant_with_components:true
ididFilter by id range.- id:1234
- id:>=1234
- id:<=1234
inventory_totalintegerFilter by inventory count.-
inventory_total:0
- inventory_total:>150
-
inventory_total:>=200
is_price_reducedbooleanFilter by products that have a reduced price.
For more information, refer to the CollectionRule
object.- is_price_reduced:true
metafields.{namespace}.{key}mixedFilters resources by metafield
value. Format: metafields.{namespace}.{key}:{value}. Learn more about
querying by metafield value.
- metafields.custom.on_sale:true
-
metafields.product.material:"gid://shopify/Metaobject/43458085"
out_of_stock_somewherebooleanFilter by products that are out of
stock in at least one location.- out_of_stock_somewhere:true
pricebigdecimalFilter by the product variant price
field.- price:100.57
product_configuration_ownerstringFilter by the app
id
field.- product_configuration_owner:10001
product_publication_statusstringFilter 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
(Channel.app.id) and one of the valid values. For simple visibility checks, use published_status
instead.- * {channel_app_id}-approved
- `*
{channel_app_id}-rejected<br/> - * {channel_app_id}-needs_action`
-
* {channel_app_id}-awaiting_review
- `*
{channel_app_id}-published<br/> - * {channel_app_id}-demoted<br/> - *
{channel_app_id}-scheduled<br/> - *
{channel_app_id}-provisionally_published`-
product_publication_status:189769876-approved
product_typestringFilter by a comma-separated list of [product
types](https://help.shopify.com/manual/products/details/product-type).
  • product_type:snowboard | | publication_ids | string | Filter by a comma-separated list of publication IDs that are associated with the product. | | | - publication_ids:184111530305,184111694145 | | publishable_status | string | Deprecated: This parameter is deprecated as of 2025-12 and will be removed in a future API version. Use published_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 (Channel.app.id) and one of the valid status values. | - * {channel_app_id}-unset
    - * {channel_app_id}-pending
    - * {channel_app_id}-approved
    - * {channel_app_id}-not_approved | | - publishable_status:580111-unset
    - publishable_status:580111-pending | | published_at | time | Filter by the date and time when the product was published to the online store and other sales channels. | | | - published_at:>2020-10-21T23:39:20Z
    - published_at:<now
    - published_at:<=2024 | | published_status | 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 a channel ID, channel handle, channel app ID (Channel.app.id), or app handle with suffixes: - {id_or_handle}-published: Returns resources published to the specified channel. - {id_or_handle}-visible: Same as {id_or_handle}-published (kept for backwards compatibility). - {id_or_handle}-intended: Returns resources added to the channel but not yet published. - {id_or_handle}-hidden: Returns resources not added to the channel or not published. Other: - unavailable: Returns resources not published to any channel. | - online_store_channel
    - published
    - visible
  • unpublished
    - * {channel_id_or_handle}-published
    - * {channel_id_or_handle}-visible
    - * {channel_id_or_handle}-intended
    - * {channel_id_or_handle}-hidden
    - * {channel_app_id_or_handle}-published
    - * {channel_app_id_or_handle}-visible
    - * {channel_app_id_or_handle}-intended
    - * {channel_app_id_or_handle}-hidden
    - unavailable | | - published_status:online_store_channel
    - published_status:published
    - published_status:580111-published
  • published_status:580111-hidden
    - published_status:my-channel-handle-published
    - published_status:unavailable | | sku | string | Filter by the product variant sku field. Learn more about SKUs. | | | - sku:XYZ-12345 | | status | string | Filter by a comma-separated list of statuses. You can use statuses to manage inventory. Shopify only displays products with an ACTIVE status in online stores, sales channels, and apps. | - active
    - archived
    - draft | active | - status:active,draft | | tag | string | Filter objects by the tag field. | | | - tag:my_tag | | tag_not | string | Filter by objects that don’t have the specified tag. | | | - tag_not:my_tag | | title | string | Filter by the product title field. | | | - title:The Minimal Snowboard | | tracks_inventory | boolean | Filter by products that have inventory tracking enabled. | | | - tracks_inventory:true | | updated_at | time | Filter by the date and time when the product was last updated. | | | - updated_at:>'2020-10-21T23:39:20Z'
    - updated_at:<now
    - updated_at:<='2024' | | variant_id | id | Filter by the product variant id field. | | | - variant_id:45779434701121 | | variant_title | string | Filter by the product variant title field. | | | - variant_title:'Special ski wax' | | vendor | string | Filter by the origin or source of the product. Learn more about vendors and managing vendor information. | | | - vendor:Snowdevil
    - vendor:Snowdevil OR vendor:Icedevil | You can apply one or more filters to a query. Learn more about Shopify API search syntax.
•Boolean
Default:false

Reverse the order of the underlying list.

•ID

The ID of a saved search. The search’s query string is used as the query argument.

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


Was this section helpful?

•[ProductEdge!]!
non-null

The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node.

•[Product!]!
non-null

A list of nodes that are contained in ProductEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve.

•PageInfo!
non-null

An object that’s used to retrieve cursor information about the current page.


Was this section helpful?