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-Currencyheader — 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
| Argument | Type | Description |
|---|---|---|
first | Int | The number of products to return per page (max: 250). Used for forward pagination. |
after | String | The cursor of the product to start after. Used with first for pagination. |
last | Int | The number of products to return in reverse (max: 250). Used for backward pagination. |
before | String | The cursor to start before. Used with last for reverse pagination. |
sortKey | ProductSortKeys | Field to sort by: TITLE, PRICE, CREATED_AT, UPDATED_AT. Default: TITLE |
reverse | Boolean | Reverse the sort order. Default: false |
query | String | Search query string for filtering products. Supports advanced search syntax. |
filter | String | JSON string for filtering by type, category, attributes, or price. See examples below. |
Possible Returns
| Field | Type | Description |
|---|---|---|
edges | [ProductEdge!]! | Array of edges containing products and cursors. Each edge represents a connection between nodes. |
edges.node | Product! | The actual product object containing id, name, sku, price, and other product fields. |
edges.cursor | String! | Pagination cursor for this product. Use with after or before arguments. |
nodes | [Product!]! | Flattened array of products without edge information. |
pageInfo | PageInfo! | Pagination metadata object. |
pageInfo.hasNextPage | Boolean! | Whether there are more products after the current page. |
pageInfo.hasPreviousPage | Boolean! | Whether there are products before the current page. |
pageInfo.startCursor | String | Cursor of the first product on the current page. |
pageInfo.endCursor | String | Cursor of the last product on the current page. |
totalCount | Int! | Total number of products matching the query criteria. |
Price Fields
| Field | Type | Description |
|---|---|---|
price | Float | Base catalog price. Returns the converted numeric value based on the active currency set via X-Currency header. |
formattedPrice | String | Same as price but returned as a string with the currency symbol prefixed (e.g. "€84.99"). |
specialPrice | Float | Discounted price if a special price is set, otherwise null. Reflects currency conversion. |
formattedSpecialPrice | String | Same as specialPrice but with the currency symbol prefixed. |
minimumPrice | Float | The lowest effective price — accounts for special price and configurable variant pricing. Used for price sorting. Reflects currency conversion. |
formattedMinimumPrice | String | Same as minimumPrice but with the currency symbol prefixed. |
maximumPrice | Float | The highest effective price across all variants or configurations. Reflects currency conversion. |
formattedMaximumPrice | String | Same as maximumPrice but with the currency symbol prefixed. |
regularMinimumPrice | Float | The regular (non-discounted) minimum price before any special price is applied. Reflects currency conversion. |
formattedRegularMinimumPrice | String | Same as regularMinimumPrice but with the currency symbol prefixed. |
regularMaximumPrice | Float | The regular (non-discounted) maximum price before any special price is applied. Reflects currency conversion. |
formattedRegularMaximumPrice | String | Same 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 theX-Currencyheader.
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.
| Type | Filter Value | Key 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\"}" | groupedProducts → associatedProduct |
| Downloadable | "{\"type\": \"downloadable\"}" | downloadableLinks, downloadableSamples |
| Bundle | "{\"type\": \"bundle\"}" | bundleOptions → bundleOptionProducts → product |

