---
title: ProductSortKeys - Storefront API
description: >-
  Sorting options for the

  [`products`](/docs/api/storefront/2026-10/queries/products)

  query. Supports sorting products by criteria such as best-selling and price,
  and

  by product attributes such as type, and vendor. 


  > Note: Use the
  [`RELEVANCE`](/docs/api/storefront/2026-10/enums/ProductSortKeys#enums-RELEVANCE)

  key only when a search query is specified.
api_version: 2026-10
source_url:
  html: 'https://shopify.dev/docs/api/storefront/latest/enums/ProductSortKeys'
  md: 'https://shopify.dev/docs/api/storefront/latest/enums/ProductSortKeys.md'
api_name: storefront
api_type: graphql
type: enum
---

# Product​Sort​Keys

enum

Sorting options for the [`products`](https://shopify.dev/docs/api/storefront/2026-10/queries/products) query. Supports sorting products by criteria such as best-selling and price, and by product attributes such as type, and vendor.

***

**Note:** Use the \<a href="/docs/api/storefront/2026-10/enums/ProductSortKeys#enums-RELEVANCE">\<code>RELEVANCE\</code>\</a> key only when a search query is specified.

***

## Valid values

* BEST\_​SELLING

  Sort by the `best_selling` value.

* CREATED\_​AT

  Sort by the `created_at` value.

* ID

  Sort by the `id` value.

* PRICE

  Sort by the `price` value.

* PRODUCT\_​TYPE

  Sort by the `product_type` value.

* RELEVANCE

  Sort by relevance to the search terms when the `query` parameter is specified on the connection. Don't use this sort key when no search query is specified.

* TITLE

  Sort by the `title` value.

* UPDATED\_​AT

  Sort by the `updated_at` value.

* VENDOR

  Sort by the `vendor` value.

***

## Fields

* [Query​Root.products(sortKey)](https://shopify.dev/docs/api/storefront/latest/objects/QueryRoot#field-QueryRoot.fields.products.arguments.sortKey)

  ARGUMENT

  The entry point for all Storefront API queries. Provides access to shop resources including products, collections, carts, and customer data, as well as content like articles and pages. This query acts as the public, top-level type from which all queries must start.

  Use individual queries like [`product`](https://shopify.dev/docs/api/storefront/current/queries/product) or [`collection`](https://shopify.dev/docs/api/storefront/current/queries/collection) to fetch specific resources by ID or handle. Use plural queries like [`products`](https://shopify.dev/docs/api/storefront/current/queries/products) or [`collections`](https://shopify.dev/docs/api/storefront/current/queries/collections) to retrieve paginated lists with optional filtering and sorting. The [`search`](https://shopify.dev/docs/api/storefront/current/queries/search) and [`predictiveSearch`](https://shopify.dev/docs/api/storefront/current/queries/predictiveSearch) queries enable storefront search functionality.

  Explore queries interactively with the [GraphiQL explorer and sample query kit](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/api-exploration).

* [products.sortKey](https://shopify.dev/docs/api/storefront/latest/queries/products#arguments-sortKey)

  ARGUMENT

***

## Map

### Arguments with this enum

* [Query​Root.products(sortKey)](https://shopify.dev/docs/api/storefront/latest/objects/QueryRoot#field-QueryRoot.fields.products.arguments.sortKey)
* [products.sortKey](https://shopify.dev/docs/api/storefront/latest/queries/products#arguments-sortKey)
