# eBay Sold Comps, Completed Listings & Arbitrage API (`judicial_adventure/ebay-sold-comps-and-arbitrage-api`) Actor

Multi-region eBay sold comps, active auctions, and Buy-It-Now arbitrage scraper. Extracts numeric prices, shipping, total landed price, sold dates, seller ratings, and market comp summaries with Pay-Per-Event (PPE) billing.

- **URL**: https://apify.com/judicial_adventure/ebay-sold-comps-and-arbitrage-api.md
- **Developed by:** [nevil ingutu](https://apify.com/judicial_adventure) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.50 / 1,000 ebay listing scrapeds

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 Sold Comps, Completed Listings & Arbitrage API

High-speed, multi-region **eBay Sold Comps**, **Completed Listings**, **Ending-Soon Auctions**, and **Buy-It-Now Arbitrage API** built on **Apify SDK v3** and **Crawlee** with **Pay-Per-Event (PPE)** billing.

Unlike generic eBay scrapers that return messy text strings (`"$199.99 + $14.50 shipping"`) and charge you for eBay's hidden `"Shop on eBay"` dummy header cards, this Actor extracts **explicit numeric fields**, **parsed ISO sold dates**, **seller reliability metrics**, and an automated **Arbitrage Statistical Summary** (`medianPrice`, `averagePrice`, `minLandedPrice`, `maxLandedPrice`, `sellThroughIndicator`).

***

### Key Features for Resellers, Price Intelligence & AI Agents (`mcp.apify.com`)

1. **Multi-Region eBay Support (8 Marketplaces):**
   - `ebay.com` (US - USD), `ebay.co.uk` (UK - GBP), `ebay.de` (Germany - EUR), `ebay.ca` (Canada - CAD), `ebay.com.au` (Australia - AUD), `ebay.fr` (France - EUR), `ebay.it` (Italy - EUR), `ebay.es` (Spain - EUR).
2. **4 Specialized Arbitrage Filter Modes (`listingFilter`):**
   - `sold_completed` (`LH_Sold=1&LH_Complete=1`) — True historical sold prices to determine exact market value.
   - `active_auctions_ending_soon` (`LH_Auction=1&_sop=1`) — Snipe underpriced auctions ending in minutes.
   - `buy_it_now_only` (`LH_BIN=1`) — Instant fixed-price inventory for retail/online arbitrage.
   - `all_active` — Complete active market snapshot.
3. **Strict Condition Filtering (`LH_ItemCondition`):**
   - `new` (`1000`), `open_box` (`1500`), `refurbished` (`2000`), `used` (`3000`), `for_parts` (`7000`), or `any`.
4. **Zero-Waste Pay-Per-Event (PPE) Billing:**
   - **Dummy Header Filtering:** Automatically strips eBay's hidden `s-item__pl-on-bottom` / `"Shop on eBay"` (`itemId: 123456`) placeholder cards so you are **never** billed for non-listings.
   - **Instant Budget Stop (`eventChargeLimitReached`):** Stops immediately when your Apify PPE budget cap is reached.

***

### Output Schema (Dataset Item)

Every scraped listing in the default dataset contains clean numeric and boolean fields ready for spreadsheets, databases, or LLM tool calls:

```json
{
  "itemId": "286149823412",
  "searchQuery": "Sony WH-1000XM5",
  "ebayDomain": "ebay.com",
  "title": "Sony WH-1000XM5 Wireless Industry Leading Noise Canceling Headphones - Black",
  "Condition": "Pre-Owned",
  "condition": "Pre-Owned",
  "listingUrl": "https://www.ebay.com/itm/286149823412",
  "imageUrl": "https://i.ebayimg.com/images/g/abc123xyz/s-l500.jpg",
  "priceNumeric": 215.00,
  "currency": "USD",
  "shippingCostNumeric": 0,
  "totalLandedPrice": 215.00,
  "isSold": true,
  "soldDate": "2026-10-25T00:00:00.000Z",
  "isAuction": false,
  "bidCount": null,
  "timeLeft": null,
  "isBuyItNow": true,
  "acceptsBestOffer": true,
  "sellerUsername": "audio_deals_direct",
  "sellerFeedbackCount": 4820,
  "sellerPositivePercent": 99.7,
  "itemLocation": "United States",
  "scrapedAt": "2026-11-15T14:35:00.000Z"
}
```

***

### Market Comp & Arbitrage Summary (`ARBITRAGE_SUMMARY` / `SUMMARY`)

When `includeArbitrageSummary: true` (default), the Actor computes statistical market comps per query and writes the report to the Key-Value Store under `ARBITRAGE_SUMMARY` (and `SUMMARY`):

```json
{
  "searchQuery": "Sony WH-1000XM5",
  "ebayDomain": "ebay.com",
  "listingFilter": "sold_completed",
  "conditionFilter": "any",
  "currency": "USD",
  "sampleSize": 25,
  "soldCount": 25,
  "auctionCount": 6,
  "buyItNowCount": 19,
  "freeShippingPercent": 76,
  "medianPrice": 219.99,
  "averagePrice": 223.45,
  "minLandedPrice": 165.00,
  "maxLandedPrice": 299.99,
  "medianLandedPrice": 224.99,
  "averageLandedPrice": 228.10,
  "interquartileRangeLanded": {
    "p25": 198.50,
    "p75": 249.00,
    "iqr": 50.50
  },
  "sellThroughIndicator": "High Liquidity (100% Sold Comps Sample, Tight IQR Spread)"
}
```

***

### Local Development & PPE Verification

```bash
npm install
npm run build
npm run test:ppe
```

# Actor input Schema

## `searchQueries` (type: `array`):

List of search keywords, model numbers, or UPC/EAN/ISBN codes to look up on eBay (e.g., \["Sony WH-1000XM5"]).

## `ebayDomain` (type: `string`):

Select the target regional eBay domain to query.

## `listingFilter` (type: `string`):

Filter by listing status/format: 'sold_completed' (LH_Sold=1\&LH_Complete=1 for historical sold comps), 'active_auctions_ending_soon' (LH_Auction=1&\_sop=1 for sniping underpriced auctions), 'buy_it_now_only' (LH_BIN=1), or 'all_active'.

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

Filter listings by eBay item condition (maps to LH_ItemCondition codes: 1000 New, 1500 Open box, 2000 Refurbished, 3000 Used, 7000 For parts or not working).

## `maxItemsPerQuery` (type: `integer`):

Maximum number of verified eBay listings to extract per search query.

## `includeArbitrageSummary` (type: `boolean`):

When enabled, calculates medianPrice, averagePrice, minLandedPrice, maxLandedPrice, and sellThroughIndicator for each query and saves the statistical report to Key-Value Store (ARBITRAGE_SUMMARY & SUMMARY) and dataset.

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

Optional Apify Proxy configuration for high-volume multi-region scraping.

## Actor input object example

```json
{
  "searchQueries": [
    "Sony WH-1000XM5"
  ],
  "ebayDomain": "ebay.com",
  "listingFilter": "sold_completed",
  "condition": "any",
  "maxItemsPerQuery": 60,
  "includeArbitrageSummary": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

## `listingsDataset` (type: `string`):

Granular eBay listings with numeric prices, shipping, total landed prices, and seller stats.

## `arbitrageSummary` (type: `string`):

Market comp report containing medianPrice, averagePrice, min/max landed price, and sellThroughIndicator.

# 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 = {
    "searchQueries": [
        "Sony WH-1000XM5"
    ],
    "ebayDomain": "ebay.com",
    "listingFilter": "sold_completed",
    "condition": "any",
    "maxItemsPerQuery": 60,
    "includeArbitrageSummary": true,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("judicial_adventure/ebay-sold-comps-and-arbitrage-api").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 = {
    "searchQueries": ["Sony WH-1000XM5"],
    "ebayDomain": "ebay.com",
    "listingFilter": "sold_completed",
    "condition": "any",
    "maxItemsPerQuery": 60,
    "includeArbitrageSummary": True,
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("judicial_adventure/ebay-sold-comps-and-arbitrage-api").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 '{
  "searchQueries": [
    "Sony WH-1000XM5"
  ],
  "ebayDomain": "ebay.com",
  "listingFilter": "sold_completed",
  "condition": "any",
  "maxItemsPerQuery": 60,
  "includeArbitrageSummary": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call judicial_adventure/ebay-sold-comps-and-arbitrage-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,judicial_adventure/ebay-sold-comps-and-arbitrage-api"
        }
    }
}
```

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/9XLOcFwibcpXGrQFM/builds/duhcG9yj85GKUr6cJ/openapi.json
