# eBay Sold Listings Search (`caffein.dev/ebay-sold-listings`) Actor

Get confirmed eBay sold prices. Search by keyword across 8 marketplaces, filter by date range, and export clean structured data for comps, resale pricing, and market research.

- **URL**: https://apify.com/caffein.dev/ebay-sold-listings.md
- **Developed by:** [Caffein Dev](https://apify.com/caffein.dev) (community)
- **Categories:** E-commerce, Automation, Developer tools
- **Stats:** 3,059 total users, 598 monthly users, 89.3% runs succeeded, 50 bookmarks
- **User rating**: 4.38 out of 5 stars

## Pricing

from $2.50 / 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?

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 Sold Listings API (Real Sold Items Only)

Fetch **real sold listings from eBay** — actual completed sales with final prices.
This Actor returns **sold items only**, not active listings and **not completed-but-unsold items**.

Built for **price analysis, resale tools, market research, and pricing intelligence**.

***

### 🔎 What This API Provides

This Apify Actor extracts **eBay sold listings** and returns structured, machine-readable data for each sale:

- Final sold price
- Currency
- Sale end date
- Listing title
- Item URL
- Item ID

✅ **Every result represents an item that actually sold**
❌ No active listings
❌ No unsold “completed” listings
❌ No estimated or AI-generated prices

***

### ⚙️ Input

```json
{
    "keywords": ["rtx 4080", "rtx 4090"],
    "categoryId": "58058", // any eBay category ID; "0" = All Categories
    "subcategoryId": "", // any eBay subcategory ID; overrides categoryId when set
    "daysToScrape": 30,
    "count": 100,
    "ebaySite": "ebay.com",
    "sortOrder": "endedRecently",
    "minPrice": 100,
    "maxPrice": 500,
    "itemLocation": "default",
    "itemCondition": "any"
}
```

| Field                      | Type     | Default         | Description                                                                                                                                                                                                                                                                                                                            |
| -------------------------- | -------- | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `keywords`                 | string\[] | **required**    | 1–6 search terms. Each runs as a separate search with the same filters. Results are tagged with `keyword` for easy filtering.                                                                                                                                                                                                          |
| `keyword`                  | string   | —               | **Deprecated.** Use `keywords` array instead. Accepted for backward compatibility.                                                                                                                                                                                                                                                     |
| `search`                   | string   | —               | **Deprecated.** Alias for `keyword`. Use `keywords` array instead. Accepted for backward compatibility with callers that send `search`. Backslash-escaped quotes (`\"`) in the value are unescaped before the search runs.                                                                                                             |
| `daysToScrape`             | number   | `30`            | Days back to scrape (1–90)                                                                                                                                                                                                                                                                                                             |
| `count`                    | number   | `100`           | Max results per keyword                                                                                                                                                                                                                                                                                                                |
| `categoryId`               | string   | `"0"`           | Main category filter — accepts **any** eBay category ID as free text (maps to `_sacat`). Use `"0"` for All Categories. Look up IDs at [sold-comps.com/ebay-categories](https://sold-comps.com/ebay-categories).                                                                                                                          |
| `subcategoryId`            | string   | `""`            | Optional subcategory filter — accepts **any** eBay subcategory ID as free text (maps to `_sacat`). If set, overrides `categoryId`. Look up IDs at [sold-comps.com/ebay-categories](https://sold-comps.com/ebay-categories).                                                                                                              |
| `ebaySite`                 | string   | `ebay.com`      | eBay marketplace (see supported sites)                                                                                                                                                                                                                                                                                                 |
| `sortOrder`                | string   | `endedRecently` | `endedRecently` · `timeNewlyListed` · `pricePlusPostageLowest` · `pricePlusPostageHighest` · `distanceNearest`                                                                                                                                                                                                                         |
| `minPrice`                 | number   | —               | Minimum sold price filter                                                                                                                                                                                                                                                                                                              |
| `maxPrice`                 | number   | —               | Maximum sold price filter                                                                                                                                                                                                                                                                                                              |
| `itemLocation`             | string   | `default`       | `default` · `domestic` · `worldwide`                                                                                                                                                                                                                                                                                                   |
| `itemCondition`            | string   | `any`           | `any` · `new` · `used`                                                                                                                                                                                                                                                                                                                 |
| `includeCompletedListings` | boolean  | `true`          | Include eBay's Completed Listings filter. Enables accurate Best Offer Accepted detection (`listingType`, `isBestOfferAccepted`). Set to `false` for strictly sold-only results — BOA items will show as `buy_it_now`. See [Completed Listings & Best Offer Accepted Detection](#completed-listings-and-best-offer-accepted-detection). |

#### Supported eBay Sites

`ebay.com` · `ebay.co.uk` · `ebay.de` · `ebay.fr` · `ebay.it` · `ebay.es` · `ebay.ca` · `ebay.com.au`

***

### 📤 Output

```json
{
    "itemId": "306671421088",
    "url": "https://www.ebay.com/itm/306671421088",
    "title": "Apple iPhone 13 Pro Max - 128GB - Unlocked - Cracked Back",
    "condition": "Pre-Owned",
    "conditionId": 3000,
    "endedAt": "2025-12-22T05:00:00.000Z",
    "soldPrice": "215",
    "soldCurrency": "USD",
    "listingType": "buy_it_now",
    "isBestOfferAccepted": false,
    "buyingFormat": "buyItNow",
    "bidCount": null,
    "shippingPrice": "6.20",
    "shippingCurrency": "USD",
    "shippingType": "paid",
    "totalPrice": "221.20",
    "thumbnailUrl": "https://i.ebayimg.com/thumbs/images/g/abc123/s-l500.jpg",
    "fullResThumbnailUrl": "https://i.ebayimg.com/images/g/abc123/s-l1600.jpg",
    "sellerUsername": "example_seller",
    "sellerPositivePercent": 99.2,
    "sellerFeedbackScore": 1842,
    "sellerType": null,
    "scrapedAt": "2026-01-19T21:53:17.613Z"
}
```

| Field                   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `itemId`                | eBay item ID                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `url`                   | Full listing URL                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `title`                 | Listing title                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `condition`             | Localized eBay condition label as shown on the search card (e.g. `"Pre-Owned"` on ebay.com, `"Gebraucht"` on ebay.de, `"Neuf"` on ebay.fr, `"Nuovo"` on ebay.it, `"Usado"` on ebay.es). `null` when eBay didn't display one. This is the authoritative field — what the buyer actually saw.                                                                                                                                                                                                                                                                                                                                      |
| `conditionId`           | Best-effort numeric eBay condition ID resolved from `condition` via a static lookup table. `null` when `condition` is `null` or the label isn't in the lookup table (eBay can introduce new or locale-specific labels at any time — always check `condition` first). Common IDs: `1000` New · `1500` Open box / New Other · `1750` New with defects · `2000`–`2030` Refurbished tiers (Certified / Excellent / Very Good / Good) · `2500` Seller Refurbished · `2750` Like New · `3000` Used / Pre-Owned · `7000` For parts. [Full reference](https://developer.ebay.com/api-docs/sell/static/metadata/condition-id-values.html) |
| `categoryId`            | Category id used for the search (`_sacat`)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `category`              | Selected category label from the search page dropdown                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `endedAt`               | Sale completion timestamp (ISO 8601)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `soldPrice`             | Final transaction price. **Note:** when `isBestOfferAccepted` is `true`, this is the *asking* price — the actual accepted offer is not disclosed by eBay.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `soldCurrency`          | Currency code (e.g. `USD`, `GBP`)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `listingType`           | How the item sold: `"best_offer_accepted"` · `"buy_it_now"` · `"auction"` · `null` (undetermined)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `isBestOfferAccepted`   | `true` if sold via an accepted Best Offer. `soldPrice` is the asking price, not the actual transaction price.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `buyingFormat`          | Richer buying-format enum: `"auction"` (bids only) · `"buyItNow"` (fixed price or best-offer) · `"auctionWithBIN"` (auction with a Buy It Now option) · `null` (undetermined)                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `bidCount`              | Number of bids received. `null` for fixed-price listings or when not shown.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `shippingPrice`         | Shipping cost (`null` if not disclosed)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `shippingCurrency`      | Currency of shipping price                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `shippingType`          | `free` · `paid` · `pickup` · `unknown`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `totalPrice`            | `soldPrice + shippingPrice` when currencies match, otherwise equals `soldPrice`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `thumbnailUrl`          | 500px product image URL from `i.ebayimg.com`. `null` when only a promo or logo image is available on the search card.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `fullResThumbnailUrl`   | High-res (1600px) product image URL, derived from `thumbnailUrl`. `null` when no product image is available. Best-effort — may 404 for listings where eBay only hosts a low-res image.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `sellerUsername`        | Seller username (best-effort)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `sellerPositivePercent` | Positive feedback % (best-effort)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `sellerFeedbackScore`   | Feedback count (best-effort)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `sellerType`            | `"private"` or `"business"` on EU sites (`ebay.de`, `.fr`, `.it`, `.es`). `null` on non-EU sites or when the label is unrecognised.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `scrapedAt`             | Scrape timestamp (ISO 8601)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |

***

### 🏷️ Completed Listings & Best Offer Accepted Detection

The `includeCompletedListings` input (default `true`) controls whether eBay's **Completed Listings** filter (`LH_Complete=1`) is sent alongside the always-present **Sold** filter (`LH_Sold=1`).

**All results are genuinely sold items regardless of this setting** — the `LH_Sold=1` filter is always applied, so the actor never returns active or completed-but-unsold listings. This flag does **not** affect the sold/unsold guarantee; it only affects how accurately the actor can classify *how* an item sold.

#### Why the flag exists — an eBay HTML limitation

This is a limitation of eBay's own HTML, not a choice the actor makes. eBay only renders the signals needed to identify a **Best Offer Accepted** sale when the Completed Listings filter is active:

| Signal on the search card | `includeCompletedListings: true` (`LH_Complete=1`) | `includeCompletedListings: false` (`LH_Complete=0`) |
| ------------------------- | -------------------------------------------------- | --------------------------------------------------- |
| Best-offer text           | `"Best offer accepted"`                            | `"or Best Offer"` (or nothing)                      |
| Price CSS class           | `strikethrough`                                    | `bold`                                              |
| BOA detectable?           | ✅ Yes                                             | ❌ No                                               |

When `LH_Complete=0`, eBay strips the `"Best offer accepted"` text and the `strikethrough` price styling from the cards. Without those signals, a Best Offer Accepted sale is **indistinguishable in the HTML** from an ordinary Buy It Now sale — **the actor cannot accurately detect Best Offer Accepted status for each listing.**

#### What this means for the output

- **`includeCompletedListings: true` (default):** Best Offer Accepted sales are detected. `listingType` can be `"best_offer_accepted"` and `isBestOfferAccepted` can be `true`. (Note: even here, eBay does not disclose the *actual* accepted offer amount — `soldPrice` reflects the asking price for BOA items.)
- **`includeCompletedListings: false`:** BOA sales are reported as `listingType: "buy_it_now"` with `isBestOfferAccepted: false`. You still get every sold item and its sold price — you just lose the ability to know whether a given sale went through as an accepted Best Offer.

Set `includeCompletedListings: false` only if you want the search filter to match eBay's plain "Sold" view and don't rely on Best Offer Accepted classification.

***

### 👥 Who This API Is For

- Developers building pricing APIs or resale tools
- Data analysts and researchers
- Professional resellers and flippers
- SaaS founders validating secondary market prices

***

### 📞 Support & Feedback

For issues, questions, or feature requests, please contact the Actor author via Apify.

***

### Category IDs & Subcategory IDs

Both `categoryId` and `subcategoryId` are free-text fields — you can pass **any** eBay category or subcategory ID, not just ones from a preset list. The ID is passed straight through to eBay's `_sacat` search parameter, so any ID eBay recognizes will work. When `subcategoryId` is set it overrides `categoryId` — the output always reflects the effective category used.

Not sure which ID to use? We maintain a full, searchable list of every eBay category and subcategory ID:

**[🔍 Browse & search all category IDs and subcategory IDs →](https://sold-comps.com/ebay-categories)**

***

# Actor input Schema

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

One or more search keywords. Each keyword runs as a separate search with the same filters applied to all.

## `keyword` (type: `string`):

Single search keyword. Deprecated: use the 'keywords' array field instead.

## `search` (type: `string`):

Deprecated: alias for the single-keyword `keyword` field. Use the `keywords` array instead. Accepted for backward compatibility with callers that send `search`. Backslash-escaped quotes (") in the value are unescaped before the search runs.

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

eBay category ID — maps directly to the `_sacat` URL parameter. Enter ANY eBay category ID as free text; you are not limited to a preset list. Use "0" (the default) for All Categories. Don't know the ID? We maintain the full, up-to-date list of category & subcategory IDs at https://sold-comps.com/ebay-categories

## `subcategoryId` (type: `string`):

Optional eBay subcategory ID — also maps to `_sacat`. Enter ANY subcategory ID as free text. When set, it overrides the Category field above. Leave blank to search at the category level. Full ID reference: https://sold-comps.com/ebay-categories. The output record's `categoryId` / `category` fields reflect the effective category actually used for the search.

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

eBay site to scrape from

## `daysToScrape` (type: `integer`):

Number of days back to scrape sold listings (default: 30)

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

Number of listings to scrape (default: 100)

## `sortOrder` (type: `string`):

Sort order for the sold search results page.

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

Minimum sold price filter (search-page filter).

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

Maximum sold price filter (search-page filter).

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

Search-page buying format filter.

## `itemLocation` (type: `string`):

Search-page item location filter.

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

Search-page condition filter.

## `conditionId` (type: `integer`):

Numeric eBay condition ID — overrides itemCondition when set.

## `aspectFilter` (type: `object`):

eBay aspect facet filters, e.g. {"Brand": "Nike"}. Keys and values are double-encoded per eBay's convention.

## `includeCompletedListings` (type: `boolean`):

When true (default), includes eBay's Completed Listings filter alongside the Sold filter. This enables accurate detection of 'Best Offer Accepted' listings via the listingType and isBestOfferAccepted fields. When false, uses only the Sold filter — all results are guaranteed sold items, but Best Offer Accepted items will appear as regular 'buy\_it\_now' with the asking price shown as soldPrice.

## Actor input object example

```json
{
  "keywords": [
    "rtx 4080"
  ],
  "categoryId": "0",
  "subcategoryId": "",
  "ebaySite": "ebay.com",
  "daysToScrape": 30,
  "count": 100,
  "sortOrder": "endedRecently",
  "buyingFormat": "all",
  "itemLocation": "default",
  "itemCondition": "any",
  "includeCompletedListings": true
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `overview` (type: `string`):

No description

## `summary` (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": [
        "rtx 4080"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("caffein.dev/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": ["rtx 4080"] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,caffein.dev/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/oTtB3VgfuE9GtxQt2/builds/RU325709MV1HftLaY/openapi.json
