# eBay Sold Listings & Price History (`lomo-dev/ebay-sold-listings-price-history`) Actor

Real completed eBay sales (what buyers actually paid) for any keyword across 8 eBay marketplaces, plus a per-keyword summary: median, average, min/max, p25/p75 and day/week/month price history. Data via licensed RapidAPI providers.

- **URL**: https://apify.com/lomo-dev/ebay-sold-listings-price-history.md
- **Developed by:** [Lomo Dev](https://apify.com/lomo-dev) (community)
- **Categories:** E-commerce, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.03 / 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 Sold Listings & Price History

**Get real completed eBay sales data** — what buyers actually paid — for any keyword, plus ready-made price summaries and historical trends.

Built for resellers, flippers, card & collectibles traders, and pricing tools.

[![Actor](https://apify.com/actor-badge?actor=lomo-dev/ebay-sold-listings-price-history)](https://console.apify.com/actors/nZzIiIKT3hRge3Ltv)

***

### 🚀 What this Actor does

- Fetches **real sold / completed listings** (not active listings)
- Returns **individual sold items** + a **summary row** per keyword
- Calculates **median, average, min, max, p25, p75** and **price history** (day / week / month)
- Supports **8 eBay marketplaces** (prices in local currency)
- Filters by condition, category, date range and price range
- Hard request cap to protect your RapidAPI quota

**Data source**: Licensed RapidAPI providers (no direct scraping of eBay).

***

### 📥 Input

| Field | Type | Default | Description |
|-------|------|---------|-------------|
| `keywords` | array | required | Search terms. Use `-word` to exclude. |
| `marketplace` | string | `ebay.com` | ebay.com / .co.uk / .de / .fr / .it / .es / .ca / .com.au |
| `condition` | string | `any` | any / new / used |
| `categoryId` | string | – | Optional eBay category ID |
| `dateFrom` / `dateTo` | string | – | YYYY-MM-DD (eBay shows ~90 days) |
| `minPrice` / `maxPrice` | integer | – | Price filter in marketplace currency |
| `maxItems` | integer | 100 | Max sold items per keyword |
| `maxRequestsPerKeyword` | integer | 3 | Hard cap on API calls (protects quota) |
| `historyInterval` | string | `week` | day / week / month |
| `includeItems` | boolean | true | false = summary only |
| `provider` | string | `compsniper` | compsniper / caffeindev |
| `rapidApiKey` | string | – | Your own RapidAPI key (recommended) |

#### Example input

```json
{
  "keywords": ["nintendo switch oled", "pokemon 151 booster box"],
  "marketplace": "ebay.com",
  "condition": "new",
  "maxItems": 150,
  "historyInterval": "week"
}
```

***

### 📤 Output

Dataset items have a `type` field:

#### `item` (individual sold listing)

`itemId`, `title`, `soldPrice`, `currency`, `shipping`, `totalPrice`, `soldDate`, `condition`, `url`, `image`, `sellerUsername`, `sellerFeedbackScore`, `bestOfferAccepted`, `buyingFormat`, `bidCount`, `itemLocation`, `marketplace`, `provider`

#### `summary` (one per keyword)

`count`, `currency`, `median`, `average`, `min`, `max`, `p25`, `p75`, `avgShipping`, `firstSoldDate`, `lastSoldDate`, `priceHistory[]`, `requestsUsed`, `warnings`

#### `error`

Clear error codes: `NOT_SUBSCRIBED`, `BAD_KEY`, `NO_KEY`, `QUOTA`, `RATE_LIMITED`, `UPSTREAM`, `BAD_INPUT`

Summaries are also saved in the key-value store under `OUTPUT`.

***

### Example output

Sample rows from a real owner run (public scrape data):

```json
[
  {
    "type": "item",
    "keyword": "nintendo switch oled",
    "itemId": "137263795153",
    "title": "Nintendo Switch OLED Console Gray 32GB Good Condition",
    "soldPrice": 189.95,
    "currency": "USD",
    "shipping": 0,
    "shippingType": "free",
    "totalPrice": 189.95,
    "soldDate": "2026-07-09",
    "condition": "Pre-Owned",
    "conditionId": 3000,
    "url": "https://www.ebay.com/itm/137263795153",
    "image": "https://i.ebayimg.com/images/g/JYUAAeSw31xq29n5/s-l1600.webp",
    "sellerUsername": "shopcelldeals",
    "sellerFeedbackPercent": 99.7,
    "sellerFeedbackScore": 241500,
    "bestOfferAccepted": null,
    "buyingFormat": "buyItNow",
    "bidCount": null,
    "itemLocation": "United States",
    "marketplace": "ebay.com",
    "provider": "compsniper",
    "scrapedAt": "2026-11-06T16:45:33.099801+00:00"
  },
  {
    "type": "summary",
    "keyword": "nintendo switch oled",
    "marketplace": "ebay.com",
    "provider": "compsniper",
    "currency": "USD",
    "count": 50,
    "median": 187.47,
    "average": 199,
    "min": 33,
    "max": 448.48,
    "p25": 153.46,
    "p75": 235.49,
    "avgShipping": 9.61,
    "firstSoldDate": "2026-04-12",
    "lastSoldDate": "2026-11-06",
    "otherCurrencyCount": 0,
    "historyInterval": "week",
    "priceHistory": [
      {
        "period": "2026-11-02",
        "count": 46,
        "median": 182.5,
        "average": 190.51,
        "min": 33,
        "max": 410.16
      }
    ],
    "requestsUsed": 2,
    "filters": {
      "condition": "any",
      "maxItems": 50
    },
    "warnings": []
  }
]
```

### 💰 Pricing

Pay per event:

| Event | Price |
|-------|-------|
| Actor start | **$0.0001** per start, charged once per GB of run memory |
| Dataset result | **$0.00003** per item (each sold item, summary row or error row) |

**Memory:** the default is **512 MB**, which bills a single start event. The Actor is a lightweight API client and never needs more than 2048 MB (the maximum), so raising memory only adds start events without making runs faster.

Example: a default run with `maxItems: 50` writes 50 sold items + 1 summary row ≈ 1 × $0.0001 + 51 × $0.00003 ≈ **$0.0016**.

***

### 🔑 RapidAPI key

The Actor works out of the box with the publisher's RapidAPI key. For large or frequent jobs, pass your own key in `rapidApiKey` (you must be subscribed to the selected provider on RapidAPI) so you use your own quota.

***

### 📝 Notes

- Best Offer sales: `soldPrice` is usually the listed price (the private accepted offer is not public). `bestOfferAccepted` flags them.
- Stats use the most common currency for a keyword.
- Not affiliated with eBay. Always sanity-check comps before making pricing decisions.
- Heavy users should bring their own RapidAPI key (see above).

***

### 📚 Resources

- [CompSniper eBay Sold Listings (RapidAPI)](https://rapidapi.com/compsniper/api/compsniper-ebay-sold-listings)
- [eBay Sold Items Listing API (RapidAPI)](https://rapidapi.com/caffeindev/api/ebay-sold-items-listing-api)
- [Apify documentation](https://docs.apify.com)

***

### Support

Questions or feature requests? Open an issue or contact via the Apify Console.

# Actor input Schema

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

One search per entry. eBay minus-sign exclusions work, e.g. "airpods pro 2 -case -box".

## `marketplace` (type: `string`):

Prices come back in that site's currency.

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

Filter sold items by condition (applied by the provider).

## `categoryId` (type: `string`):

Optional eBay category ID (e.g. 9355 = Cell Phones). Applied upstream by providers that support it (caffeindev); otherwise ignored with a warning.

## `dateFrom` (type: `string`):

Optional. eBay exposes roughly the last 90 days of sales.

## `dateTo` (type: `string`):

Optional. Inclusive upper bound on the sold date.

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

Optional minimum sold price, in the marketplace currency.

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

Optional maximum sold price, in the marketplace currency.

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

Maximum sold items returned per keyword.

## `maxRequestsPerKeyword` (type: `integer`):

Hard cap on RapidAPI calls (1 call = 1 page of up to 240 items). Protects your RapidAPI quota.

## `historyInterval` (type: `string`):

Bucket size for the price-history series in the summary row.

## `includeItems` (type: `boolean`):

Turn off to get only the summary/price-history row per keyword.

## `provider` (type: `string`):

RapidAPI provider used to fetch sold listings.

## `rapidApiKey` (type: `string`):

Use your own RapidAPI key and quota. You must be subscribed to the selected provider on RapidAPI.

## Actor input object example

```json
{
  "keywords": [
    "nintendo switch oled"
  ],
  "marketplace": "ebay.com",
  "condition": "any",
  "maxItems": 100,
  "maxRequestsPerKeyword": 3,
  "historyInterval": "week",
  "includeItems": true,
  "provider": "compsniper"
}
```

# Actor output Schema

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

Sold listings, summary rows and any errors stored in the 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 = {
    "keywords": [
        "nintendo switch oled"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lomo-dev/ebay-sold-listings-price-history").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": ["nintendo switch oled"] }

# Run the Actor and wait for it to finish
run = client.actor("lomo-dev/ebay-sold-listings-price-history").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": [
    "nintendo switch oled"
  ]
}' |
apify call lomo-dev/ebay-sold-listings-price-history --silent --output-dataset

```

## MCP server setup

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

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/nZzIiIKT3hRge3Ltv/builds/I4NmXhQavWMf3LGtN/openapi.json
