Skip to content

Get Products

About

The getProducts query retrieves a paginated list of products from your store with support for advanced sorting and filtering. This query is essential for:

  • Building product catalog browsing interfaces
  • Implementing product search, sorting, and filtering experiences
  • Creating product recommendation systems
  • Syncing product data with external systems

The query supports cursor-based pagination to efficiently handle large product catalogs and includes metadata for:

  • Basic product information (name, SKU, description, vendor)
  • Pricing and inventory details
  • Product images and media
  • Categories, tags, and custom attributes
  • Publication and availability status
  • Created and updated timestamps

Currency & Formatted Prices: All price fields reflect the active currency set via the X-Currency header — both numeric fields (e.g. price, specialPrice, minimumPrice) and formatted fields (e.g. formattedPrice, formattedMinimumPrice) return converted values. The difference is that numeric fields return the converted amount as a number, while formatted fields return the converted amount as a string with the currency symbol prefixed (e.g. "€84.99"). See the "Get Products with Currency Formatted Prices" dropdown example above for all available price fields.

Arguments

ArgumentTypeDescription
firstIntThe number of products to return per page (max: 250). Used for forward pagination.
afterStringThe cursor of the product to start after. Used with first for pagination.
lastIntThe number of products to return in reverse (max: 250). Used for backward pagination.
beforeStringThe cursor to start before. Used with last for reverse pagination.
sortKeyProductSortKeysField to sort by: TITLE, PRICE, CREATED_AT, UPDATED_AT. Default: TITLE
reverseBooleanReverse the sort order. Default: false
queryStringSearch query string for filtering products. Supports advanced search syntax.
filterStringJSON string for filtering by type, category, attributes, or price. See examples below.

Possible Returns

FieldTypeDescription
edges[ProductEdge!]!Array of edges containing products and cursors. Each edge represents a connection between nodes.
edges.nodeProduct!The actual product object containing id, name, sku, price, and other product fields.
edges.cursorString!Pagination cursor for this product. Use with after or before arguments.
nodes[Product!]!Flattened array of products without edge information.
pageInfoPageInfo!Pagination metadata object.
pageInfo.hasNextPageBoolean!Whether there are more products after the current page.
pageInfo.hasPreviousPageBoolean!Whether there are products before the current page.
pageInfo.startCursorStringCursor of the first product on the current page.
pageInfo.endCursorStringCursor of the last product on the current page.
totalCountInt!Total number of products matching the query criteria.

Price Fields

FieldTypeDescription
priceFloatBase catalog price. Returns the converted numeric value based on the active currency set via X-Currency header.
formattedPriceStringSame as price but returned as a string with the currency symbol prefixed (e.g. "€84.99").
specialPriceFloatDiscounted price if a special price is set, otherwise null. Reflects currency conversion.
formattedSpecialPriceStringSame as specialPrice but with the currency symbol prefixed.
minimumPriceFloatThe lowest effective price — accounts for special price and configurable variant pricing. Used for price sorting. Reflects currency conversion.
formattedMinimumPriceStringSame as minimumPrice but with the currency symbol prefixed.
maximumPriceFloatThe highest effective price across all variants or configurations. Reflects currency conversion.
formattedMaximumPriceStringSame as maximumPrice but with the currency symbol prefixed.
regularMinimumPriceFloatThe regular (non-discounted) minimum price before any special price is applied. Reflects currency conversion.
formattedRegularMinimumPriceStringSame as regularMinimumPrice but with the currency symbol prefixed.
regularMaximumPriceFloatThe regular (non-discounted) maximum price before any special price is applied. Reflects currency conversion.
formattedRegularMaximumPriceStringSame as regularMaximumPrice but with the currency symbol prefixed.

The difference between numeric and formatted price fields is purely presentational: numeric fields (e.g. price) return the converted amount as a number, while formatted fields (e.g. formattedPrice) return the same converted amount as a string with the currency symbol (e.g. "€84.99"). Both reflect the active currency set via the X-Currency header.

Product Types

Use the filter argument with "type" to fetch products of a specific kind. The filter value must be a single-line JSON string with escaped quotes.

TypeFilter ValueKey Fields
Simple"{\"type\": \"simple\"}"price, specialPrice, images, attributeValues
Configurable"{\"type\": \"configurable\"}"variants, combinations, superAttributeOptions
Booking"{\"type\": \"booking\"}"bookingProducts (type, qty, location, availability)
Virtual"{\"type\": \"virtual\"}"price, specialPrice, attributeValues
Grouped"{\"type\": \"grouped\"}"groupedProductsassociatedProduct
Downloadable"{\"type\": \"downloadable\"}"downloadableLinks, downloadableSamples
Bundle"{\"type\": \"bundle\"}"bundleOptionsbundleOptionProductsproduct

Released under the MIT License.