May 9, 2022
Shopify has a Storefront API that lets you get public information about your store, but it requires authentication and is a somewhat-involved GraphQL API.
Instead, thereās an alternative (āhiddenā) API: all you have to do is to add .json
to the end of a URL!
Imagine that your Shopify site is at example.com
. You could get JSON data about your products in your store via this URL:
example.com/products.json
Or you could get data about your storeās collections via this URL:
example.com/collections.json
You can even get data for a specific collection or specific product:
example.com/collections/:collection_id.json
example.com/products/:product_id.json
Most pages that you can navigate to on your Shopify site can be extracted as API data by adding .json
to the end of the URL.
This can be super useful if youāre building a āheadlessā Shopify site and want a simple API to get data from your site without needing to use authentication tokens or a GraphQL API.
Tufts Meal Plan Wrapped
Mar 2, 2024
Building an e-ink picture frame that displays an iCloud photo album
Jan 9, 2024
2023 in review
Jan 5, 2024
Subscribe to my newsletter for a monthly round-up of new blog posts and projects Iām working on!