Get Product by "SKU" using Storefront API

Topic summary

A developer is attempting to retrieve product information by SKU using JavaScript and the Storefront API but cannot find a method to do so.

Key Points:

  • The original poster lacks backend infrastructure and is exploring whether the Admin API can be used on the frontend as an alternative
  • One user suggests using a GraphQL query with a query filter parameter (e.g., "filter": "sku:1111111111"), providing a code snippet that queries products by SKU
  • Another participant disputes this solution, stating that querying by SKU only works with the Admin API, not the Storefront API

Current Status:
The discussion remains unresolved with conflicting information about whether SKU-based queries are supported in the Storefront API. The feasibility of the proposed solution is questioned.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.
query($filter: String!) {
    products(first: 1, query: $filter) {
        edges {
            node {
                id
                title
                handle
            }
        }
    }
}​
{
    "filter": "sku:1111111111"
}​