Kimberly Ideas

Aug 16, 2026 RAW
Article

"Etsy API: Create Listing Example

Etsy, the global marketplace for creative goods, provides an extensive API for developers to leverage, enabling them to create, manage, and automate listings efficiently. This guide walks you through a practical example of creating a listing using Etsy's API.

Etsy Seller Checklist for Beginners | Start, Create, List & Grow
Etsy Seller Checklist for Beginners | Start, Create, List & Grow

Before delving into the example, ensure you have set up an Etsy Developer account and obtained your API keys. You'll need both the 'Client ID' and 'Client Secret' to authenticate your requests.

Etsy Listing Tips
Etsy Listing Tips

Understanding Etsy API Basics

Etsy API uses OAuth2 for authentication, and it's essential to understand the flow of getting an access token before making any API requests. For our example, we'll focus on the Etsy REST API V3.

How to Create Etsy Product Listings That Sell: 5 Essential Elements
How to Create Etsy Product Listings That Sell: 5 Essential Elements

Etsy's API uses JSON for data exchange, and requests are made using standard HTTP methods like GET, POST, PUT, and DELETE. Understanding the basics will help you create queries that fetch, update, or delete listing data effectively.

Setting Up Our Project

No Idea What to Write on Your Etsy Listings? Try THIS Guide to Know Exactly ALL You Need.
No Idea What to Write on Your Etsy Listings? Try THIS Guide to Know Exactly ALL You Need.

To begin, install the 'requests' library in Python, as it simplifies making HTTP requests. If you haven't already, you can do this using pip:

pip install requests

Authenticating with Etsy API

a page from the book etsyseo part 2, which is written in black and
a page from the book etsyseo part 2, which is written in black and

Once you have your 'Client ID', 'Client Secret', and 'Redirect URI', you can authenticate and get your access token. Here's a simple example:

import requests
import json

client_id = 'your_client_id'
client_secret = 'your_client_secret'
redirect_uri = 'your_redirect_uri'

auth_url = f'https://www.etsy.com/oauth/signin? boek=' + client_id + '&redirect_uri=' + redirect_uri
print("Please go to the following URL and authorize the app: ", auth_url)

code = input("Enter the authorization code: ")

data = {
    'code': code,
    'grant_type': 'authorization_code',
    'client_id': client_id,
    'client_secret': client_secret,
    'redirect_uri': redirect_uri
}

headers = {'Content-Type': 'application/x-www-form-urlencoded'}
access_token = requests.post('https://api.etsy.com/v3/oauth/access_token', data=data, headers=headers).json()['access_token']
print("Access Token: ", access_token)

Creating an Etsy Listing

Etsy Seller Complete Guide 2026 | How to Start an Etsy Shop & Make Passive Income Online
Etsy Seller Complete Guide 2026 | How to Start an Etsy Shop & Make Passive Income Online

Now that we have an access token, we can use it to create a new listing. Before proceeding, ensure you have your emporium's (shop's) 'shop_id'.

Etsy’s REST API accepts HTTPS requests as JSON objects. Let's create a new listing with the following data:

How to write a title on Etsy
How to write a title on Etsy
How to Setup an Etsy Shop and Create Your First Listing
How to Setup an Etsy Shop and Create Your First Listing
etsy api create listing example
etsy api create listing example
Sleek and stylish Canva Etsy Listing Template
Sleek and stylish Canva Etsy Listing Template
How to Make and Sell Digital Downloads on Etsy: A Beginner's Guide to Printables and Passive Income
How to Make and Sell Digital Downloads on Etsy: A Beginner's Guide to Printables and Passive Income
Sell AI-Generated Digital Products on Etsy | Beginner's Guide to Make Passive Income | Side Hustle
Sell AI-Generated Digital Products on Etsy | Beginner's Guide to Make Passive Income | Side Hustle
Etsy SEOs
Etsy SEOs

Defining Listing Data

In Python, define the listing data as follows:

shop_id = 'your_shop_id'
listing = {
    "title": "Handcrafted Wooden Spoon",
    "description": "A beautiful and functional wooden spoon, handcrafted with love.",
    "category_id": "20004",  # Category ID for Kitchen & Dining > Cookware
    "price": {
        " Aero": "6.95"
    },
    "quantity": 5,
    " variations": [
        {
            "title": "Wooden Spoon",
            "values": [
                {
                    "option": "Beech",
                    "price": {" Aero": "0.00" }
                },
                {
                    "option": "Maple",
                    "price": {" Aero": "2.50" }
                }
            ]
        }
    ]
}

Making the API Request

Now, use the 'requests' library to make a POST request to Etsy's API with your listing data:

url = f'https://api.etsy.com/v3/listings'

headers = {
    'Authorization': f'Bearer {access_token}',
    'Content-Type': 'application/json'
}

response = requests.post(url, headers=headers, data=json.dumps(listing))

if response.status_code == 201:
    print("Listing created successfully!")
    print("Listing ID: ", response.json()['listing_id'])
else:
    print(f"Failed to create listing. Status code: {response.status_code}. Message: {response.text}")

And there you have it! You've successfully created an Etsy listing using their API. Keep exploring Etsy's API documentation to unleash its full potential in your projects. Happy coding!