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

