Shopify Guides

Shopify Storefront API: tokens and limits

Charles

The Shopify Storefront API is the GraphQL API a custom storefront uses to read products, collections and search results, and to manage the cart before handing the customer to checkout. You can query basic data without a token, but you need an access token for features such as metafields and customers. Use the public token in a browser or mobile app, and keep the private token on your server.

Choosing between a theme and a custom storefront? Start with Shopify theme vs headless storefront. Want a prebuilt storefront that already talks to this API? See Appy Days theme pricing.

A laptop displaying a product grid beside a security key on a desk

Key facts

  • The Storefront API serves products, collections, search and the cart, and hands customers off to checkout. About headless commerce, checked 10 November 2026.
  • Tokenless access covers products, collections, selling plans, search, pages, blogs, articles and the cart, with a query complexity limit of 1,000. GraphQL Storefront API, checked 10 November 2026.
  • Product tags, metaobjects, metafields, online store menus and customers require a token. GraphQL Storefront API, checked 10 November 2026.
  • Shopify says buyer traffic has no fixed request-per-minute limit, while bots and checkout creation are limited. GraphQL Storefront API, checked 10 November 2026.

What does the Storefront API do?

It gives your own frontend access to the store's catalog and cart. Shopify's headless overview describes two headless APIs: the Storefront API for products, collections, search and the cart, and the Customer Account API, which lets customers sign in and serves their orders, addresses and profile.

You can call the Storefront API from any HTTP client, so it works with Next.js, a mobile app or a stack of your own. Shopify's getting started guide says it is framework agnostic. If you build with Hydrogen, Shopify's headless toolkit, Shopify points you to the Hydrogen docs for setup instead. See Hydrogen vs Next.js for how the two approaches differ.

To try queries before you have a store, Shopify offers mock.shop, a public Storefront API with demo data that needs neither a store nor an access token.

Do I need an access token?

Not for basic reads. Shopify's API reference says tokenless access allows queries on products and collections, selling plans, search, pages, blogs and articles, and the cart, with a query complexity limit of 1,000. A query above that limit returns an error.

You need a token for everything else Shopify lists as token-based:

  • Product tags
  • Metaobjects and metafields
  • Menus (online store navigation)
  • Customers

If your storefront shows metafield data or a navigation menu managed in Shopify, plan on using a token.

What is the difference between public and private tokens?

The difference is where the token runs. Shopify's API reference describes public access for a browser or mobile app, where the token is visible to buyers, and private access for a server, where the token stays secret.

Public tokenPrivate token
Where to use itBrowser or mobile appYour server or another private context
Request headerX-Shopify-Storefront-Access-TokenShopify-Storefront-Private-Token
Visible to buyersYesNo, treat it as a secret
Client-side variable prefixFine to exposeNever use a prefix such as NEXT_PUBLIC_

Shopify's headless overview says the private token is a secret that must never appear in client-side code or a mobile app. Its API reference recommends requesting only the scopes your app needs, to limit the damage if a token leaks. For the full pre-launch routine, see the headless storefront launch checklist.

Where do I get Storefront API tokens?

From a sales channel in your Shopify admin. Shopify's headless overview lists two:

  • Headless channel: use it when you host the storefront yourself on any stack, including mobile apps and Hydrogen storefronts deployed somewhere other than Oxygen. Installing the channel and clicking Create storefront generates a public and a private token. You can create more storefronts, each with its own tokens, but all storefronts in the channel share the same API permissions.
  • Hydrogen channel: use it when you build with Hydrogen and deploy to Oxygen, Shopify's hosting for Hydrogen storefronts. Shopify adds the environment variables your app needs, including PRIVATE_STOREFRONT_API_TOKEN, when you create a storefront.

Shopify's getting started guide lists the requirements: the staff role on the store, plus Apps and channels permissions. It also notes a maximum of 100 active storefronts and access tokens per shop. The API reference names other ways to get a private token, such as a delegate access token for a custom app.

How do I rotate a token?

In the Headless channel, open the storefront, choose Manage under API access, and generate a new token. Shopify says both the old and new credentials are valid until you delete the old ones, so you can update your apps first and then revoke the old token. Rotate right away if a private token is exposed.

What are the Storefront API rate limits?

Shopify's rate limits for the Storefront API scale with buyer traffic, so requests from real buyers have no fixed request-per-minute limit. The limits that do exist are:

  • Bots and crawlers: limited, most strictly when unsigned. Shopify offers Web Bot Auth signing for higher limits.
  • Checkout creation: throttled per minute. When you exceed it, the API returns a 200 Throttled error, and Shopify recommends a retry design such as a request queue with exponential backoff.
  • Tokenless queries: a query complexity limit of 1,000.
  • Suspicious requests: answered with a 430 Shopify Security Rejection error.

Server-rendered storefronts need one extra detail. For server requests made with a private access token that result from buyer traffic, Shopify says to also send the buyer's IP address in the Shopify-Storefront-Buyer-IP header. Shopify uses it for IP-level bot and platform protection and to manage traffic from a high-volume user. Without it, requests may be throttled, bot protection may be limited and checkout flows may be unauthenticated. Requests not tied to buyer traffic, such as a static site build, do not need this header. This guidance concerns private-token server requests; it does not say every public-token request needs the header. Shopify Storefront API reference, checked 21 November 2026.

Which API version does my storefront use?

The version you put in the request URL. Shopify says the Storefront API is versioned and tells you to specify a supported version in the URL to keep your app stable. That makes the version a maintenance item: someone has to move the storefront to a newer supported version over time, and test products, cart and checkout when they do.

How does this affect an Appy Days storefront?

An Appy Days storefront in headless-shopify mode reads two Storefront API settings from environment variables: SHOPIFY_STORE_DOMAIN and SHOPIFY_STOREFRONT_ACCESS_TOKEN. Both are required for a production headless-Shopify deployment, and the storefront builds its endpoint with a single API-version constant in the product code. Standalone mode does not use the Shopify Storefront API provider.

In the current storefront code, that token is sent with the public X-Shopify-Storefront-Access-Token header. The storefront does not add the Shopify-Storefront-Buyer-IP header on those requests. Checked in the storefront platform source on 10 November 2026. Checkout itself stays on Shopify, which is covered in headless Shopify checkout customization.

What should I ask before buying a Shopify storefront template?

Ask for the answers in writing, because they decide who carries the security and upkeep work:

  1. Which token does it use, and where does it run? A private token belongs on the server only. If the template exposes a token to the browser, confirm it is the public one.
  2. Does it send the buyer IP header on server requests made with a private access token for buyer traffic? Shopify recommends this header for those requests to support IP-level bot and platform protection and traffic management. Static-build requests and other requests unrelated to buyer traffic do not need it. This advice does not apply to every public-token request. Shopify Storefront API reference.
  3. Which API version is it pinned to, and who upgrades it?
  4. Which permissions does it request? Request only the scopes the storefront needs.
  5. How do you rotate a token? Check that the old token can stay valid until the new one is deployed.
  6. What happens when checkout creation is throttled? Look for a retry or a clear error message for the customer.

If you want a storefront where the commerce wiring is already built, compare the options on Appy Days themes and the theme pricing page. For questions about how our storefronts connect to Shopify, see the FAQ.

Shopify's Storefront API reference, checked 10 November 2026, does not list a fee for calling the API, and it does not say the API is free. Where that page says price, it means a product's price in a query. Confirm what your Shopify plan includes before you budget.

Frequently asked questions

Do I need an access token to use the Shopify Storefront API?

Not for basic reads. Shopify allows tokenless queries for products, collections, search and the cart, with a query complexity limit of 1,000. Product tags, metafields, metaobjects, menus and customers need an access token.

What is the difference between a public and a private Storefront API token?

A public token is for browsers and mobile apps, where buyers can see it, and is sent in the X-Shopify-Storefront-Access-Token header. A private token is for your server and must stay secret. It is sent in the Shopify-Storefront-Private-Token header and should never use a browser prefix such as NEXT_PUBLIC_.

Where do I get a Storefront API token?

Install Shopify's Headless channel and create a storefront to get a public and a private token. If you build with Hydrogen and deploy to Oxygen, the Hydrogen channel adds the environment variables for you.

Does the Shopify Storefront API have rate limits?

Yes, but not a fixed limit on buyer traffic. Shopify limits bots and crawlers, throttles checkout creation per minute with a 200 Throttled error, and caps tokenless query complexity at 1,000. For server requests made with a private access token that result from buyer traffic, Shopify recommends the buyer IP header. Requests unrelated to buyer traffic, such as static site builds, do not need it; this guidance does not apply to every public-token request.

Shopify Storefront API reference.