# eBay Sold Listings Scraper - Real Sold Prices & Comps (`lulzasaur/ebay-sold-scraper`) Actor

Scrape eBay SOLD listings (sold comps) — real transaction prices, sold dates, condition, shipping, seller and images for any keyword. Auto-parses PSA/BGS/CGC/SGC card grades from titles. Uses residential proxies to beat Akamai anti-bot. Filter by sold date, price range, category and condition.

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

## Pricing

from $6.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 Scraper — Real Sold Prices & Comps

Scrape **eBay SOLD listings** (sold comps) for any keyword and get the data that actually matters for pricing: **real transaction prices and sold dates**, not asking prices. Built for resellers, card flippers, collectibles dealers, and anyone who needs accurate comps.

### What you get per sold item

| Field | Description |
|-------|-------------|
| `itemId` | eBay item id |
| `listingUrl` | Direct link to the sold listing |
| `title` | Listing title |
| `soldPrice` | Final sold price (number) |
| `currency` | Currency code (USD, GBP, EUR, CAD, AUD) |
| `soldDate` | ISO date the item sold (parsed from "Sold Mon DD, YYYY") |
| `condition` | Item condition caption |
| `shippingPrice` | Shipping cost (0 if free) |
| `totalPrice` | Sold price + shipping |
| `listingType` | auction / buy-it-now / best-offer (when detectable) |
| `imageUrl` | Thumbnail image |
| `seller` | Seller username (when present) |
| `gradingCompany` | PSA / BGS / CGC / SGC parsed from the title |
| `grade` | Numeric grade (e.g. 10, 9.5) parsed from the title |
| `certNumber` | Grading cert number parsed from the title (when present) |
| `searchQuery` | The keyword that produced this row |
| `scrapedAt` | ISO timestamp of the scrape |

The PSA/BGS/CGC/SGC parsing makes graded-card comps directly joinable with population reports and arbitrage tools.

### Input

```json
{
  "searchQueries": ["charizard psa 10 base set", "rolex submariner 16610"],
  "daysToScrape": 30,
  "maxResults": 60,
  "itemsPerPage": 240,
  "proxyConfiguration": { "useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"] }
}
````

- **searchQueries** — keywords to search.
- **daysToScrape** — only keep items sold in the last N days (1–90; eBay keeps ~90 days of sold data).
- **maxResults** — cap per keyword.
- **category** — optional eBay category id (`_sacat`).
- **condition** — optional condition filter (`LH_ItemCondition`).
- **minPrice / maxPrice** — optional sold-price range (`_udlo` / `_udhi`).
- **itemsPerPage** — 60, 120, or 240 (larger = fewer page loads = fewer proxy hits).

### Anti-bot

eBay protects search with **Akamai Bot Manager** (TLS/JA3 + HTTP/2 fingerprinting + IP reputation). Datacenter IPs get HTTP 403 after roughly one request. This actor uses **real Chromium (Playwright) + Apify RESIDENTIAL proxies** with rotating sessions, sequential pagination, and throttling to stay under the radar. **Residential proxies are required** — run it on the Apify platform.

### Notes

- The sold price and sold date come straight from eBay's server-rendered HTML, so no extra page loads per item.
- Results are sorted recently-ended, so the actor stops paginating a query once it passes your `daysToScrape` cutoff.
- Promotional "Shop on eBay" placeholder cards are filtered out automatically.

# Actor input Schema

## `searchQueries` (type: `array`):

Keywords to search eBay sold listings for (e.g. 'charizard psa 10 base set', 'iphone 14 pro 256gb')

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

Only keep items sold within the last N days (eBay retains ~90 days of sold data).

## `maxResults` (type: `integer`):

Maximum number of sold items to return per keyword.

## `category` (type: `string`):

eBay category ID to restrict the search to (maps to \_sacat). Leave empty for all categories.

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

Filter by condition (maps to LH\_ItemCondition). Leave empty for all conditions.

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

Only keep items sold at or above this price (maps to \_udlo).

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

Only keep items sold at or below this price (maps to \_udhi).

## `itemsPerPage` (type: `string`):

eBay page size (60, 120 or 240). Larger = fewer page loads = fewer proxy hits.

## `proxyConfiguration` (type: `object`):

Proxy settings. RESIDENTIAL proxies are REQUIRED — eBay uses Akamai Bot Manager which blocks datacenter IPs with HTTP 403 after ~1 request.

## Actor input object example

```json
{
  "searchQueries": [
    "charizard psa 10 base set"
  ],
  "daysToScrape": 30,
  "maxResults": 60,
  "condition": "",
  "itemsPerPage": "240",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# 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 = {
    "searchQueries": [
        "charizard psa 10 base set"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("lulzasaur/ebay-sold-scraper").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 = { "searchQueries": ["charizard psa 10 base set"] }

# Run the Actor and wait for it to finish
run = client.actor("lulzasaur/ebay-sold-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "searchQueries": [
    "charizard psa 10 base set"
  ]
}' |
apify call lulzasaur/ebay-sold-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=lulzasaur/ebay-sold-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "eBay Sold Listings Scraper - Real Sold Prices & Comps",
        "description": "Scrape eBay SOLD listings (sold comps) — real transaction prices, sold dates, condition, shipping, seller and images for any keyword. Auto-parses PSA/BGS/CGC/SGC card grades from titles. Uses residential proxies to beat Akamai anti-bot. Filter by sold date, price range, category and condition.",
        "version": "1.0",
        "x-build-id": "GGn01tXQ6LewKOKkG"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/lulzasaur~ebay-sold-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-lulzasaur-ebay-sold-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/lulzasaur~ebay-sold-scraper/runs": {
            "post": {
                "operationId": "runs-sync-lulzasaur-ebay-sold-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/lulzasaur~ebay-sold-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-lulzasaur-ebay-sold-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "searchQueries": {
                        "title": "Search Keywords",
                        "type": "array",
                        "description": "Keywords to search eBay sold listings for (e.g. 'charizard psa 10 base set', 'iphone 14 pro 256gb')",
                        "default": [
                            "charizard psa 10 base set"
                        ],
                        "items": {
                            "type": "string"
                        }
                    },
                    "daysToScrape": {
                        "title": "Days To Scrape",
                        "minimum": 1,
                        "maximum": 90,
                        "type": "integer",
                        "description": "Only keep items sold within the last N days (eBay retains ~90 days of sold data).",
                        "default": 30
                    },
                    "maxResults": {
                        "title": "Max Results per Query",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of sold items to return per keyword.",
                        "default": 60
                    },
                    "category": {
                        "title": "Category ID (optional)",
                        "type": "string",
                        "description": "eBay category ID to restrict the search to (maps to _sacat). Leave empty for all categories."
                    },
                    "condition": {
                        "title": "Item Condition (optional)",
                        "enum": [
                            "",
                            "1000",
                            "1500",
                            "2000",
                            "2500",
                            "3000",
                            "4000",
                            "5000",
                            "6000",
                            "7000"
                        ],
                        "type": "string",
                        "description": "Filter by condition (maps to LH_ItemCondition). Leave empty for all conditions.",
                        "default": ""
                    },
                    "minPrice": {
                        "title": "Minimum Price (optional)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only keep items sold at or above this price (maps to _udlo)."
                    },
                    "maxPrice": {
                        "title": "Maximum Price (optional)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Only keep items sold at or below this price (maps to _udhi)."
                    },
                    "itemsPerPage": {
                        "title": "Items Per Page",
                        "enum": [
                            "60",
                            "120",
                            "240"
                        ],
                        "type": "string",
                        "description": "eBay page size (60, 120 or 240). Larger = fewer page loads = fewer proxy hits.",
                        "default": "240"
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy settings. RESIDENTIAL proxies are REQUIRED — eBay uses Akamai Bot Manager which blocks datacenter IPs with HTTP 403 after ~1 request.",
                        "default": {
                            "useApifyProxy": true,
                            "apifyProxyGroups": [
                                "RESIDENTIAL"
                            ]
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
