# eBay Scraper - Listings, Sold Prices & Sellers (8 markets) (`w3crawler/ebay-all-in-one-scraper`) Actor

Scrape eBay active and sold listings, products, and seller info across 8 marketplaces (US/UK/DE/FR/IT/ES/CA/AU). Search by keyword or paste eBay URLs. Returns flat JSON with 28 fields per item — built for resellers, dropshippers, and AI agents. MCP/API-ready.

- **URL**: https://apify.com/w3crawler/ebay-all-in-one-scraper.md
- **Developed by:** [w3crawler](https://apify.com/w3crawler) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.99 / 1,000 listings, sold items & seller records

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## eBay Scraper - Listings, Sold Prices & Sellers

This Actor collects useful, flat listing data from public eBay search and item pages. It supports the eight marketplaces described by the source Actor: the United States, United Kingdom, Germany, France, Italy, Spain, Canada, and Australia. It can be used for resale research, price comparisons, catalog enrichment, and seller discovery. The Actor reads product JSON-LD when it is available and falls back to the stable listing-card markup used by eBay search pages. It does not require an eBay account or API key. Before the first marketplace request, it visits that marketplace's public help page to establish the anonymous cookies eBay requires for public browsing; it never logs in or bypasses a challenge.

### Input

Use `startUrls` for public eBay search, category, or item URLs. URLs are checked before a request is made and non-eBay hosts are ignored. If no URLs are provided, set `query` and `market`; the Actor creates an eBay search URL for you. `mode` controls generated searches: `active` (the credential-free default) returns current listings, `sold` requests completed sold listings, and `both` requests one of each. Explicit URLs are respected, so a URL containing eBay's completed-listing filters can be used for a more specific search. `maxItems` limits unique records globally and `maxPages` bounds pagination per search URL. `requestDelayMs`, `requestTimeoutMs`, and `maxBytes` control pacing and resource bounds. Sold searches use public HTML first and can make one bounded anonymous Chromium fallback with a persistent marketplace-matched context. `proxyConfiguration` accepts the standard Apify Proxy object and defaults to direct access. Unknown fields fail early.

The included HTML fixture is used only by the focused parser test and cannot be selected through Actor input, so production datasets always represent requested live pages.

### Output

Each successful dataset item represents one listing and contains domain data: eBay item ID, title, listing type, condition, price, currency, shipping cost, bid count, seller name and feedback metrics, sold state and ISO timestamp when available, item URL, image URLs, location, category, description, and marketplace hostname. Records also contain stable provenance (`recordType`, `source`, `sourceUrl`, `scrapedAt`) and whether proxy routing was used. Numeric values are numbers, `isSold` is a boolean, URLs are absolute, and missing values are omitted. Placeholder values such as `N/A` and `unknown` are discarded. Duplicate listings are removed by item ID or canonical item URL across pages. Empty or repeated pages stop pagination. When a public page is blocked, unavailable, or returns no parseable listings, the Actor emits an explicit `pageType: "run_diagnostic"` record with access/error evidence instead of leaving an empty dataset.

`price` is the listing price shown by the page, while `shippingCost` is zero when the page explicitly says shipping is free. Currency comes from the page and otherwise falls back to the selected marketplace. A seller rating is kept as the percentage shown by eBay; it is not confused with a product review score. Sold timestamps are included only when they can be parsed into ISO 8601.

### Local validation

Install dependencies with `npm install`, run `npm test`, and validate the Actor schemas with `apify validate-schema`. A bounded fixture run is:

```text
apify run --purge --input {"query":"vintage camera","mode":"active","maxItems":3,"maxPages":1}
```

The runtime writes records to the default local dataset. Inspect that dataset to confirm that every emitted field is declared by `.actor/dataset_schema.json`, then run `npm run validate:dataset` for branch-aware listing/diagnostic checks. The live mode uses modest retries and timeouts and logs a warning for an individual page that cannot be fetched, allowing other requested pages to finish while preserving a diagnostic row.

### Operational notes and limitations

The Actor has no eBay developer credential fields and no official-API runtime path. It intentionally uses anonymous public HTML and structured data. Active search listings are the verified core contract. Completed-search pages are more access-sensitive; the Actor attempts public HTML and then one consistent-locale browser render, while explicit public ended-item URLs can expose a browser-visible sold subset. The Actor never fabricates API-only fields or claims diagnostic rows as listings. eBay can change markup or vary fields by country, device, and experiment, so a page may yield fewer fields or no records. Respect eBay's terms, robots guidance, rate limits, and applicable laws.

# Actor input Schema

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

Optional public eBay search, category, or listing URLs. When empty, URLs are generated from query and market.

## `query` (type: `string`):

Keyword used to build an eBay search URL when startUrls is empty.

## `market` (type: `string`):

eBay marketplace used for generated search URLs.

## `mode` (type: `string`):

Return active listings, completed sold listings, or both when generating search URLs.

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

Maximum listing records returned across all pages.

## `maxPages` (type: `integer`):

Maximum result pages processed for each search URL.

## `requestDelayMs` (type: `integer`):

Polite delay between public eBay page requests.

## `requestTimeoutMs` (type: `integer`):

Bounded timeout for each public page request.

## `maxBytes` (type: `integer`):

Maximum decompressed response bytes retained per page.

## `browserFallback` (type: `boolean`):

Use one bounded anonymous Chromium render when public search or item HTML is challenged.

## `browserWaitMs` (type: `integer`):

Bounded wait for public listing cards after browser navigation.

## `proxyConfiguration` (type: `object`):

Optional standard Apify Proxy configuration; direct access is the default.

## Actor input object example

```json
{
  "startUrls": [],
  "query": "vintage camera",
  "market": "us",
  "mode": "active",
  "maxItems": 50,
  "maxPages": 3,
  "requestDelayMs": 500,
  "requestTimeoutMs": 30000,
  "maxBytes": 5000000,
  "browserFallback": true,
  "browserWaitMs": 2000,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

# 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": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("w3crawler/ebay-all-in-one-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": [] }

# Run the Actor and wait for it to finish
run = client.actor("w3crawler/ebay-all-in-one-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": []
}' |
apify call w3crawler/ebay-all-in-one-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,w3crawler/ebay-all-in-one-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/KU0eps6siV66buhZk/builds/FBceOcQaY1csKt2y7/openapi.json
