API Connector Documentation
Import Etsy Data to Google Sheets
In this guide, we’ll walk through how to pull Etsy data data directly into Google Sheets, using the API Connector add-on for Sheets.
Contents
- Before You Begin
- Part 1: Connect to the Etsy API
- Part 2: Pull Data from Etsy to Sheets
- Part 3: Fetch and Append New Receipts
- Part 4: Create a Custom Request
- Part 5: Handle Pagination
- Part 6: API Documentation
Before You Begin
Click here to install the API Connector add-on from the Google Marketplace.
Part 1: Connect to the Etsy API
The easiest way to get started with the Etsy API is through API Connector's built-in integration.
- In Sheets, open API Connector and create a new request (Extensions > API Connector > Open > Create request)
- Select Etsy from the drop-down list of applications
- Under Authorization, click Connect to Etsy
- You be asked to authorize the connection. Click Grant access
- You’ll then be returned to your Google Sheet, and can verify that your Etsy connection is now active.
Part 2: Pull Data from Etsy to Sheets
Now that we’re connected, let’s pull some data into Sheets.
- Under Endpoint, choose /shops. This will return your shop ID, which you'll need for subsequent requests.
- Fill in your shop name, select a destination sheet, name your request, and click Run. You'll see your shop ID returned in the
results.shop_id
field. - You can now plug this value into other requests. For example, the
/shops/{shop_id}/listings
endpoint requires the shop ID as a parameter.
Part 3: Fetch and Append New Receipts
Rather than retrieving the entire data set each time you run your request, you can set your request to fetch new data only. There are a few approaches you could take; here’s one:
- Create an initial request to the
/receipts
endpoint. Use the field editor to select just the fields you want and assign them to specific columns in your report. - Run the request, sending the response to a sheet called EtsyData.
- Now in a second sheet, get the maximum (i.e. most recent)
created_timestamp
from the response data with a formula like=max(EtsyData!Y:Y)+1
- Update your request to reference this cell in the
min_created
parameter of your request. - This will ensure that each request starts from the end of the prior data pull. Select Append mode to add each new data pull to the end of your existing dataset.
- Set your request to run on a schedule. You won’t need to update your request again.
Part 4: Create a Custom Request
Alternatively, you can create a custom request instead of using API Connector’s built-in integration, using any of the endpoints and parameters shown in the API documentation. This is useful for handling some customized requests not available via the preset endpoints.
Here's an example request setup showing how to add a draft listing to your shop. Substitute your own store ID where it says your_shop_id
, and make sure to include all the required parameters shown in the draft listing documentation.
- Application:
Custom
- Method:
POST
- Request URL:
https://openapi.etsy.com/v3/application/shops/your_shop_id/listings
- OAuth:
Etsy
- Request body:
{"quantity":2,"title":"A blue shirt","description":"An amazing blue top","price":5,"who_made":"i_did","when_made":"2020_2023","taxonomy_id":1,"shipping_profile_id":"202318775666","item_width":5,"item_length":5,"item_height":5,"item_dimensions_unit":"cm","item_weight":2,"item_weight_unit":"kg"}
Once this is complete, the new listing should appear in your shop:
Notes:
- An earlier version of the Etsy connector didn't include write access. If you receive a permissions error when running this request, try disconnecting/re-connecting.
- The shipping_profile_id parameter can be found by running a
GET
request tohttps://openapi.etsy.com/v3/application/shops/your_shop_id/shipping-profiles
- This technique can be expanded to cycle through a list of products, and/or reference cell data from the sheet: Multi-Query Requests
Part 5: Handle Pagination
By default, Etsy limits results to 25 at a time. To get more, set the limit
parameter to 100.
If 100 records is not enough, you can loop through Etsy's paginated records using the following settings:
- Pagination type: offset-limit
- Offset parameter: offset
- Limit parameter: limit
- Limit value: 100
- Run until: choose when to stop fetching data
Part 6: API Documentation
Official API documentation: https://developers.etsy.com/documentation/reference
I'm very new to this and trying to connect to Etsy.
I уntered the following data in the "Add Custom OAuth" form:
Authorization Base URL:
https://openapi.etsy.com/v2
Token URL:
https://openapi.etsy.com/v2/oauth/request_token?scope=email_r
Client ID:
azm3uoqeh5glvuaqa1jj9XXX
Client Secret:
xsargf6XXX
Then a page opened in a new tab with the following error:
"API request missing api_key or valid OAuth parameters"
How this can be solved? Any help appreciated.
Here is Etsy page about their OAuth:
https://www.etsy.com/developers/documentation/getting_started/oauth
Hi Roman, thanks for the message and sorry you're having trouble getting connected to Etsy. I checked the Oauth docs you linked and they say Etsy is using the old OAuth 1.0 standard while API Connector uses OAuth 2.0, so that's probably the issue.
If you're just making an app for your personal use, I think you can just use an API key like they describe here: https://www.etsy.com/developers/documentation/getting_started/api_basics
In that case your request would look like this:
https://openapi.etsy.com/v2/shops/YOUR_SHOP_NAME/listings/active?api_key=YOUR_KEYSTRING
You don't need headers or OAuth2 so just leave those empty.
Can you please run that URL and let me know how it goes?
Dear Ana,
Thank you so much for getting back to me. Your example works, though I need to access my private shop data (receipts), and when I'm making a request like the following:
https://openapi.etsy.com/v2/shops/MY_SHOP/receipts?api_key=azm3uoqeh5glvuaqa1jj9gf1
API Connector says "This method requires authentication."
It's a shame if the reason for the auth error is an old version of OAuth at Etsy. Nevertheless, thank you for your help.
Kindly,
Roman
hi, great job!
I ask 2 questions from inexperienced:
Is it possible, with this tool, to import only orders from etsy to google sheet?
in the practical configuration phase now I see that the Open API v3 is present, does something change?
Hey Tobias, now that Etsy v3 is available, we are working on adding an integration for it. Once that's ready you will be able to import your orders from Etsy to Sheets, but it's not quite available yet. Please check back soon.
Update: we've added support for v3, you can now import orders and other private account data from Etsy.
Hi! Is it possible at this time to have Etsy orders populate in real time on Google Sheets with your connector? Thanks in advance!
Sorry, they can not update in real time, currently API Connector only updates 1x per hour max so there will be a lag of up to one hour.
I'm using the API to import all my receipts onto a Google Sheet and then convert them into sales receipts using a template.
It's great, but it only works with one type of article by order.
I mean it works for an order with product A x1, or product A x2, product A x3, etc...
But it doesn't work for an order with both product A and product B. Only product A will appear on the Google Sheet through the API.
Is there a solution to make it work with multiple product types/orders?
That's odd, can you please check what the API is sending back? (Edit fields > Show raw response) I'm wondering if the API isn't sending the data or if a field filter has been applied on API Connector's side that prevents data from showing up.
Hi, Can i use this service to update my tracking through API and Google Sheet?
Sorry, I'm not really sure what updating your tracking means, but you can use this service to fetch data from any of the endpoints listed in the documentation. Let me know if that answers your question, if not I'll be happy to clarify.
I basically i have a order number and corresponding tracking number. Can i use POST api connect to update those tracking to my shop?
Oh I see, sorry, no, because our Etsy integration is set up only to fetch data rather than update data on the server (i.e. we only support the "read" and not "write" scopes). That's an interesting use case though, maybe we'll consider adding support for that in the future.
Update: the Etsy connector now supports writing data as well.
Sure, its really a helpful feature.
Hi I'm trying to pull data from other shops for market research (such transactions from specific shops). When inputting their shop.id and trying to edit, I'm getting "We received an error from etsy.com (404)" and when I click on show response I'm getting {"error":"Could not find a shop for user with user_id = 33240327"} however this shop.id isn't the one I'm typing in?
Hey Connor, I couldn't find any information on that error message in Etsy's documentation, nor was I able to trigger it myself (in my tests, I only got a "User does not own Shop" error}, so I think you'd have to ask Etsy's support what they mean by that exactly. However I suspect it's because you can't get transactions from any shops other than your own, and the user ID mentioned is your own user ID (you can check by running a request to the
/shops
endpoint and checking the value in theresults.user_id
field).