# eBay Scraper (`dtrungtin/ebay-items-scraper`) Actor

Unofficial eBay API to extract data from eBay based on keywords or categories. Scrape prices, product descriptions, images, location, availability, brand, and more. Download extracted data in structured format and use it in reports, spreadsheets, databases, and applications.

- **URL**: https://apify.com/dtrungtin/ebay-items-scraper.md
- **Developed by:** [Tin](https://apify.com/dtrungtin) (community)
- **Categories:** E-commerce
- **Security:** Limited permissions
- **Stats:** 2,157 total users, 56 monthly users, 98.5% runs succeeded, 60 bookmarks
- **User rating**: 3.01 out of 5 stars

## Pricing

from $25.00 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Scrape and download product information without the limitations of the [eBay API](https://developer.ebay.com), including but not limited to prices, or product descriptions.

eBay Items Scraper extracts all and any items from any category page on eBay or by the specific keyword, provided you copy\&paste the search URL. Download your data as HTML or Excel table, as well as in JSON, CSV or XML format.

**How to use the data extracted from eBay:**

- **Establish automated price and bidding monitoring** -  scan dozens e-commerce items and products  in real-timeto adjust your own buying or pricing strategies.
- **Track competitors' prices** - track listings, product, and sales data from various online stores to compare with competitor's and bidder's prices, and back up your decision-making process with real data.
- **Facilitate market analysis** - scan and analyze eBay for images, products, related keywords, whole new categories and more to stay ahead of emerging trends and consumer habits.
- **Optimize performance and implement lightweight automation** - collect data about products easily, non-manually, be it for market research, machine learning or new product development.

For more ideas on how to use data extracted from eBay, check out our  [industries pages](https://apify.com/industries) which describe **at least 12 ways** of how web scraping data is used across the projects and businesses of various scale and direction, specifically in the area of [retail and e-commerce](https://apify.com/industries/ecommerce-and-retail).

### Tutorial

If you want to know more about how the eBay Scraper works, here's a detailed explanation and [step-by-step guide](https://blog.apify.com/how-to-scrape-ebay-and-extract-listings-data/) with screenshots and examples.

### Cost of usage

Keep in mind that it is much more efficient to run one longer scrape (at least one minute) than a few shorter ones.  because of the startup time. In average, this scraper will cost you around **0.63 USD** per 1000 items. For more details, see the [platform pricing page](https://apify.com/pricing/actors).
If you’re not sure how much CUs you have left on your plan and whether you might need to upgrade, you can always check your limits in the *Settings -> Usage and Billing* tab in  [your Console](https://console.apify.com/). The easiest way to know how many CUs you will need is to *perform a test run.*

### Input Parameters

This actor will need only two settings from you - **a link** and a **proxy**:

- **startUrls** *(required)*: List of [Request objects](https://sdk.apify.com/docs/api/request#docsNav), specifying the search queries/categories you want to scrape. The URL can be any search/category page on eBay.
- **proxyConfiguration** *(required)*: Specifies the proxy settings used while running the actor. When running this actor on the platform, the proxy setting must always be set on. The default value is  `{ "useApifyProxy": true }`

#### Example

```json
{
  "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"
    }
  ],
  "maxItems": 10,
  "proxyConfig": {
    "useApifyProxy": true
  }
}
```

### Output

After the eBay actor finishes the scraping run, it will store the scraped results in a dataset and show them to you as output results. The results can be downloaded in various formats.

#### Output example:

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

Note that the search results may vary if you're executing scraping from different locations. We recommend to use the proxies for the best scraping results from the same location.

### Proxy usage

This actor, as many scrapers in the [retail industry](https://apify.com/industries/ecommerce-and-retail), will require you to use **Proxy servers** to function properly.
We don't recommend running it on a free account for more complicated tasks than getting a sample of results. If you are planning to run this scraper for getting more than a few results, subscribing to the [Apify platform](https://console.apify.com/sign-up) will provide you with access to a large pool of proxies.

### Supported countries

This actor supports scraping eBay in the following countries and domains:

- 🇺🇸 **US** - https://www.ebay.com
- 🇬🇧 **GB** - https://www.ebay.co.uk
- 🇩🇪 **DE** - https://www.ebay.de
- 🇪🇸 **ES** - https://www.ebay.es
- 🇫🇷 **FR** - https://www.ebay.fr
- 🇮🇹 **IT** - https://www.ebay.it
- 🇮🇳 **IN** - https://www.ebay.in
- 🇨🇦 **CA** - https://www.ebay.ca
- 🇯🇵 **JP** - https://www.ebay.co.jp
- 🇦🇪 **AE** - https://www.ebay.ae
- 🇸🇦 **SA** - https://www.ebay.sa
- 🇧🇷 **BR** - https://www.ebay.com.br
- 🇲🇽 **MX** - https://www.ebay.com.mx
- 🇸🇬 **SG** - https://www.ebay.sg
- 🇹🇷 **TR** - https://www.ebay.com.tr
- 🇳🇱 **NL** - https://www.ebay.nl
- 🇦🇺 **AU** - https://www.ebay.com.au
- 🇸🇪 **SE** - https://www.ebay.se
  If you'd like any more countries and domains to be added to this scraping list, please email <dtrungtin@gmail.com> with your request.

### Other e-commerce scrapers

We have many more e-commerce and retail scrapers in stock for you; to see the list of those, check out the [E-commerce Category in Apify Store](https://apify.com/store?category=ECOMMERCE).

### Need to find product pairs between eBay and another online shop?

Use the [AI Product Matcher](https://apify.com/equidem/ai-product-matcher). This AI model allows you to compare items from different web stores, identifying exact matches and comparing real-time data obtained via web scraping. With the AI Product Matcher, you can use scraped product data to monitor product matches across the industry, implement dynamic pricing for your website, replace or complement manual mapping, and obtain realistic estimates against your competition for upcoming promo campaigns.

Most importantly, it is relatively easy to get started with (just follow [this guide](https://blog.apify.com/product-matching-ai-pricing-intelligence-web-scraping/)) and is able to match thousands of product pairs.

# Actor input Schema

## `startUrls` (type: `array`):

URLs to start with.

## `maxItems` (type: `integer`):

Limit of items to be scraped

## `proxyConfig` (type: `object`):

It's required to use proxies when running on the platform.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2499334.m570.l1313&_nkw=massage%2Brecliner%2Bchair&_sacat=6024"
    }
  ],
  "maxItems": 10,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "VN"
  }
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        {
            "url": "https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2499334.m570.l1313&_nkw=massage%2Brecliner%2Bchair&_sacat=6024"
        }
    ],
    "maxItems": 10,
    "proxyConfig": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ],
        "apifyProxyCountry": "VN"
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dtrungtin/ebay-items-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": [{ "url": "https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2499334.m570.l1313&_nkw=massage%2Brecliner%2Bchair&_sacat=6024" }],
    "maxItems": 10,
    "proxyConfig": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
        "apifyProxyCountry": "VN",
    },
}

# Run the Actor and wait for it to finish
run = client.actor("dtrungtin/ebay-items-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    {
      "url": "https://www.ebay.com/sch/i.html?_from=R40&_trksid=p2499334.m570.l1313&_nkw=massage%2Brecliner%2Bchair&_sacat=6024"
    }
  ],
  "maxItems": 10,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ],
    "apifyProxyCountry": "VN"
  }
}' |
apify call dtrungtin/ebay-items-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dtrungtin/ebay-items-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/PBSxkfoBWghbE2set/builds/qf5gpPxpfYXhhREzr/openapi.json
