---
title: ProductVariantSortKeys - Storefront API
description: The set of valid sort keys for the ProductVariant query.
api_version: 2026-04
source_url:
  html: https://shopify.dev/docs/api/storefront/latest/enums/productvariantsortkeys
  md: https://shopify.dev/docs/api/storefront/latest/enums/productvariantsortkeys.md
---

# Product​Variant​Sort​Keys

enum

The set of valid sort keys for the ProductVariant query.

## Valid values

* ID

  Sort by the `id` value.

* POSITION

  Sort by the `position` 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.

* SKU

  Sort by the `sku` value.

* TITLE

  Sort by the `title` value.

***

## Fields

* [Product.variants(sortKey)](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-Product.fields.variants.arguments.sortKey)

  ARGUMENT

  Represents an item listed in a shop's catalog.

  Products support multiple [product variants](https://shopify.dev/docs/api/storefront/current/objects/ProductVariant), representing different versions of the same product, and can include various [media](https://shopify.dev/docs/api/storefront/current/interfaces/Media) types. Use the [`selectedOrFirstAvailableVariant`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.selectedOrFirstAvailableVariant) or [`variantBySelectedOptions`](https://shopify.dev/docs/api/storefront/current/objects/Product#field-Product.fields.variantBySelectedOptions) fields to help customers find the right variant based on their selections.

  Products can be organized into [collections](https://shopify.dev/docs/api/storefront/current/objects/Collection), associated with [selling plans](https://shopify.dev/docs/api/storefront/current/objects/SellingPlanGroup) for subscriptions, and extended with custom data through [metafields](https://shopify.dev/docs/api/storefront/current/objects/Metafield).

  Learn more about working with [products and collections](https://shopify.dev/docs/storefronts/headless/building-with-the-storefront-api/products-collections).

***

## Map

### Arguments with this enum

* [Product.variants(sortKey)](https://shopify.dev/docs/api/storefront/latest/objects/Product#field-Product.fields.variants.arguments.sortKey)