Home / Shopify / What is the Storefront API reference by Shopify?

The Storefront API by Shopify is a GraphQL API and supports customer experiences. Developers can create custom storefronts on independent devices. You can use the Storefront API to build commerce with APIs such as mobile apps, headless web experiences, the Internet of Things (IoT), and voice commerce.  

Shopify is one of the world’s largest API-first-Commerce providers, and with this feature-rich API, unique experiences are guaranteed. This learning kit will help you become familiar with the Storefront API and act as a developer tool to speed up your build.  

It walks you through your first request and provides advice and best practices on the commerce features you need to create a custom storefront. 

Key features of the Storefront API

Rate Limit: The Storefront API is rate-limited by a Buyer IP, making it easy to scale and process large numbers of customer requests.  

ID: Unlike the Admin API, all resource IDs in the Storefront API are base64 encoded. So, the ID doesn’t look like gid: // Shopify / Collection / 1, but it looks like Z2lkOi8vc2hvcGlmeS9Db2xsZWN0aW9uLzE =. 

Querying data using the Storefront API

The Storefront API allows you to create custom storefronts in any language and technology. It provides GraphQL unauthenticated access to products, collections, customers, carts, checkouts, and other store resources you can use to build your custom shopping experience. 

Why use the Storefront API via theme?

Good question! Limiting your online store’s sales channels isn’t an issue for most merchants, but if you want a more customized setup, you’ll need to set up your store outside Shopify’s servers.  

With the Storefront API, you can access the data usually displayed in Shopify themes and use it however you want. The usage of this data is virtually endless, but this article will focus on creating your custom storefront using the Storefront API. 

How the Storefront API works

Before getting into the steps, it’s important to give a brief overview of how the Storefront API works.  

Remember, the Storefront API is only accessible via GraphQL. If you’ve used the API in the past, you’ve probably already used the REST protocol once or twice. With REST, you can get a specific record by simply sending a GET request to a specific endpoint (URL).  

Alternatively, if you want to work with the data on the server-side, use POST requests. However, in GraphQL, all requests sent to the API are POST requests. The reason is, GraphQL sends a “query” to a single endpoint which determines returned data and not a specific endpoint.  

It may sound a little tricky, but once you get used to GraphQL, you’ll find that it makes sense to have a single endpoint and have complete control over the data returned by each request. For example, imagine, you want to get only the name of a shop.  

If the Storefront API is a REST API, you need to request the entire shop object (with 9 properties), not just the one property shop. name. We strongly recommend you visit the Storefront API Getting Started page to see the samples. 

If you want to build your own web shop or have questions relating to e-commerce development platforms or apps, read our blog posts for Shopify and Shopware. Our dedicated outsourcing team can be your collaborator in e-commerce. 

Arrange a free consultation now!