# eBay Sold Price History: Monthly Median (`compsapi/ebay-sold-price-history`) Actor

Median eBay sold price per month or week for up to 3 years, with quartiles and sale counts. Track how resale prices move for any item: LEGO sets, watches, cards, sneakers, electronics.

- **URL**: https://apify.com/compsapi/ebay-sold-price-history.md
- **Developed by:** [Sam Smith](https://apify.com/compsapi) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.25 / 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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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 Price History: Monthly Median Prices for up to 3 Years

A time series of real eBay sold prices for any item: **one row per month (or week)** with the median sold price, quartiles, min, max and the number of sales, going back up to **3 years**. Ready to chart in Google Sheets, Excel or your own dashboard. eBay's own sold search only shows 90 days.

### Why a single number over a long window misleads

We pulled `rolex datejust 16220` two ways:

| Window | Median sold price |
|---|---|
| Last 90 days | **$435.56** |
| Last 3 years | **$4,400.00** |

The market did not drop 90%. The 90 day result was dominated by straps, bezels and parts, and the 3 year result picked up 62 older sales of the watch itself. One number over one window tells you about the *mix of listings*, not the price. A month by month series shows you both: the level, and whether a strange month is a market move or a change in what matched.

### What you get

One row per keyword per period, oldest first:

```json
{
  "keyword": "lego 75192",
  "interval": "month",
  "period_start": "2026-06-01",
  "period_end": "2026-06-30",
  "partial_period": false,
  "sales": 95,
  "median": 670.3,
  "p25": 519.57,
  "p75": 726.38,
  "min": 325,
  "max": 918.53,
  "outliers_removed": 0,
  "sampled": true
}
```

- `sales` is how many sales the statistics use.
- `sampled: true` means the period had more sales than fit in one pass, so the figures describe the newest ~240 sales of that period. For a trend line this is plenty.
- `partial_period: true` marks the current month or week, which is still filling.

### Set a minimum price. It is the single biggest fix

The same words match parts, manuals and minifigures. Here is June 2026 for `lego 75192`, measured both ways:

| Setting | Median | Lower quartile |
|---|---|---|
| `condition: new`, no price floor | $257.50 | $31.54 |
| `minPrice: 300` | **$670.30** | $519.57 |

Without the floor, the median swung from $574 to $257 between May and June because the mix of minifigure sales changed, not the price of the set. With it, the six months from May to October 2026 read $695, $670, $630, $681, $710, $711: a steady market. If `p25` sits far below the median, raise `minPrice`.

### Input

| Field | Description |
|---|---|
| `keywords` | One item per line, as specific as you can: `lego 75192`, `rolex datejust 16220`, `nintendo switch oled`. |
| `interval` | `month` (default) or `week`. |
| `periods` | How many months or weeks back. Default 12. Up to 36 months or 157 weeks. |
| `condition` | `any`, `new`, `open_box`, `refurbished`, `used`, `parts`. |
| `minPrice` / `maxPrice` | Recommended. Ignore sales outside this range, see above. |
| `matchAllWords` | On by default: every word of your search must be in the title. |
| `mustInclude` | Extra words every title must contain. |
| `keepJunk` | Off by default: listings that are not the item itself are removed before the statistics. |

### What people use it for

- **Is this going up or down?** Retired LEGO sets, watches, sneakers, cards, consoles, cameras.
- **Seasonality.** Last December's price for a toy, last summer's for a bike.
- **Buying decisions** on lots and inventory, priced against the trend rather than one recent sale.
- **Charts and newsletters**: the output drops straight into a line chart.

### Cost

You pay per row, and one row is one month (or week) of one keyword. A 12 month history for one item is 12 rows.

### Related Actors

- [eBay Sold Listings: 3 Years of History](https://apify.com/compsapi/ebay-sold-listings-history) returns every individual sale behind these numbers.
- [eBay Card Comps](https://apify.com/compsapi/ebay-card-comps) for graded trading cards by grader and grade.
- [eBay Best Offer Price Checker](https://apify.com/compsapi/ebay-best-offer-prices) for what buyers actually paid on accepted offers.

### FAQ

**How far back?** 3 years, 36 months or 157 weeks.

**Are Best Offer sales at the right price?** Yes. Accepted offers count at the amount the buyer paid, not the asking price.

**Can I get this from my own code?** Yes, through the Apify API, or as a REST API at [compsapi.com](https://compsapi.com/?utm_source=apify\&utm_medium=actor\&utm_campaign=price-history) with a free tier.

Useful? A rating on this page helps others find it.

# Actor input Schema

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

One item per line, as specific as you can make it, for example lego 75192 or rolex datejust 16220.

## `interval` (type: `string`):

One row per calendar month or per Monday to Sunday week.

## `periods` (type: `integer`):

How many months or weeks back from today. Up to 36 months or 157 weeks (3 years).

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

Only sales in this condition.

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

Recommended. Ignore sales below this price, which removes parts, accessories, manuals and minifigures that match the same words. For lego 75192, 300 turns a $257 median into the real $670.

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

Ignore sales above this price.

## `mustInclude` (type: `array`):

Optional. Words or phrases every title must contain.

## `matchAllWords` (type: `boolean`):

On by default. eBay widens a search when it runs short of exact matches and returns similar items; this drops any sale whose title is missing one of your search words.

## `keepJunk` (type: `boolean`):

Off by default: listings that are not the item itself (boxes only, manuals, reprints, facsimiles, proxies, lots of unrelated items) are removed before you see or pay for them.

## Actor input object example

```json
{
  "keywords": [
    "lego 75192"
  ],
  "interval": "month",
  "periods": 12,
  "condition": "any",
  "matchAllWords": true,
  "keepJunk": false
}
```

# Actor output Schema

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

No description

# 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": [
        "lego 75192"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("compsapi/ebay-sold-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": ["lego 75192"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,compsapi/ebay-sold-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/3ADfxv90LOAEY30Fj/builds/0ZYjwhk5xwxESHCPH/openapi.json
