# eBay Product & Sold Listings Scraper (`scrapers-hub/ebay-product-scraper-v2`) Actor

eBay Product & Sold Listings Scraper extracts live and sold listings - title, price, original price, condition, rating, sold count, watchers, shipping cost and item location. 💰 Ideal for resale pricing, demand research and competitor tracking.

- **URL**: https://apify.com/scrapers-hub/ebay-product-scraper-v2.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.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?

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 Product Scraper – Sold Listings, Prices & Seller Data Extraction

The eBay Product Scraper extracts structured product and sold listings data from eBay search results at scale, turning any keyword query into a clean dataset of titles, prices, conditions, sold counts and watcher numbers. Instead of paging through eBay's search interface by hand, you supply a list of keywords, pick a marketplace domain, and receive rows you can load straight into a spreadsheet, a pricing model or a BI dashboard.

This eBay scraper is built for resellers, retail analysts, pricing teams and market researchers who need repeatable access to eBay marketplace data. It supports the filters that matter most for ecommerce research — sold items only, completed listings only, free shipping, buying format, condition and item location — so you can isolate exactly the slice of the eBay catalogue you care about. Because the actor runs on Apify, every run produces a versioned dataset you can export as JSON, CSV or Excel, or pull directly through the API.

***

### 📊 What Data Can You Extract with This eBay Scraper?

The eBay Product Scraper returns a flat record per listing. The fields group naturally into six categories that map onto how ecommerce teams actually use marketplace data.

| Category | Fields | What it tells you |
|---|---|---|
| 🏷️ Product identity | `product_title`, `product_url`, `image_url` | The listing headline, its canonical eBay page and the primary gallery image |
| 💰 Pricing | `price`, `original_price` | Current asking or sold price plus the pre-discount price when eBay displays a strikethrough |
| 📦 Condition & logistics | `condition`, `shipping_cost`, `item_location` | New/used/refurbished state, postage cost and where the item ships from |
| ⭐ Social proof | `rating`, `review_count` | Aggregate star rating and the number of reviews backing it |
| 🔥 Demand signals | `sold_count`, `watchers` | How many units moved and how many buyers are actively tracking the listing |
| 🧭 Run context | `page_number`, `input_url`, `card_attribute` | Which results page the item came from, the search URL that produced it, and any badge or attribute eBay attaches to the card |

The pair worth watching is `sold_count` and `watchers`. Price alone tells you what a seller hopes to get; sold count tells you what the market actually paid, and watcher counts reveal latent demand on listings that have not converted yet. Together they let you separate genuinely liquid products from listings that merely look attractive.

***

### 🌟 Key Features of the eBay Scraper

| Feature | Description |
|---|---|
| 🔑 Multi-keyword input | Pass an array of search terms in `keywords` and the eBay scraper works through each one in sequence, tagging every row with the `input_url` that produced it |
| 🌍 Marketplace switching | Set `ebaySite` to any eBay domain — `www.ebay.com`, `www.ebay.co.uk`, `www.ebay.de` and so on — to pull region-specific pricing and inventory |
| ✅ Sold listings mode | Enable `soldItems` to restrict results to items that actually sold, which is the foundation of any realistic eBay price comparable analysis |
| 🕔 Completed listings mode | Enable `completedItems` to include auctions and fixed-price listings that have ended, sold or not |
| 🚚 Free shipping filter | Turn on `freeShipping` to isolate listings where postage is included, so landed-cost comparisons stay apples to apples |
| 🔍 Title and description search | `searchTitleDescription` widens the query beyond titles, surfacing listings where the key term only appears in the item description |
| 🎛️ Granular marketplace filters | Narrow by `category`, `buyingFormat`, `condition`, `locatedIn` and `sortBy` to reproduce almost any eBay advanced search |
| 📄 Pagination control | `maxPages` caps how many result pages are fetched per keyword, keeping run cost predictable |
| 🛡️ Managed anti-blocking | The actor drives a real browser through Playwright and routes traffic through rotating proxies automatically, with `proxyCountry` selecting the exit region |

***

### 🚀 Why Choose This eBay Scraper?

**Sold-listing data, not just asking prices.** Most eBay research tools only show you live listings, which reflect seller optimism rather than market reality. With `soldItems` enabled this eBay scraper returns items that changed hands, and `sold_count` quantifies volume — the difference between guessing a resale value and knowing one.

**Filters that mirror eBay's own advanced search.** Category ID, buying format, condition, location and sort order are all exposed as inputs. That means you can reproduce a saved eBay search programmatically and run it on a schedule, instead of clicking through the UI every morning.

**Real browser rendering.** eBay's search results rely heavily on client-side rendering and lazy-loaded cards. This actor uses Playwright to load pages the way a browser does, so fields like `watchers`, `sold_count` and `card_attribute` are captured rather than lost to an empty HTML shell.

**Every row carries its provenance.** Each item includes `page_number` and `input_url`, so when you merge results from a dozen keywords you can always trace a record back to the exact query and result page it came from. That makes deduplication and audit trails straightforward.

***

### 📥 Input

```json
{
  "keywords": ["High-speed infrared sensor", "thermal imaging camera"],
  "ebaySite": "www.ebay.com",
  "maxPages": 3,
  "soldItems": true,
  "completedItems": true,
  "freeShipping": false,
  "searchTitleDescription": false,
  "sortBy": "12",
  "category": "0",
  "buyingFormat": "",
  "condition": "",
  "locatedIn": "",
  "proxyCountry": "US"
}
```

#### 🔧 eBay Scraper Input Fields

| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| `keywords` | array | ✅ Yes | `["High-speed infrared sensor"]` | List of keywords to search for. |
| `ebaySite` | string | No | `www.ebay.com` | The eBay domain to search on (e.g., www.ebay.com). |
| `maxPages` | integer | No | `1` | Maximum number of pages to scrape per keyword. |
| `soldItems` | boolean | No | `false` | If true, only scrape items that have been sold. |
| `completedItems` | boolean | No | `false` | If true, only scrape completed listings. |
| `freeShipping` | boolean | No | `false` | If true, only return items with free shipping. |
| `searchTitleDescription` | boolean | No | `false` | Include descriptions in the search query. |
| `sortBy` | string | No | `12` | Sorting option ID (e.g., 12 for Best Match). |
| `category` | string | No | `0` | The eBay category ID to search within. |
| `buyingFormat` | string | No | `""` | Filter by buying format (e.g., Auction, Buy It Now). |
| `condition` | string | No | `""` | Filter by item condition. |
| `locatedIn` | string | No | `""` | Filter by item location. |
| `proxyCountry` | string | No | `US` | Proxy country code to use for scraping. |

#### 💡 Input Examples

**Sold comparables for a resale valuation**

```json
{
  "keywords": ["Nikon D750 body"],
  "ebaySite": "www.ebay.com",
  "soldItems": true,
  "completedItems": true,
  "maxPages": 5
}
```

**UK marketplace sweep with free shipping only**

```json
{
  "keywords": ["vintage denim jacket", "levis 501 vintage"],
  "ebaySite": "www.ebay.co.uk",
  "freeShipping": true,
  "maxPages": 2,
  "proxyCountry": "GB"
}
```

**Deep keyword search inside a single category**

```json
{
  "keywords": ["infrared sensor module"],
  "category": "58058",
  "searchTitleDescription": true,
  "buyingFormat": "Buy It Now",
  "maxPages": 4
}
```

***

### 📤 Output

```json
{
  "page_number": 1,
  "product_title": "FLIR Lepton 3.5 High-Speed Infrared Thermal Sensor Module",
  "condition": "Brand New",
  "price": "$219.99",
  "image_url": "https://i.ebayimg.com/images/g/abcAAOSw0GRk1x2Z/s-l500.jpg",
  "original_price": "$249.99",
  "rating": "4.9",
  "review_count": "37",
  "sold_count": "12 sold",
  "watchers": "43 watchers",
  "shipping_cost": "Free shipping",
  "item_location": "Portland, Oregon, US",
  "card_attribute": "Top Rated Plus",
  "product_url": "https://www.ebay.com/itm/285512349901",
  "input_url": "https://www.ebay.com/sch/i.html?_nkw=High-speed+infrared+sensor"
}
```

#### 🧾 eBay Scraper Output Fields

| Field | Type | Description |
|---|---|---|
| `page_number` | integer | null | Page number of the item. |
| `product_title` | string | null | Product title of the item. |
| `condition` | string | null | Condition of the item. |
| `price` | string | number | Price of the item. |
| `image_url` | string | null | URL of the item's image. |
| `original_price` | string | null | Price before any discount. |
| `rating` | string | null | Average rating score. |
| `review_count` | string | null | Number of reviews. |
| `sold_count` | string | null | Number of sold. |
| `watchers` | string | null | Watchers of the item. |
| `shipping_cost` | string | null | Shipping cost of the item. |
| `item_location` | string | null | Item location of the item. |
| `card_attribute` | string | null | Card attribute of the item. |
| `product_url` | string | null | URL of the product page. |
| `input_url` | string | null | URL supplied in the Actor input that produced this item. |

Fields that eBay does not display on a given card come back as `null`. Auction listings, for example, rarely carry `sold_count`, and many private sellers show no `rating` at all. Plan your downstream transforms to tolerate nulls rather than assuming every column is populated.

***

### 💻 How to Use the eBay Scraper (Step by Step)

#### Step 1: Define your eBay keyword list

Start with the `keywords` array. Each entry is treated as an independent eBay search, so you can bundle a whole product line into one run — model numbers, brand plus category phrases, or common misspellings that sellers actually use in titles. Keep terms specific enough to avoid a flood of unrelated results; "sensor" will return tens of thousands of listings across dozens of categories, while "FLIR Lepton 3.5 sensor" lands on the products you actually want. If you are researching a broad market, run several narrow keywords rather than one vague one.

#### Step 2: Choose the right eBay marketplace domain

The `ebaySite` field decides which regional marketplace you query. Pricing, availability and even condition vocabulary differ meaningfully between `www.ebay.com`, `www.ebay.co.uk`, `www.ebay.de` and `www.ebay.com.au`. If you are building a cross-border arbitrage model, run the same keyword list against each domain in separate runs and join the datasets afterwards on `product_title` or a normalised model number. Pair the domain with a matching `proxyCountry` so the marketplace serves you local currency and shipping options.

#### Step 3: Decide between live, sold and completed listings

This is the most consequential choice in the input. Leave `soldItems` and `completedItems` off to see the current live inventory — useful for competitive assortment analysis and for spotting what is on offer right now. Turn `soldItems` on when you need realised prices for valuation work, since those are the only records that reflect what a buyer genuinely paid. `completedItems` broadens that to every ended listing, including unsold ones, which is how you measure sell-through rate: sold listings divided by all completed listings for the same query.

#### Step 4: Apply marketplace filters to narrow the result set

`category`, `buyingFormat`, `condition` and `locatedIn` mirror eBay's advanced search controls. Supplying a numeric `category` ID is the single most effective way to cut noise, because it stops unrelated departments leaking into your results. `buyingFormat` separates auction dynamics from fixed-price Buy It Now behaviour — the two produce very different price distributions and should usually be analysed separately. `locatedIn` matters for anyone modelling delivery times or import duties.

#### Step 5: Set pagination and sorting

`maxPages` controls how deep the eBay scraper goes per keyword. A single page gives you a fast sample of the most relevant listings; four or five pages gives you enough rows for a stable median price. Combine it with `sortBy` to control what lands on page one — the default sorting ID `12` corresponds to Best Match, but other IDs order by price, newest listing or ending soonest. If you only need the cheapest offers, sorting by price and capping `maxPages` at one or two is far more efficient than fetching everything.

#### Step 6: Run the actor and review the dataset

Click **Start** in the Apify Console, or trigger the run through the API. As results stream in, open the **Dataset** tab and check a handful of rows before scaling up. Look specifically at whether `price`, `condition` and `sold_count` are populated the way you expect for your query — if `sold_count` is empty across the board, you probably forgot to enable `soldItems`. Adjust the input and rerun; iteration on a one-page run is much cheaper than discovering a mistake after a fifty-page crawl.

#### Step 7: Export or automate the eBay data

From the dataset view you can export to CSV, JSON, XLSX or XML in one click. For recurring research, set up an Apify **Schedule** so the eBay scraper runs daily or weekly and appends to a growing price history. Add a webhook to push each finished run into your warehouse, or connect the dataset to Google Sheets so a shared pricing tracker refreshes itself without anyone touching the Console.

***

### 🔌 API Access & Integrations

Run the eBay scraper synchronously and receive dataset items in the same HTTP response:

```bash
curl -X POST "https://api.apify.com/v2/acts/scrapers-hub~ebay-product-scraper-v2/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "keywords": ["High-speed infrared sensor"],
    "ebaySite": "www.ebay.com",
    "soldItems": true,
    "maxPages": 2
  }'
```

The same run in Python with the official client:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")

run = client.actor("scrapers-hub/ebay-product-scraper-v2").call(run_input={
    "keywords": ["High-speed infrared sensor", "thermal imaging camera"],
    "ebaySite": "www.ebay.com",
    "soldItems": True,
    "completedItems": True,
    "maxPages": 3,
    "proxyCountry": "US",
})

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["product_title"], item["price"], item["sold_count"])
```

Beyond the API, the resulting dataset connects to Zapier, Make, Google Sheets and Slack, and Apify webhooks can fire your own endpoint the moment an eBay scraping run finishes.

***

### 💡 Best Use Cases for eBay Product Data

#### 📈 Resale price benchmarking

Pull sold listings for a model number with `soldItems` enabled and compute the median `price` across the last few pages. Because each row also carries `condition`, you can build separate benchmarks for "Brand New", "Used" and "For parts or not working" instead of averaging incompatible states together. Resellers use this to set list prices that actually clear.

#### 🔎 Competitor assortment tracking

Run a keyword sweep across a category on a schedule and diff the `product_title` and `product_url` sets between runs. New URLs mean new listings entering the market; disappearing ones mean sold-out or delisted inventory. Layering `item_location` on top shows whether competition is domestic or coming from overseas sellers.

#### 💹 Demand and sell-through analysis

Combine `sold_count` with `watchers` to rank products by commercial momentum. A listing with high watchers but zero sales usually signals a price that is above the market's willingness to pay, while high sold counts on a modest watcher base points to a proven, fast-moving SKU. Run the same query with and without `completedItems` to derive a sell-through ratio.

#### 🚢 Landed-cost and shipping strategy

`shipping_cost` and `item_location` together reveal how much of a listing's competitiveness comes from postage rather than price. Comparing the total of `price` plus `shipping_cost` against the free-shipping cohort (captured by setting `freeShipping` to true in a second run) tells you whether absorbing postage would improve your placement.

#### 🧾 Discount and promotion monitoring

Where eBay shows a strikethrough, the actor captures both `price` and `original_price`. The gap between them is the advertised discount, and tracking that gap over weekly runs exposes seasonal promotion cycles in a category — invaluable for planning your own markdown calendar.

#### ⭐ Seller quality and trust signals

`rating`, `review_count` and `card_attribute` describe the credibility layer around a listing. Filtering your analysis to sellers with a meaningful `review_count` removes noise from one-off private sales, and `card_attribute` frequently surfaces badges like Top Rated Plus that correlate with conversion.

#### 🗂️ Catalogue enrichment and product research

For teams building or cleaning a product catalogue, `product_title`, `image_url` and `product_url` provide ready-made reference data. Sourcing teams use keyword sweeps to discover accessory and variant listings they had not catalogued, then follow `product_url` for manual verification.

***

### ⚙️ Tips for Better eBay Scraping Results

- **Match `proxyCountry` to `ebaySite`.** Querying `www.ebay.co.uk` from a US exit can return different currency formatting and shipping estimates than a UK buyer would see. Aligning the two keeps your dataset internally consistent.
- **Use a category ID instead of longer keywords.** Adding words to a query narrows results unpredictably; setting `category` to the right numeric ID is a hard filter and dramatically improves precision.
- **Start with `maxPages` at 1.** Validate that the fields you need are populated on a single page before committing to a deep crawl. It costs almost nothing and catches filter mistakes early.
- **Separate auction and fixed-price runs.** Set `buyingFormat` explicitly rather than mixing formats, because auction closing prices and Buy It Now asking prices follow different distributions and blending them distorts any average.
- **Turn on `searchTitleDescription` only when titles fail you.** It widens recall considerably but also pulls in listings where your term appears incidentally, so treat it as a fallback rather than a default.
- **Schedule runs at a consistent time of day.** eBay inventory and pricing move throughout the week; sampling at the same hour makes week-over-week comparisons meaningful instead of noisy.

***

### 🛠️ Troubleshooting

**Why is my eBay scraper run returning zero items?**
The most common cause is an over-restrictive filter combination. Setting `soldItems` and `freeShipping` and a narrow `category` at once can eliminate every result. Remove filters one at a time until rows appear, then add them back selectively. Also confirm the keyword actually returns results when typed into the eBay site you selected.

**Why are `sold_count` and `watchers` empty?**
eBay only shows these badges on some listings. Watcher counts typically appear on listings with active interest, and sold counts on multi-quantity fixed-price items. If they are empty across every row, check that `soldItems` is enabled — live listings that have never sold have nothing to report.

**Why does `price` sometimes come back as a string with a currency symbol?**
The field is typed as string or number because eBay renders prices in several formats, including ranges for multi-variant listings. Normalise it downstream by stripping currency symbols and thousands separators, and decide how to handle range values such as "$19.99 to $34.99" before loading into a numeric column.

**Why do results differ between two runs with the same input?**
eBay search is dynamic. Listings end, new ones are posted, and Best Match ordering is personalised and time-sensitive. For stable comparisons, sort deterministically via `sortBy`, restrict to `completedItems`, and treat each run as a snapshot with a timestamp rather than a fixed truth.

**The run is slower than expected. How do I speed it up?**
Rendering eBay in a real browser is the price of getting complete fields. Reduce `maxPages`, trim the `keywords` array, or split a large keyword list across several parallel runs rather than one long sequential run.

***

### ❓ Frequently Asked Questions About eBay Scraping

**Is scraping eBay legal?**
The eBay scraper only collects information that eBay publishes publicly on its search results pages — no logins, no private account data. Collecting public data is generally permissible in many jurisdictions, but you remain responsible for complying with eBay's Terms of Service, applicable law and any restrictions in your own contracts. Seek legal advice for commercial redistribution.

**Can I scrape eBay sold listings with this actor?**
Yes. Set `soldItems` to `true` to restrict results to items that have sold. Combine it with `completedItems` to capture every ended listing, which is what you need to calculate sell-through rates alongside realised prices.

**How many eBay listings can I scrape in one run?**
That depends on `maxPages` and the length of your `keywords` array. Each keyword is searched independently and each page yields a page of results, so total volume is roughly keywords multiplied by pages multiplied by listings per page.

**Which eBay marketplaces are supported?**
Any eBay domain you can put in the `ebaySite` field, including `www.ebay.com`, `www.ebay.co.uk`, `www.ebay.de`, `www.ebay.fr`, `www.ebay.it`, `www.ebay.com.au` and `www.ebay.ca`. Set `proxyCountry` to match for the most representative results.

**Do I need an eBay API key or developer account?**
No. The actor works from eBay's public search pages, so there is no API key, no application review and no rate-limit quota tied to a developer account.

**Can I filter eBay results by condition?**
Yes, through the `condition` input. The condition vocabulary follows eBay's own labels, and the extracted `condition` field on each output row lets you verify the filter behaved as expected.

**How do I scrape a specific eBay category?**
Supply the numeric category ID in the `category` field. You can find the ID in the URL of any eBay category page — it is the number following `/bn_` or in the `_sacat` query parameter of a search URL. The default `0` means all categories.

**Can I configure my own proxies for eBay scraping?**
Proxy rotation is handled automatically by the actor. You can influence the exit region with `proxyCountry`, but the underlying proxy pool is managed for you rather than being user-supplied.

**Does this eBay scraper collect seller names or contact details?**
No. The output fields cover listing attributes — title, price, condition, shipping, location, ratings and demand signals — not seller identities or contact information.

**How often should I run the eBay scraper for price tracking?**
Daily runs suit fast-moving consumer categories and anything with auction dynamics. Weekly is usually enough for durable goods and industrial parts. Use an Apify Schedule and keep the input identical between runs so the time series stays comparable.

**Can I export eBay data to Excel or Google Sheets?**
Yes. Every Apify dataset exports to CSV, XLSX, JSON and XML from the Console, and the dataset API endpoint can be pulled directly into Google Sheets or any BI tool that reads JSON or CSV over HTTP.

**What happens if a field is missing from an eBay listing?**
It is returned as `null` rather than being omitted, so your schema stays consistent across rows. Always guard against nulls in downstream code, particularly for `rating`, `review_count`, `sold_count`, `watchers` and `original_price`.

**Can I search eBay item descriptions and not just titles?**
Yes. Setting `searchTitleDescription` to `true` extends the query into listing descriptions. This increases recall but also brings in incidental matches, so review a sample before relying on it for a large run.

**Does the actor handle eBay's anti-bot protection?**
The scraper drives a real browser and routes requests through rotating proxies automatically, which is what allows dynamically rendered fields to be captured. As with any public-web scraper, occasional retries may still be needed on very large runs.

**How do I trace an output row back to the search that produced it?**
Every item carries `input_url` and `page_number`. When you run multiple keywords in one job, group by `input_url` to reconstruct per-keyword result sets, and use `page_number` to understand ranking position within each search.

***

### 🆘 Support & Feedback

Found a bug, or noticed an eBay layout change that broke a field? Open a ticket on the **Issues** tab of this actor — that is the fastest route to a fix, and it lets other users see the status of known problems.

Need a custom version of this eBay scraper — extra fields, a different marketplace, item-level detail pages, or a bespoke output shape for your pipeline? Get in touch at **scraperhubapi@gmail.com** and describe what you need.

If the eBay Product Scraper saves you time, please leave a rating and a short review on the actor page. Honest feedback helps other ecommerce and pricing teams find the tool, and it tells us which features to prioritise next.

***

### ⚖️ Disclaimer

This eBay scraper collects only publicly available information displayed on eBay's search results pages. It does not access private accounts, bypass authentication, or retrieve data hidden behind a login.

You are responsible for how you use the extracted data. That includes complying with eBay's Terms of Service, robots directives, applicable copyright and database rights, and any competition or consumer-protection rules that govern price monitoring in your market. Scraping frequency should remain reasonable and proportionate.

The output fields are listing attributes rather than personal data, but if any record you collect happens to contain information relating to an identifiable individual, you become the data controller for that record and must handle it in line with the GDPR, the UK GDPR, the CCPA and any other privacy legislation that applies to you — including lawful basis, retention limits and responding to data subject requests.

This actor is an independent tool and is not affiliated with, endorsed by, or sponsored by eBay Inc. If you believe data collected through this actor should be removed, contact **scraperhubapi@gmail.com** with the details and we will act on the request promptly.

# Actor input Schema

## `keywords` (type: `array`):

List of keywords to search for.

## `ebaySite` (type: `string`):

The eBay domain to search on (e.g., www.ebay.com).

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

Maximum number of pages to scrape per keyword.

## `soldItems` (type: `boolean`):

If true, only scrape items that have been sold.

## `completedItems` (type: `boolean`):

If true, only scrape completed listings.

## `freeShipping` (type: `boolean`):

If true, only return items with free shipping.

## `searchTitleDescription` (type: `boolean`):

Include descriptions in the search query.

## `sortBy` (type: `string`):

Sorting option ID (e.g., 12 for Best Match).

## `category` (type: `string`):

The eBay category ID to search within.

## `buyingFormat` (type: `string`):

Filter by buying format (e.g., Auction, Buy It Now).

## `condition` (type: `string`):

Filter by item condition.

## `locatedIn` (type: `string`):

Filter by item location.

## `proxyCountry` (type: `string`):

Proxy country code to use for scraping.

## Actor input object example

```json
{
  "keywords": [
    "High-speed infrared sensor"
  ],
  "ebaySite": "www.ebay.com",
  "maxPages": 1,
  "soldItems": false,
  "completedItems": false,
  "freeShipping": false,
  "searchTitleDescription": false,
  "sortBy": "12",
  "category": "0",
  "buyingFormat": "",
  "condition": "",
  "locatedIn": "",
  "proxyCountry": "US"
}
```

# Actor output Schema

## `results` (type: `string`):

Records scraped by eBay Product & Sold Listings Scraper, stored in the run's default dataset.

# 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("scrapers-hub/ebay-product-scraper-v2").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("scrapers-hub/ebay-product-scraper-v2").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 scrapers-hub/ebay-product-scraper-v2 --silent --output-dataset

```

## MCP server setup

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

```

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/b4QpGIlFyTeeLXxVO/builds/0mI2R9dtxirsESrCd/openapi.json
