Getting started with the Storefront API

Learn the basics of working with the Storefront API, including setting up an account, making requests, and retrieving data.

Written By Anuj Rajput ()

Updated at April 6th, 2023

The Storefront API is a GraphQL API that requires an access token associated with a specific Shopify store. You can call the API from any HTTP client. You can have a maximum of 100 active storefronts and access tokens per shop. 


Here you'll be doing the following tasks :

  • Create a Headless channel in your Shopify admin
  • Generate Storefront API access tokens
  • Manage storefront permissions


Requirements : 

  • You have the staff role on the Shopify store that you're working with.
  • You have Apps and channels permissions on the Shopify store that you're working with.



Step 1: Enable Storefront API access :

Anchor link to section titled "Step 1: Enable Storefront API accessInstall the Headless channel from the Shopify App Store. On installation, you're provided public and private access tokens that enable public and authenticated access to the Storefront API.


(Optional) Create another storefront:

  • From your Shopify admin, under Sales channels, click Headless.
  • Click Create storefront.


Step 2: Manage permissions :

Managing permissions controls what your custom storefront can display from your Shopify store.

  1. From your Shopify admin, select the Headless sales channel.
  2. From the list, select the storefront.
  3. Beside Storefront API permissions, click Edit.
  4. Select the permissions for the storefront.
  5. Click Save.


Step 3: Make queries :

After you've selected the Storefront API permissions for your custom storefront and have Storefront API access tokens, you can make queries using the Storefront API.

Shopify provides the following resources for learning how to make GraphQL queries to Shopify's Storefront API:

Anchor link to section titled "(Optional) Create another storefront"