How to connect the Squarespace API to Google Sheets

Squarespace is one of the most popular website builders in the world.

In this tutorial, I’ll show you how to connect the Squarespace API to Google Sheets in 5 steps:

  1. Install the Apipheny Add-on
  2. Generate a Squarespace API key
  3. Choose a Squarespace API Endpoint
  4. Enter your Squarespace API Request into Apipheny
  5. Run the Squarespace API request in your Google Sheet

Step 1.) Install and open the Apipheny add-on for Google Sheets

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.

open apipheny

Tip: you can open a new Google Sheet by entering this URL in your browser: sheet.new

Step 2.) Generate a Squarespace API key

Next, log in to your Squarespace account and in the left navigation menu, click Settings:

Click "settings" in your Squarespace account
Click “settings” in your Squarespace account

Then scroll down and click Advanced:

In the Settings menu, click “Advanced”

Then click Developer API Keys:

Click "Developer API Keys" in your Squarespace advanced settings
Click “Developer API Keys” in your Squarespace advanced settings

Click the GENERATE KEY button:

Click "Generate Key"
Click “Generate Key”

In the popup window, fill in the “KEY NAME” field and select one or more Commerce APIs under “PERMISSIONS”, along with their permission level, then click GENERATE KEY:

Enter your API name, choose your permissions, then click "Generate Key"
Enter your API name, choose your permissions, then click “Generate Key”

After your key is generated, click the Copy Key button and then paste your key to a safe location, because you will need it in the next steps:

Copy and paste your Squarespace API key to a safe location
Copy and paste your Squarespace API key to a safe location

Step 3.) Choose a Squarespace API Endpoint

In this section, I’ll show you how to browse the Squarespace API documentation to find an API endpoint URL that retrieves the specific information you need from your Squarespace account.

If you already know your API URL endpoint, or you want to use the same example URL as us, just skip to Step 4.

First, open the Squarespace API documentation page: https://developers.squarespace.com/commerce-apis/overview

The menu on the left contains a guide on how to use the Squarespace API and a list of all the available APIs (Inventory API, Orders API, Products API and Transactions API):

Squarespace API documentation
Squarespace API documentation

Each API has a list of specific endpoints. Clicking one of the available Squarespace API’s endpoints.

An example endpoint is the Retrieve all inventory endpoint from the Inventory API. Clicking on this endpoint will open its documentation page, which contains the endpoint’s HTTP method and URL, a short description of its purpose, a list of the accepted parameters, as well as a sample request and its associated sample response.

Here’s the API URL for this example endpoint:

https://api.squarespace.com/{api-version}/commerce/inventory?cursor={c}
"Retrieve all inventory" endpoint documentation - Squarespace API
“Retrieve all inventory” endpoint documentation – Squarespace API

All API calls to the Squarespace API should be made to the base/root URL:

https://api.squarespace.com/{api-version}/commerce/

Step 4.) Enter your Squarespace API Request into the Apipheny add-on

Okay, now we’re in the home stretch. 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) as required by your Squarespace API endpoint. For this example, we are using the GET method.

API URL: In Step 3, I explained how you can find the Squarespace API endpoint that you need. Now copy the complete API URL into the Apipheny add-on, where it says API URL Path (JSON / CSV), followed by any GET parameters required for your query.

For this example, we are using the Retrieve all orders endpoint, that retrieves all order information; orders can be filtered within a date range. The response contains order information in an Order, up to 50 Orders ordered by their modification date (modifiedOn). The corresponding URL for this endpoint is:

https://api.squarespace.com/{api-version}/commerce/orders

Headers: In the Headers section of the Apipheny add-on, add one row, with the following key and value:

Header
Key:
Authorization
Value:
Bearer your_key

Replace your_key with the value of the API key you obtained previously, in Step 2. There should be a literal space between Bearer and your_key.

Here’s what your Squarespace API request should look like when entered into the Apipheny add-on:

Squarespace API request entered into the Apipheny add-on
Squarespace API request entered into the Apipheny add-on

Step 5.) Run the Squarespace API Request in your Google Sheets

Once you have your Squarespace API details entered into Apipheny, the last step is to click the Run button at the bottom of the Apipheny add-on, and then your Squarespace API data will be imported into your Google Sheet.

Squarespace API data imported into Google Sheets using the Apipheny add-on
Squarespace API data imported into Google Sheets using the Apipheny add-on

That’s it! That’s how you can connect the Squarespace API to Google Sheets and pull your Squarespace account data into Google Sheets using Apipheny.

After making a successful request to the Squarespace API, try querying a different Squarespace API endpoint, or try using one of the more advanced features in the Apipheny add-on.


Crypto API Tutorials:


API Tutorials


API Knowledge

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?


Import API into Google Sheets – Apipheny demo