Shopify capability
Find product variants in Shopify
Use productVariants in the GraphQL Admin API to search by SKU, barcode, or other variant attributes. Open the product in Shopify admin when you need to inspect a variant by hand.
Documentation reviewed
Ways to do it
API
GraphQL Admin API productVariants query
Filter variants and select fields such as ID, title, and SKU. Page through the results using the connection cursor.
- Requirements
- An app access token with the read_products scope for the store.
- Limitations
- Results are paginated. A single page can miss variants that match the same filter.
Example
query {
productVariants(first: 10, query: "sku:EXAMPLE-SKU") {
nodes { id title sku }
pageInfo { hasNextPage endCursor }
}
}Interface
Shopify admin → Products → Variants
Open a product and select a variant to see its details.
- Requirements
- Access to Products in the store’s admin and the parent product.
- Limitations
- This route starts from a product and is suited to inspecting its variants one at a time.