# eBay Sold Comps API: Build Pricing on Real Sold Data (2026)

> Use an eBay sold comps API to price items in your app: get up to 240 sold comps per request, read the median and middle range, clean the sample, and price a whole inventory in a loop.

Source: https://compsniper.com/guides/ebay-sold-comps-api

---

Developer guide

# eBay sold comps API: build pricing on real sold data

An eBay sold comps API returns recent completed sales as JSON so your app can price items from real sold data. With CompSniper, one request to `/v1/scrape?sold=true` returns up to 240 sold comps plus a summary (median, 25th and 75th percentile, count), which is everything a price suggestion needs.

By [Marc Andrew](https://compsniper.com/about) October 3, 2026 7 minute read

## Who uses a sold comps API

Most of the teams pulling sold data from CompSniper are builders, not casual sellers: pricing apps, repricers, inventory spreadsheets, card and video game price trackers, buy-box tools for stores and pawn shops, and AI agents that answer "what is this worth?". They search across electronics, video games, sports cards, Pokemon, coins, toys, LEGO and sneakers, often thousands of times a day.

What they need from a sold data API is simple: real completed sales, fast, in a stable JSON shape, with the math already done. That is what this guide builds.

## Price one item from its sold comps

Get a free key at [compsniper.com/signup](https://compsniper.com/signup), set `COMPSNIPER_API_KEY`, and turn sold comps into a price suggestion:

Python

```
import os
import requests

API = "https://api.compsniper.com/v1/scrape"
HEADERS = {"Authorization": f"Bearer {os.environ['COMPSNIPER_API_KEY']}"}

def sold_comps(keyword, site="ebay.com", **filters):
    r = requests.get(API, headers=HEADERS, timeout=75, params={
        "keyword": keyword, "ebaySite": site, "sold": "true",
        "count": 240, "relevance": "true", **filters})
    r.raise_for_status()
    return r.json()

def suggest_price(keyword, **filters):
    s = sold_comps(keyword, **filters).get("summary") or {}
    if not s or s["count"] < 5:
        return {"keyword": keyword, "price": None, "reason": "not enough sold comps"}
    return {"keyword": keyword, "price": s["median"], "low": s["p25"],
            "high": s["p75"], "comps": s["count"], "currency": s["currency"],
            "confidence": "high" if s["count"] >= 20 else "low"}

print(suggest_price("nintendo switch oled"))
# {'keyword': 'nintendo switch oled', 'price': 180, 'low': 159.99,
#  'high': 219.99, 'comps': 181, 'currency': 'USD', 'confidence': 'high'}
```

The output numbers are from a real ebay.com search collected on October 2, 2026. Prefer JavaScript? The [JavaScript and TypeScript guide](https://compsniper.com/guides/ebay-sold-listings-api-javascript) has the same request.

## Read the summary like a pricing analyst

| Field | Meaning | How to use it |
| --- | --- | --- |
| count | Sold comps with a usable price | Below about 20, show the price as low confidence |
| median | Middle sold price | Your default suggested price |
| p25 / p75 | 25th and 75th percentile | The realistic price range to show users |
| mean | Average sold price | Compare with the median; a big gap means outliers |
| min / max | Lowest and highest sale | Useful for sanity checks, not for pricing |
| avgShipping | Average shipping charged | Add or subtract when you compare delivered prices |
| currency | Main currency of the sample | Never mix USD and GBP comps |

The rows behind the summary are in `items`: sold price, shipping, sold date, condition, seller and a `bestOfferAccepted` flag. Show users a few of them next to your suggested price; seeing real sales builds more trust than a single number.

## Price a whole inventory

Loop over your items and write the results to a spreadsheet. One request per item, whatever the number of comps:

Python

```
import csv
import time

inventory = ["nintendo switch oled", "pokemon japanese pikachu 291 psa 10",
             "lego 75192 millennium falcon", "sony wh-1000xm5"]

with open("prices.csv", "w", newline="") as f:
    writer = csv.DictWriter(f, fieldnames=["keyword", "price", "low", "high",
                                           "comps", "currency", "confidence", "reason"])
    writer.writeheader()
    for keyword in inventory:
        try:
            writer.writerow(suggest_price(keyword))
        except requests.HTTPError as err:
            # 429/503: wait and retry later. Failed requests are not charged.
            writer.writerow({"keyword": keyword, "reason": str(err)})
        time.sleep(1)
```

For bigger runs, [bulk search](https://compsniper.com/docs/bulk-search) takes up to 20 keywords at once and the [Card Batch API](https://compsniper.com/docs/card-batch) is built for trading-card lists. Building inside Claude or Cursor? The [MCP server](https://compsniper.com/docs/mcp) gives an AI agent the same sold comps.

## Keep the comps clean

- **Search the exact item.** Model numbers, set and card number, storage and size belong in the keyword.
- **Filter condition.** `itemCondition=used` or `new`, or a specific `conditionId`.
- **Leave `relevance=true` on.** It removes accessories, parts, lots and wrong models before the summary. Our [100-product cleaning study](https://compsniper.com/research/ebay-sold-comps-cleaning-study) shows where it is strong and where to double-check.
- **Pick the right marketplace.** Set `ebaySite` for your user's country so prices come back in their currency.
- **Respect small samples.** Our [sample-size guide](https://compsniper.com/guides/how-many-ebay-sold-comps) explains when a median is trustworthy.

Why not build the scraper yourself?

eBay sold search needs signed-in sessions, rotating proxies and a parser that keeps up with markup changes. Our [URL parameters guide](https://compsniper.com/guides/ebay-sold-listings-url-parameters) shows the search behind each request; the hard part is fetching it reliably thousands of times a day. Failed requests are never charged.

## Sold comps API questions

**What is an eBay sold comps API?**

An API that returns recent completed eBay sales (comps) for a keyword as JSON, so software can price items from real sold data instead of a person checking the Sold filter by hand. CompSniper's GET /v1/scrape returns up to 240 sold comps per request with a price summary.

**Is there an official eBay sold data API?**

eBay's sold-data API, Marketplace Insights, is a Limited Release that is not open to new developers, and the old findCompletedItems call was shut down in February 2025. Most developers use a third-party sold data API instead.

**How much does a sold comps API cost?**

CompSniper starts free with 100 requests a month and no credit card. Paid plans are priced per request, not per sold item, so a request that returns 240 comps costs the same as one that returns 10.

**How fresh is the sold data?**

Each request searches recent eBay sold listings, roughly the last 90 days, and returns the newest sales first.

**Can I get sold comps for the UK, Germany or Australia?**

Yes. Set ebaySite to ebay.co.uk, ebay.de, ebay.fr, ebay.it, ebay.es, ebay.ca or ebay.com.au and the comps come back from that marketplace in its currency.

**How do I keep wrong items out of my comps?**

Search the exact item, filter condition, and keep relevance=true, which removes accessories, parts, lots and wrong models before the summary is calculated. For trading cards, include set, number, grader and grade in the keyword.

Written by CompSniper's founder. Checked October 3, 2026.

## Put real sold comps behind your prices

Up to 240 eBay sold comps per request with the median and range calculated. 100 free requests a month.

[Get a free API key](https://compsniper.com/signup)[See the API](https://compsniper.com/ebay-sold-listings-api)

---

CompSniper: real sold prices from eBay (8 sites), PSA, TCGplayer, Grailed, Poshmark and Mercari, plus Depop and Whatnot listings and Beckett cert lookups, through one API. Free plan, 100 requests a month: https://compsniper.com/signup. Pricing: https://compsniper.com/pricing. All Markdown pages: https://compsniper.com/llms.txt
