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

Scrapes eBay search and category pages and every item they list: price, was-price, availability, sold count, seller, location, categories, brand, MPN, EAN, UPC and more. No headless browser — Chrome-fingerprinted HTTP via impit.

- **URL**: https://apify.com/dtrungtin/ebay-fast-scraper.md
- **Developed by:** [Tin](https://apify.com/dtrungtin) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.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

## eBay Fast Scraper — Node.js / Apify

Apify Actor that scrapes eBay search and category pages and every item they
list, with the same input and output as
[dtrungtin/ebay-items-scraper](https://apify.com/dtrungtin/ebay-items-scraper).
No headless browser: plain HTTP through [`impit`](https://github.com/apify/impit),
which reproduces Chrome's TLS and HTTP/2 fingerprint.

### Setup

Requires Node.js 20.18.1+ (the Actor image uses Node 24).

```sh
npm install
npm test        # parser + crawler tests (offline, against saved pages)
```

Run locally with the Apify CLI (or write the same JSON to
`storage/key_value_stores/default/INPUT.json` and run `npm start`):

```sh
apify run --input='{
  "startUrls": [{ "url": "https://www.ebay.com/sch/i.html?_nkw=drone" }],
  "maxItems": 20,
  "proxyConfig": { "useApifyProxy": false }
}'
```

`useApifyProxy: false` sends requests from your own IP, which is fine for a
few dozen pages. Apify Proxy only works outside the platform if the account
has *Proxy external access*; without it the default proxy gives no proxy
URLs locally, the log says "No proxy configured", and requests go out
directly too.

### Input

| field         | type    | description |
|---------------|---------|-------------|
| `startUrls`   | array   | **Required.** eBay search (`/sch/…`) or category (`/b/…`) pages on any eBay site. Item pages (`/itm/<number>`) are accepted too. |
| `maxItems`    | integer | Limit of items across all start URLs, at most 5,000 per run. Empty = 5,000. |
| `proxyConfig` | object  | Default: Apify `RESIDENTIAL`. With no country set, each eBay site gets proxies from its own country (ebay.com → US, ebay.de → DE, …); a country set here is used for every site. |

Parallelism isn't an input: the number of workers is set from the run's
memory (see [Memory and speed](#memory-and-speed)). To go faster, give the
run more memory.

Search URLs without `_ipg` get `_ipg=240` added (240 results per page, eBay's
maximum, instead of 60), so runs with `maxItems` ≤ 240 per search need no
pagination at all. Set `_ipg` yourself to override.

### Memory and speed

Run memory is limited to 1–4 GB (default 2 GB) in
[.actor/actor.json](.actor/actor.json). The scraper itself needs only
\~300–360 MB; memory matters because Apify allocates CPU from it (1 core per
4 GB) and parsing is CPU-bound (~0.26 s of CPU per item). Node parses on a
single thread, so more than 4 GB / 1 core would be wasted.

The worker count (each with its own proxy session) follows memory:

| memory | CPU | workers | ~speed | 1,000 items |
|---|---|---|---|---|
| 1024 MB | 0.25 core | 3 | 1 item/s | ~17 min |
| 2048 MB | 0.5 core | 5 | 2 items/s | ~9 min |
| 4096 MB | 1 core | 10 | 3.8 items/s | ~4.5 min |

Measured offline against the saved pages with simulated network latency;
real runs are slower by the Akamai warm-up and retries. Compute cost per
item is about the same at every size (~0.3 CU per 1,000 items) — more memory
just finishes sooner. Residential proxy traffic (~0.15 GB per 1,000 items)
costs far more than compute.

### Output

One dataset record per item — the same 31 fields, in the same order, as
dtrungtin/ebay-items-scraper. Example from ebay.de:

```json
{
  "url": "https://www.ebay.de/itm/254195517252",
  "categories": [
    "Spielzeug",
    "Bausets & Konstruktion",
    "LEGO (R) Konstruktionsspielzeuge",
    "LEGO (R) Bausteine & Einzelteile"
  ],
  "itemNumber": "254195517252",
  "title": "100 Lego Technic Kleinteile ca 30g bunt gemischt z.B. Pin Stopper Kreuz Stange",
  "subTitle": null,
  "whyToBuy": [
    "Ganz entspannt. Rückgaben akzeptiert.",
    "In guter Gesellschaft. 11 Leute beobachten das.",
    "Geld zurück, wenn etwas mit diesem Artikel nicht stimmt.",
    "Nach EU-Recht haben Sie Rechte, wenn der Artikel fehlerhaft ist oder von der Beschreibung abweicht."
  ],
  "endedDate": null,
  "condition": "Gebraucht",
  "lastUpdated": "27. Sep. 2026 20:54:51 MESZ",
  "price": 2.59,
  "priceWithCurrency": "EUR 2,59",
  "wasPrice": null,
  "wasPriceWithCurrency": null,
  "available": 56,
  "availableText": "56 verfügbar",
  "sold": 29,
  "image": "https://i.ebayimg.com/images/g/jwgAAeSwBJRqetD8/s-l1600.jpg",
  "images": [
    "https://i.ebayimg.com/images/g/jwgAAeSwBJRqetD8/s-l1600.jpg",
    "https://i.ebayimg.com/images/g/ZnMAAeSw~8JqetD9/s-l1600.webp",
    "https://i.ebayimg.com/images/g/nGsAAeSwk-9qetD~/s-l1600.webp",
    "https://i.ebayimg.com/images/g/rmcAAeSwMCBqetEA/s-l1600.webp"
  ],
  "seller": "www-steinpalast-de",
  "itemLocation": "Mylau, Deutschland",
  "ean": "4059632016718",
  "mpn": null,
  "upc": null,
  "brand": "LEGO®",
  "type": null,
  "sellerAwayMessage": null,
  "statusMessage": null,
  "shippingCost": 8.99,
  "shippingCostWithCurrency": "EUR 8,99",
  "excludesShipping": "Brasilien, Chile, Französisch-Polynesien, Israel, Kasachstan, Litauen, Russische Föderation, USA, Uruguay",
  "shipsTo": "Amerika, Asien, Australien, Europa"
}
```

Field notes:

- Fields eBay doesn't show for a listing are `null`: `wasPrice` without a
  discount, `available` on single-quantity Buy It Now listings, `endedDate`
  without a timer, etc. Texts (`condition`, `availableText`, `shipsTo`, ...)
  are in the eBay site's language.
- `price` / `priceWithCurrency` are the listing's own price and currency
  (what eBay shows in large type), not the "approximately …" conversion into
  the visitor's currency. Prices are parsed per locale: `EUR 2,59` → 2.59.
- `shippingCost` (0 for free shipping), `shipsTo` and `excludesShipping`
  depend on where eBay thinks the visitor is, i.e. the proxy's country.
- `endedDate` is the text after the item's timer label: a countdown such
  as `2d 16h` ("Sale ends in:", auctions) or the end of an ended listing.
- `whyToBuy` is the trust/highlights panel on the item page — eBay's
  current layout no longer has a box titled "Why to buy".
- `categories` is the item's breadcrumb path; `images` are all gallery
  images at full size (`s-l1600`), `image` is the first one.
- `ean`, `mpn`, `upc`, `brand` come from the page's JSON-LD when present,
  else from *Item specifics*; values like `Does not apply` are kept as-is.
- Category pages also show catalog products (`/p/<epid>`) that group many
  listings; those cards are skipped — only real listings are scraped.

**Sold and completed listings are not supported.** eBay only shows
`LH_Sold=1` / `LH_Complete=1` searches to signed-in accounts: on Apify with
residential proxies (2026-10-03) every such search either got 403s or
eBay's sign-in page. The Actor recognises the sign-in page, doesn't retry
it, and fails the run with an explanation if nothing else was scraped.

The run's outcome counters are stored in the key-value store as `summary`.
Pages that return 200 but can't be parsed (layout change, soft block) are
saved there as `debug-list-<n>` / `debug-item-<n>` (first 10 per run).

**Migrations.** The crawl state (queue, seen pages, `maxItems` budget,
counters) is saved to the key-value store as `CRAWLER_STATE` every minute
and when Apify moves the run to another server. On a move the crawler first
stops taking pages and waits for dataset pushes under way, so the resumed
run continues exactly where it stopped: no item is scraped — or charged —
twice.

### How it gets past eBay's bot protection

eBay sits behind Akamai, probed 2026-10-02:

| request | result |
|---|---|
| curl, `got-scraping` (any HTTP version) | `403 Error Page` on every URL — TLS fingerprint rejected at the edge |
| impit (`chrome151`), first request on a site | `403`, but sets `bm_s` / `bm_so` cookies |
| …retry ~2 s later with those cookies + `Referer` + `Sec-Fetch-Site: same-origin` | **200, real page** |
| …retry immediately | flaky (5/8 trials passed vs 8/8 with the delay) |
| …retry with cookies but no `Referer` | `/splashui/challenge` "Pardon Our Interruption" (Argon2 proof-of-work) |
| …retry with `Referer` but no cookies | still `403` |

So [src/ebay/session.js](src/ebay/session.js) does what a browser reload
would: on a session's first 403 it waits 1.5–3 s and re-requests the same URL
as a same-origin navigation (up to 3 times). After that, every page load
carries the cookies and a `Referer` (the list page an item was found on, the
previous page for pagination). Each crawler worker keeps one session — one
sticky proxy IP and cookie jar — until it is blocked, then starts a fresh one.

There is also a second layer (Radware Bot Manager cookies `__uzma…__uzmf`).
It hasn't interfered at low volume. In testing, a single residential IP
started getting 403s even after the cookie bounce once it had made ~150
requests within an hour — at scale you need rotating residential proxies.

**Search pages 2+ are guarded harder than anything else.** On Apify with
RESIDENTIAL US proxies (500 items, 2026-10-03), every one of the run's 8
blocks hit a search page: page 2 loaded on its 4th try, page 3 on its 6th.
Item pages were essentially never blocked. So the crawler gives list pages up
to 10 retries (items: 5), each on a fresh session (= fresh proxy IP) after a
2–4 s pause; a blocked try costs only ~2 KB of proxy traffic. `_ipg=240`
keeps the number of list pages to a minimum.

### Codebase

- [src/main.js](src/main.js) — Actor entry: input, proxy, dataset output, summary.
- [src/ebay/crawler.js](src/ebay/crawler.js) — task queue, workers, session
  rotation, retries, pagination, `maxItems` budget. Pagination follows
  eBay's own "next" link with the current page as Referer — eBay rewrites
  the query (e.g. it drops a `_sacat` category with no matches), and a
  hand-built `_pgn=2` URL that no browser would navigate to gets an empty
  page or a 403.
- [src/ebay/session.js](src/ebay/session.js) — impit client, per-site cookie
  jar, Akamai cookie bounce, response classification.
- [src/ebay/parse.js](src/ebay/parse.js) — list page and item page parsers.
- [src/ebay/parse.test.js](src/ebay/parse.test.js) — tests against real
  pages in [src/ebay/fixtures/](src/ebay/fixtures/) (gzipped; captured from
  a Vietnamese IP, hence some VND prices on search pages).
- [.actor/](.actor/) — Apify Actor manifest, Dockerfile and schemas: input,
  output (links to the items, the Overview table and the `summary` record)
  and dataset (type/description of every output field plus the Overview
  view). Apify validates each pushed item against the dataset `fields`, so
  keep [dataset_schema.json](.actor/dataset_schema.json) in step with
  `parseItemPage()` when adding or changing a field.

Log lines look like:

```
[w2] sess=hy5bk1sr9i3p item item_ok  status=200 bounces=0 dur=1.3s try=1 ebay.com/itm/316914175972 | GBP 14.51 12VDC Heated Massage …
```

Outcomes: `list_ok`, `list_empty` (search with no results), `item_ok`,
`blocked` (Akamai 403), `challenge` (splashui), `ratelimit`, `not_found`,
`http_error`, `transport_error`, `unparsable`; `*_failed` counts pages that
ran out of retries.

# Actor input Schema

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

eBay search or category pages to scrape (any supported eBay site, e.g. https://www.ebay.com/sch/i.html?\_nkw=drone). Item pages (/itm/<number>) are accepted too.

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

Limit of items to be scraped across all start URLs, up to 5,000 per run. Leave empty for 5,000.

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

It's required to use proxies when running on the platform. Residential proxies are recommended. Leave the country empty to use each eBay site's own country (ebay.com → US, ebay.de → DE, ...), so results, prices and shipping match local shoppers; a country set here is used for every site.

## Actor input object example

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

# Actor output Schema

## `items` (type: `string`):

All scraped items with every field (url, itemNumber, title, prices, availability, seller, location, categories, brand, EAN/MPN/UPC, ...).

## `overview` (type: `string`):

The same items in the Overview table view: image, title, price, was-price, availability, sold, seller, location and URL.

## `summary` (type: `string`):

Item count, run time, sessions used and per-outcome counters (item_ok, list_ok, blocked, ...).

# 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&_nkw=massage%2Brecliner%2Bchair&_sacat=6024"
        }
    ],
    "maxItems": 50,
    "proxyConfig": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("dtrungtin/ebay-fast-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&_nkw=massage%2Brecliner%2Bchair&_sacat=6024" }],
    "maxItems": 50,
    "proxyConfig": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("dtrungtin/ebay-fast-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&_nkw=massage%2Brecliner%2Bchair&_sacat=6024"
    }
  ],
  "maxItems": 50,
  "proxyConfig": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call dtrungtin/ebay-fast-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,dtrungtin/ebay-fast-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/EalcFLZ7S17MaN6EJ/builds/U51quW5MAgzFSbuUz/openapi.json
