Shopify is the most popular ecommerce platform. With Shopify’s API, you can get analytics, customers, billing, inventory, orders, and other types of data sent from your Shopify account to your Google Sheet.
In this tutorial, I’ll show you step-by-step how to connect the Shopify API to Google Sheets in 5 steps:
Apipheny is an API connector for Google Sheets. You can use Apipheny to connect your Google Sheets to unlimited API data sources, make unlimited API requests, and more. There is a 30 day free trial included.
1.) Install Apipheny by opening the following link on desktop and then clicking the Install button in the Google Marketplace: https://apipheny.io/install
2.) After you’ve installed Apipheny, open a Google Sheet and then click on the Extensions dropdown in the menu at the top.
In the dropdown list you should see Apipheny. Click Apipheny then click Import API to open the Apipheny sidebar in your Google Sheet.
Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new
1. Next, log in to your Shopify account and click on Stores in the menu on the left:
2. Click the Add store button:
3. Choose the Development store type and complete the Store name field:
4. Scroll down and complete the store address, choose the store purpose and then click the Save button:
5. Your Shopify development store is now created:
1. From your Shopify admin dashboard, go to Apps and then click Manage private apps:
2. Click the Create a new private app button:
3. Enter a name for your Private app, something descriptive so you can remember the purpose of the app:
4. Scroll down to the Storefront API section and check the Allow the app to access your storefront data using Storefront API checkbox. Choose any permissions you want, and then click the Save button:
5. In the Create a new private app screen that pops up, click I understand, create the app button:
6. Your private app has now been created:
7. Next, scroll down until you see the Admin API section and there you’ll find your Admin API Password, along with your API key, Shared Secret, and the Storefront access token:
Make sure to copy your Password and keep it somewhere safe, because you’ll need it to make your request in step 5.
In this section, we’ll show you how to browse the Shopify API documentation to find the exact API URL that you can use to retrieve specific data from your Shopify account.
If you already know your API URL, or you want to use the same example URL as us, just skip to Step 5.
First, open the Shopify API documentation page: https://shopify.dev/docs/admin-api/rest/reference
The menu on the left contains a list of the available API classes, each with its own APIs:
Clicking on an API class scrolls to that section, revealing a list of associated APIs within that API class.
Each API within an API class contains a list of one or more endpoints.
For instance, the Orders API class links to a list of 6 APIs within that class.
One of the APIs within that class is the Order API, which links to a list of it’s 9 available endpoints: Retrieve a list of orders, Retrieve a specific order, Delete an order, etc.
An example endpoint is Retrieve a list of orders, which gets a list of all orders. The URL for this endpoint is:
https://store_name.myshopify.com/admin/api/admin/api/2022-01/orders.json?status=any
If you use this url, don’t forget to replace store_name with the name of your store.
The documentation for each endpoint contains a short description, the HTTP method used (eg. GET), a description of the available parameters, the cURL command, an example response and the link you should append to the root API URL for querying this endpoint (eg. /admin/api/2022-01/orders.json?status=any).
For endpoints that accept parameters, this documentation is where you would find them listed and explained, along with example inputs and responses:
https://store_name.myshopify.com/admin/api/
All API calls to Shopify should be made with the https://store_name.myshopify.com/admin/api/ base domain.
We’re almost done. Now go back to your Google Sheet and make sure that the Apipheny add-on is open on the “Import” tab. With the Import tab open, enter these details into the add-on:
Method: At the top of the Apipheny sidebar, select the HTTP method (GET or POST) required by your API endpoint. For this example, we are using the GET method.
API URL: In Step 4, we explained how you can find the Shopify REST API endpoint that you need. Now copy your complete Shopify API URL into the API URL Path field in the Apipheny add-on, followed by any GET parameters required for your query (if applicable).
For this example, we are using the Shop API endpoint, to get data on the shop’s configuration:
https://store_name.myshopify.com/admin/api/2022-01/shop.json
If you want to use this same example API URL, just replace store_name with your store name.
Headers: In the Headers section in Apipheny, add one row with the following key and value:
Key: X-Shopify-Access-Token Value: Your_Admin_API_Password
Your_Admin_API_Password is your private app’s Admin API password that you copied previously, in Step 3.7.
Here’s what it should look like if you’ve entered everything correctly in Apipheny:
After you’ve entered these details, just click the Run button in Apipheny to import the data.
Another example is Retrieve a list of locations endpoint, which retrieves a list of locations:
https://store_name.myshopify.com/admin/api/2022-01/locations.json
The steps are the same as the previous endpoint example. Just replace store_name with your store name and in the Headers section of Apipheny, add one row with the following key and value:
Key: X-Shopify-Access-Token Value: Your_Admin_API_Password
After you’ve entered these details, just click the Run button in Apipheny to import the data.
This is the endpoint that allows you to “Retrieve a specific order”:
https://store_name.myshopify.com/admin/api/2022-01/order_id.json?status=any
If you try this endpoint, don’t forget to replace order_id and store_name with real values. Also don’t forget to use the same headers as the previous examples.
That’s it! You’ve learned how to use the Shopify API and connect it to your Google Sheets using Apipheny.
After making a successful request, try using the other endpoints from the Shopify API documentation or try using the other features of the Apipheny add-on.
Make a GET request
Make a POST request
PUT, PATCH, & DELETE Requests
Save requests for later
Schedule requests for automatic updates
Reference cell values in requests
=APIPHENY custom function
Stack multiple URLs in a single request
Run all saved requests at once
Modify your request settings
Import & export saved API settings
Ahrefs API
Airtable API
Alpha Vantage API
Asana API
Binance API
Clickup API
Coingecko API
Coinmarketcap API
Coinbase API
Constant Contact API
Discord API
Drift API
Etsy API
Eventbrite API
Facebook Graph API
Facebook Ads API
Figma API
Github API
Google SERP API
Hubspot API
Hunter API
What is an API?
What is an API URL?
What are parameters?
What is an endpoint?
What is an API key/token?
What is basic authentication?
What are headers?
What is a GET request?
What is a POST request?