# CompSniper eBay Sold Listings (`compsniper/compsniper-ebay-sold-listings`) Actor

Real eBay sold prices for any keyword. Up to 240 completed sales with a clean median and range.

- **URL**: https://apify.com/compsniper/compsniper-ebay-sold-listings.md
- **Developed by:** [CompSniper](https://apify.com/compsniper) (community)
- **Categories:** E-commerce
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## 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

## CompSniper eBay Sold Listings

Real eBay **sold** prices for any keyword. Give it a product name and get back up to 240 recent completed sales, the actual price each item sold for, the sold date, condition, shipping, and seller, plus a clean median and price range.

Unlike a raw scrape, a custom AI model strips accessories, parts, and the wrong models before the numbers are computed, so the median reflects the real item, not noise.

### What you get

- Real **completed sales**, not active listings or asking prices
- Up to **240 listings per keyword**, across 8 eBay marketplaces (US, UK, DE, FR, IT, ES, CA, AU)
- A computed **median, p25 to p75 range, and average** per keyword (saved to the run's key-value store as `SUMMARY`)
- **AI-cleaned comps**: accessories, parts, and wrong models removed (toggle off for the raw feed)
- Seller username, condition, shipping, and item URL on every row

### Input

| Field | Type | Description |
| --- | --- | --- |
| `keywords` | array | One or more product keywords. Each returns up to 240 sold listings. |
| `count` | integer | Listings per keyword, 1 to 240 (default 240). |
| `ebaySite` | string | Marketplace: ebay.com, ebay.co.uk, ebay.de, ebay.fr, ebay.it, ebay.es, ebay.ca, ebay.com.au. |
| `itemCondition` | string | any, new, or used. |
| `minPrice` / `maxPrice` | integer | Optional price bounds. |
| `relevance` | boolean | AI cleaning on (default) or off for the raw eBay feed. |

#### Example input

```json
{
  "keywords": ["iphone 15 pro", "rtx 4090"],
  "count": 100,
  "ebaySite": "ebay.com",
  "relevance": true
}
```

### Output

Each dataset row is one sold listing, tagged with its `keyword`:

```json
{
  "keyword": "iphone 15 pro",
  "title": "Apple iPhone 15 Pro 256GB Unlocked",
  "soldPrice": "585.00",
  "soldCurrency": "USD",
  "condition": "Pre-Owned",
  "shippingType": "free",
  "totalPrice": "585.00",
  "endedAt": "2026-08-17",
  "sellerUsername": "example_seller",
  "url": "https://www.ebay.com/itm/..."
}
```

The per-keyword price summary (median, range, average, sample size) is stored under the key `SUMMARY` in the run's key-value store.

### How it works

This actor calls the CompSniper API, which handles the eBay fetching, cookie rotation, parsing, and AI relevance cleaning server-side. You get clean, structured sold data without maintaining any scraping infrastructure yourself.

Learn more at [compsniper.com](https://compsniper.com).

# Actor input Schema

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

One or more product keywords to pull eBay sold prices for. Each keyword returns up to 240 completed sales.

## `count` (type: `integer`):

How many sold listings to return per keyword (1 to 240).

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

Which eBay marketplace to search.

## `itemCondition` (type: `string`):

Filter by item condition.

## `minPrice` (type: `integer`):

Only include sales at or above this price.

## `maxPrice` (type: `integer`):

Only include sales at or below this price.

## `relevance` (type: `boolean`):

Drop accessories, parts, and wrong models with a custom AI model so the median reflects the real item. Turn off for the raw eBay feed.

## Actor input object example

```json
{
  "keywords": [
    "iphone 15 pro",
    "rtx 4090",
    "dyson v15"
  ],
  "count": 240,
  "ebaySite": "ebay.com",
  "itemCondition": "any",
  "relevance": true
}
```

# Actor output Schema

## `listings` (type: `string`):

One row per completed eBay sale, tagged with its keyword.

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

Per-keyword median, p25 to p75 range, average, and sample size.

# 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 = {
    "keywords": [
        "iphone 15 pro"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("compsniper/compsniper-ebay-sold-listings").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 = { "keywords": ["iphone 15 pro"] }

# Run the Actor and wait for it to finish
run = client.actor("compsniper/compsniper-ebay-sold-listings").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 '{
  "keywords": [
    "iphone 15 pro"
  ]
}' |
apify call compsniper/compsniper-ebay-sold-listings --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,compsniper/compsniper-ebay-sold-listings"
        }
    }
}

```

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/d5RVLDhomYDYR3peq/builds/TiuPy7jT9YPdxJGKB/openapi.json
