# eBay Sold Comps (`hostz/ebay-resale-comps-exporter`) Actor

Build price comparisons from recent eBay sales. Export sold prices, sale dates, item condition, images and product links as structured records for research and spreadsheets.

- **URL**: https://apify.com/hostz/ebay-resale-comps-exporter.md
- **Developed by:** [Chandler Hostetler](https://apify.com/hostz) (community)
- **Categories:** E-commerce, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 75.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.50 / 1,000 sold listings

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 Resale Comps Exporter

Turn a product search into a dataset of recently sold eBay listings. Compare asking strategies against recorded sales, build a spreadsheet of comparable items, or send sale records into your own research workflow.

This Actor collects sold search results. It does not create or manage listings, access an eBay account, or estimate an item's value with AI.

### Cost per returned listing

The price is **$3.50 for 1,000 returned listings**: **$0.0035 for each record saved to the default dataset**. A run returning 100 listings costs $0.35; 240 listings cost $0.84. There is no separate Actor-start charge. An empty result set has no listing charge.

Your requested count is a limit, not a billed reservation. Apify's run options show the applicable pricing and let you set a spending limit.

### Run your first search

Enter a specific product phrase, choose a maximum result count and select how far back to look for sales. For example:

```json
{
  "query": "Sony WH-1000XM5 headphones",
  "count": 20,
  "daysToScrape": 30,
  "maxWaitSeconds": 900
}
```

| Setting | Purpose | Limits |
| --- | --- | --- |
| `query` | Product phrase to search on eBay | Required; 2–100 characters |
| `count` | Maximum listings to save | 1–240; defaults to 100 |
| `daysToScrape` | Include sales within this many days | 1–90; defaults to 30 |
| `maxWaitSeconds` | Total time allowed for processing and available capacity | 60–3600 seconds; defaults to 900 |

Use a longer run timeout in Apify as well when increasing `maxWaitSeconds` beyond the default. Results without a readable sold date are excluded from the date window.

### The records you receive

Each result represents a sold-listing search card. The dataset exposes these columns:

| Column | Contents |
| --- | --- |
| `itemId`, `title` | Listing identifier and displayed product title |
| `soldPrice`, `currency` | Parsed sale price and currency code |
| `soldDate` | Parsed sale date |
| `condition` | Condition text shown in the result |
| `url`, `imageUrl` | Links to the listing and its image |
| `searchQuery`, `scrapedAt` | Search phrase and collection time |
| `marketplace` | `ebay` |
| `raw` | Original card text used for the parsed values |

Missing source fields remain `null`. Sold listings are comparable observations, not proof that products have the same model, accessories, condition or transaction terms. Review those differences before making a pricing decision.

You can download results using Apify's dataset exports or retrieve them through the Apify API. The Actor also writes a small `OUTPUT` record containing the completion status and number of results.

### What to expect during a run

Small searches generally finish in 30–120 seconds. Searches spanning several pages commonly take 2–6 minutes. Shared processing capacity, website response times and retries can extend those times.

There may be fewer results than requested. Common reasons include a narrow date window, fewer matching sales, unreadable dates, repeated listings across pages, or a later result page becoming unavailable. Valid results from earlier pages are preserved if a later page cannot be collected after retries. If the first page fails, the run reports a failure rather than inventing data.

For a zero-result search, try a broader product phrase or date window. If processing capacity is temporarily full, the Actor waits and retries within `maxWaitSeconds`; retry later if that limit is exhausted.

### Credentials, privacy and support

You do not need to supply an eBay password, cookies or an eBay API key. Processing uses a hosted collection service. Your search phrase, public listing data and operational diagnostics may be processed there to complete and troubleshoot the run. Results are saved in your Apify dataset under your account's retention settings. Avoid entering private or confidential information in a search.

Use the Actor's Issues tab for support. Include the run ID, input and the observed problem, without passwords, tokens or cookies.

This tool is independently provided and has no affiliation with or endorsement from eBay. Website changes and availability can affect its output. Use it in accordance with applicable law and the relevant platform and source website terms.

# Actor input Schema

## `query` (type: `string`):

The exact search phrase to send to eBay.

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

Maximum number of sold listing cards to return. You are charged only for items actually returned.

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

Only return listings with a parsed sold date within this many days. Listings without a parseable date are excluded.

## `maxWaitSeconds` (type: `integer`):

Maximum total seconds the Actor waits for available capacity and result processing.

## Actor input object example

```json
{
  "query": "Mario Kart 8 Deluxe Nintendo Switch",
  "count": 5,
  "daysToScrape": 30,
  "maxWaitSeconds": 240
}
```

# 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 = {
    "query": "Mario Kart 8 Deluxe Nintendo Switch",
    "count": 5,
    "maxWaitSeconds": 240
};

// Run the Actor and wait for it to finish
const run = await client.actor("hostz/ebay-resale-comps-exporter").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 = {
    "query": "Mario Kart 8 Deluxe Nintendo Switch",
    "count": 5,
    "maxWaitSeconds": 240,
}

# Run the Actor and wait for it to finish
run = client.actor("hostz/ebay-resale-comps-exporter").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 '{
  "query": "Mario Kart 8 Deluxe Nintendo Switch",
  "count": 5,
  "maxWaitSeconds": 240
}' |
apify call hostz/ebay-resale-comps-exporter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hostz/ebay-resale-comps-exporter"
        }
    }
}
```

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/OcPnWxE82cqxReixy/builds/wbiL1rwXpBiy320v0/openapi.json
