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, set COMPSNIPER_API_KEY, and turn sold comps into a price suggestion:
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 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:
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 takes up to 20 keywords at once and the Card Batch API is built for trading-card lists. Building inside Claude or Cursor? The MCP server 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=usedornew, or a specificconditionId. - Leave
relevance=trueon. It removes accessories, parts, lots and wrong models before the summary. Our 100-product cleaning study shows where it is strong and where to double-check. - Pick the right marketplace. Set
ebaySitefor your user's country so prices come back in their currency. - Respect small samples. Our sample-size guide explains when a median is trustworthy.
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. Results can be cached briefly, so popular searches return faster.
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.