Ebay API Python Client

Extract Ebay data with our Ebay API Python client. Get programmatic access to brand, images, product titles, prices, seller information, item location, availability, and more using simple Python code. Start free, no credit card required.

Trusted by industry leaders all over the world

Integrate our Ebay API

The Apify API client for Python is the official library that allows you to use Ebay API in Python, providing convenience functions and automatic retries on errors. Get started with simple pip installation and robust error handling built-in.

Python

Python

JavaScript

JavaScript

HTTP

HTTP

MCP

MCP

1from apify_client import ApifyClient
2
3# Initialize the ApifyClient with your Apify API token
4# Replace '<YOUR_API_TOKEN>' with your token.
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7# Prepare the Actor input
8run_input = {
9 "startUrls": [{ "url": "https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2499334.m570.l1313&_nkw=massage%2Brecliner%2Bchair&_sacat=6024" }],
10 "maxItems": 10,
11 "proxyConfig": { "useApifyProxy": True },
12}
13
14# Run the Actor and wait for it to finish
15run = client.actor("dtrungtin/ebay-items-scraper").call(run_input=run_input)
16
17# Fetch and print Actor results from the run's dataset (if there are any)
18print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
19for item in client.dataset(run["defaultDatasetId"]).iterate_items():
20 print(item)
21
22# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

Get data with Ebay API Python client

Use our Python API client to extract eBay data by providing search URLs or category pages from any supported eBay domain. The API returns structured data, including product titles, prices, seller details, item locations, availability status, brand information, product images, and comprehensive listing details in JSON format.

Input

{
"maxItems": 10,
"startUrls": [
{
"url": "<https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2499334.m570.l1313&_nkw=massage%2Brecliner%2Bchair&_sacat=6024>"
},
{
"url": "<https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2334524.m570.l1313&_nkw=motor+parts&_sacat=0&LH_TitleDesc=0>"
},
{
"url": "<https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2334524.m570.l1313&_nkw=bicycle+handlebars&_sacat=0&LH_TitleDesc=0>"
}
],
"proxyConfig": {
"useApifyProxy": true
}
}

Output

[
{
"ean": null,
"mpn": null,
"upc": "Does not apply",
"url": "<https://www.ebay.com/itm/164790739659>",
"sold": 1,
"type": "Professional Drone",
"brand": "Unbranded",
"image": "<https://i.ebayimg.com/images/g/pp4AAOSwKtRgZPzC/s-l300.jpg>",
"price": 39,
"title": "2021 New RC Drone 4k HD Wide Angle Camera WIFI FPV Drone Dual Camera Quadcopter",
"seller": "everydaygadgetz",
"subTitle": "US Stock! Fast Shipping! Highest Quality! Best Service!",
"wasPrice": 41.05,
"whyToBuy": [
"Free shipping and returns",
"1,403 sold",
"Ships from United States"
],
"available": 10,
"categories": [
"Camera Drones",
"Other RC Model Vehicles & Kits"
],
"itemNumber": "164790739659",
"itemLocation": "Alameda, California, United States",
"availableText": "More than 10 available",
"priceWithCurrency": "US $39.00",
"wasPriceWithCurrency": "US $41.05"
}
]

How to use Ebay API

Sign up for Apify account01

Creating an account is quick and free — no credit card required. Your account gives you access to more than 5,000 scrapers and APIs.

Get started for free
Install Apify Python client02

Install the Apify Python client using pip: pip install apify-client. This package provides a simple interface to interact with Ebay API from your Python applications.

Get your Apify API token03

Go to settings in the Apify console and navigate to the “API & Integrations” tab. There, create a new token and save it for later.

Integrate Ebay API04

Navigate to the Ebay API page and click on the API dropdown menu in the top right corner. In the dropdown menu, you can see API clients, API endpoints, and more. Use the provided Python code examples to integrate Ebay API into your Python application.

Open Ebay Python API
Get your Ebay data via API05

The Ebay API returns structured JSON data that works perfectly with pandas, NumPy, and other Python data analysis libraries.

Why use Apify?

Never get blocked

Every plan (free included) comes with Apify Proxy, which is great for avoiding blocking and giving you access to geo-specific content.

Customers love us

We truly care about the satisfaction of our users and thanks to that we're one of the best-rated data extraction platforms on both G2 and Capterra.

Monitor your runs

With our latest monitoring features, you always have immediate access to valuable insights on the status of your web scraping tasks.

Export to various formats

Your datasets can be exported to any format that suits your data workflow, including Excel, CSV, JSON, XML, HTML table, JSONL, and RSS.

Integrate Apify to your workflow

You can integrate your Apify runs with platforms such as Zapier, Make, Keboola, Google Drive, or GitHub. Connect with practically any cloud service or web app.

Large developer community

Apify is built by developers, so you'll be in good hands if you have any technical questions. Our Discord server is always here to help!

Frequently asked questions

No, eBay does not provide an official Python API client. While eBay does offer developer APIs, they have significant limitations and restrictions. An unofficial eBay Python API client bypasses those limitations, allowing you to extract detailed product information including prices, descriptions, seller data, and availability from any eBay search or category page across 18 supported countries and domains.

Yes, you can try the eBay Scraper for free using Apify's Python API client. Every new user gets free credits to test the scraper before committing to a paid plan. The scraper costs approximately $0.63 per 1000 items scraped, and you can perform a test run to see exactly how many compute units you'll need for your specific use case.

The eBay Python API client extracts comprehensive product data including product titles, prices (current and original), seller information, item locations, availability status, shipping details, product categories, brand information, high-quality product images, item numbers, UPC/EAN codes, product descriptions, and much more. All data is returned in structured JSON format that can be exported to CSV, Excel, XML, or HTML formats.

Getting started with our Ebay Python API is easy — simply create a free Apify account, get your API token, and start using the Ebay API in Python, JavaScript, CLI, cURL, OpenAPI, or MCP.

Get started with Ebay API Python client today

Get your first Ebay data in Python in less than 5 minutes. No credit card required. No commitment. Cancel anytime.