# eBay Scraper - Listings, Sold Prices & Sellers (8 markets) (`codingfrontend/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/codingfrontend/ebay-all-in-one-scraper.md
- **Developed by:** [Coding Frontned](https://apify.com/codingfrontend) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

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?

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

### eBay all-in-one public listings scraper

This Actor collects public eBay active and completed listing data across the United States, United Kingdom, Germany, France, Italy, Spain, Canada, and Australia. It supports keyword-generated searches and explicit public eBay URLs, and returns listing, seller, price, condition, image, marketplace, and sold-state fields when the page publishes them.

#### Access boundary

Requests use direct HTTPS only. The Actor does not use a browser, stealth automation, proxy, login, private API, CAPTCHA solving, or access-control bypass. Redirects must remain on an allowed eBay marketplace. eBay challenges, error pages, blocked responses, and empty pages become minimal diagnostics rather than fabricated listing rows.

#### Input

Use startUrls for public eBay search, category, or item URLs. When it is empty, query and market generate public search URLs. mode selects active, sold, or both searches. maxPages is bounded per mode, and maxItems is a total unique-listing cap. requestDelayMs, timeoutMs, and maxRetries provide bounded request controls.

For deterministic local development, set fixtureFile to test/fixtures/synthetic-ebay.json or another JSON fixture inside this Actor. A fixture contains a pages array with url, html, and optional sold fields.

#### Dataset output

Normal rows contain business and public-source fields: item ID, title, listing type, condition, price, currency, shipping cost, bid count, seller information, sold state, item URL, image URLs, location, category, description, marketplace, source URL, `sourceDomain`, and scrape timestamp. Record-type markers, record IDs, HTTP details, retry counters, actor identity, and debug fields are never emitted in normal rows.

When enabled, a diagnostic row has exactly `recordType: "diagnostic"`, `diagnosticType`, url, error, errorCode, and scrapedAt. Operational counters and final status are stored in the OUTPUT_SUMMARY key-value record.

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

#### Local development

Run the focused contract suite with node --test test/contract.regression.test.js. Validate JavaScript syntax with node --check on the five files in src. Validate Actor schemas with apify validate-schema; validate emitted local dataset files with node validate-datasets.js.

Example fixture run:

```
apify run --purge --input {"mode":"both","maxItems":2,"fixtureFile":"test/fixtures/synthetic-ebay.json"}
```

#### Responsible use

Collect only public information you are permitted to use. Follow eBay terms, applicable marketplace rules, copyright and privacy requirements, and reasonable request-rate limits. For high-volume or contractual integrations, use eBay's official APIs and credentials instead of relying on HTML.

# Actor input Schema

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

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

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

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

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

eBay marketplace used for generated searches.

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

Return active listings, completed sold listings, or both.

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

Maximum generated pages per listing mode, from 1 to 10.

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

Maximum unique listing records returned across requested pages.

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

Polite delay between ordered direct public requests.

## `timeoutMs` (type: `integer`):

Per-request direct HTTPS timeout from 5000 to 120000 milliseconds.

## `maxRetries` (type: `integer`):

Bounded retries for transient direct responses, from 0 to 2.

## `includeDiagnostics` (type: `boolean`):

Emit minimal four-field rows for blocked, failed, or empty public responses.

## `userAgent` (type: `string`):

Optional transparent direct-request user-agent string.

## Actor input object example

```json
{
  "query": "vintage camera",
  "market": "us",
  "mode": "both",
  "maxPages": 1,
  "maxItems": 50,
  "requestDelayMs": 500,
  "timeoutMs": 30000,
  "maxRetries": 2,
  "includeDiagnostics": true
}
```

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("codingfrontend/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 = {}

# Run the Actor and wait for it to finish
run = client.actor("codingfrontend/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 '{}' |
apify call codingfrontend/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,codingfrontend/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/rq7rih2vhiiTq2p9X/builds/Y9leqtzCFciBmYjD5/openapi.json
