Etsy - export data using JSON
Export data from Etsy to Google Sheets
Some users may need to process other valuable data such as receipts, transactions, and many others. Actually, this is possible using the Etsy API, but it’s not that obvious. We’ll explain the basics and show how you can import some data using Coupler.io. You’ll have to complete two major steps:
- Get an Etsy API key
- Set up the JSON importer to import data
How to get an Etsy API key
An API key is a required parameter to import data from Etsy. To get it, you’ll need to register a “dummy” Etsy app. Follow this link to create a new Etsy app.
Fill out the following fields:
- Application name
- Application description
- Application website (you can leave it blank)
Then mark the following checkboxes:
Once ready, click Read Terms and Create App and agree to the Etsy API Terms of Use. Another click on Create App and there you go!
This procedure was needed mostly to get the KEYSTRING (here, “ f36sdf6v4h21ldoekrmns5pk
“), which we will use to import data with Coupler.io.
Coupler.io to import data via APIs to Google Sheets
We’ve already introduced the power of Coupler.io in the example of the CSV importer. Now, let’s check out another tool: JSON. Since most REST APIs interchange data in JSON format, you can use JSON to import JSON data to spreadsheets without coding.
This time, we’ll describe the workflow for the Coupler.io add-on that allows you to connect to Etsy right from your Google Sheets doc. To start using the tool, install Coupler.io from Google Workspace Marketplace.
Alternatively, you can use the Coupler.io web interface to set up the connection. Check out how it works in the example of the Stripe to Google Sheets integration.
After that, open your spreadsheet and go to Add-Ons => Coupler.io => Open Dashboard. Click +Add importer and choose JSON.
How to import data via Etsy API
To import data using the Etsy API, you need to use a JSON URL that matches a specific category of data you need. Let’s get a list of all data entities you can import. For this, enter the following URL in the JSON URL field of your JSON importer:
https://openapi.etsy.com/v2?api_key={KEYSTRING}
{KEYSTRING}
– insert the KEYSTRING you obtained once created an Etsy app
Click Save&Run and welcome the data imported from Etsy in Google Sheets.
We’ve got 242 records of data entities or resources as they are called according to Etsy API documentation. However, we are going to use only those that fall under two categories:
- results.http_method – GET (column I)
- results.visibility – Public (column H)
Because GET is the type of requests to fetch data from API and public resources are what we can export with an API key without OAuth authorization.
Use the Google Sheets filter functionality to filter data by these two categories. Click on the Filter button on the toolbar:
After that, the filter icon appears next to the name of each column. Click the icon on the column you want to filter, and select the filter criteria. For example, here is how we filtered out the GET values in the results.http_method column:
Once we have filtered the values by two criteria (GET and public), we have 97 entities.
One of them is to import all active listings – what we’ve already done when exporting current for sale listings in CSV. Let’s check out how it works.
Import Etsy active listings to Google Sheets
In the results.uri column, you’ll find the URI to attach to the base Etsy API URL.
Base Etsy API URL is:
https://openapi.etsy.com/v2/
Note that there are a few URIs associated with active listings:
/shops/:shop_id/listings/active
– imports active listings of a certain Etsy shop. You can use the shop name as:shop_id
/listings/active
– imports active listings of the entire Etsy marketplace (you can import the results from all Etsy shops filtered by country, keyword, price, etc.)
So, the JSON URL to import active listings should look as follows:
https://openapi.etsy.com/v2/listings/active?api_key={KEYSTRING}
Let’s import all active listings with the following filters:
- Minimum price – $30
- Maximum price – $40
- Tag – necklace
Here are the parameters you should use in the JSON importer:
Source | |
JSON URL | https://openapi.etsy.com/v2/listings/active?api_key={KEYSTRING} |
HTTP Method | GET |
URL query string | min_price: 30 max_price: 40 tags: necklace |
We’ve also specified the following destination Sheet Name (where your data will be imported to): “ Active listings price <40 and >30
“. Click Save&Run, and there you go!
You can see that some of the results have price values outside of the specified range; for example 27GBP and 285TRY. The default currency is USD, so Etsy can return results in other currencies that correspond to the specified range based on the actual currency rate.
Etsy will return results with a limit of 25 records per page. You can increase this value up to 100 (maximum value) with the help of the “
limit: 100
” parameter. To get the next records, you need to use the “page:
” parameter and specify the page number.
In our example, to get the next 25 records, we should use the following JSON parameters:
Source | |
JSON URL | https://openapi.etsy.com/v2/listings/active?api_key={KEYSTRING} |
HTTP Method | GET |
URL query string | min_price: 30 max_price: 40 tags: necklace |
Settings | |
Import mode | append |
Click Save&Run, and the next 25 records will be appended to the first imported data set:
Please read our blog post to learn more: Export Data from Etsy.