Disclosure: we build CompsAPI, the sold-price API used in this post. It was drafted with AI assistance, and the code and field names were checked against CompsAPI's documentation. A free key needs no card.
Ask what something sold for and you can get five different answers from five marketplaces. Some of the difference is real, because the buyers are different. Some of it is noise, because each marketplace's "recent sales" include lots, parts and accessories.
This post builds a small Python script that asks each marketplace for the same item and prints one median per marketplace, with the number of sales behind it. It is under 50 lines and uses one dependency.
What you need
- Python 3 and
requests(pip install requests) - A free CompsAPI key (100 requests a month, no card), saved as an environment variable so it never sits in the code:
export COMPSAPI_KEY="your-key-here"
The script
"""price_check.py: median sold price for one item across several marketplaces."""
import os
import sys
import requests
API = "https://api.compsapi.com/v1/sold"
SOURCES = ["ebay", "reverb", "poshmark", "mercari", "grailed"]
MIN_SALES = 8 # below this, treat the median as a direction, not a figure
def median_for(source, query, days=90):
resp = requests.get(
API,
params={
"source": source,
"q": query,
"days": days,
"stats": 1,
"exclude": "ai_junk",
},
headers={"X-API-Key": os.environ["COMPSAPI_KEY"]},
timeout=30,
)
resp.raise_for_status()
stats = resp.json().get("stats") or {}
return stats.get("median"), stats.get("used_for_stats", 0)
def main():
query = " ".join(sys.argv[1:])
if not query:
sys.exit('usage: python price_check.py "item name"')
print(f"{'source':<10} {'median':>10} {'sales':>6}")
for source in SOURCES:
median, n = median_for(source, query)
if median is None:
print(f"{source:<10} {'no sales':>10} {0:>6}")
continue
flag = " <- few sales" if n < MIN_SALES else ""
print(f"{source:<10} {median:>10,.2f} {n:>6}{flag}")
if __name__ == "__main__":
main()
Run it with an item name:
python price_check.py "dyson airwrap"
What each part does
-
sourcepicks the marketplace. Leave it off and you get eBay. The same key and the same monthly quota cover all of them. -
days=90is a window every marketplace in the list covers. Mercari and Poshmark start in November 2025, so 90 days is fully inside their history. I left Vinted out because its history only starts on 15 November 2026 and is still a small sample. -
stats=1asks for a summary of the sales that are left: median, mean, quartiles and the number used. -
exclude=ai_junkdrops sales that CompsAPI's classifier labels as lots, parts, accessories, empty boxes, mystery listings, replicas or digital items, both from the rows and from the median. -
used_for_statsis the number of sales behind the median. It is printed next to every median, because a median of 3 sales and a median of 200 are not the same claim.
How to read the output
- Look at the sales column first. The script flags any marketplace with fewer than 8 sales. A median from a handful of sales is a direction, not a price.
- A marketplace that returns no sales may simply not carry the item. Reverb is musical gear and Poshmark is mostly clothing, so many searches will legitimately come back empty for them.
- Different medians are not automatically an arbitrage. Fees, shipping, condition mix and the kind of buyer all differ by marketplace. Treat a gap as a reason to look at the rows, not as a trade.
-
Run it once without the filter. Remove the
excludeline, or change it toai=1, which keeps every row and adds a label to each one (kind,junk,confidence). Look at what the filter would have removed on an item you know well before you trust the filtered number on one you don't.
Limits worth knowing
- Quota: the script makes one request per marketplace, so one item costs 5 requests. On the free tier (100 a month, 10 a minute) that is 20 items a month.
-
The classifier is not perfect. On eBay it agreed with our labels on about 92% of 690 listings from searches it had not seen, so roughly 8 in 100 differ from a human label. It sometimes removes a console sold with its dock and controllers as a bundle. It does not detect counterfeits. For anything where a few percent of error matters, use
ai=1and read the borderline rows yourself. - It works one page at a time. If most of a search's sales are parts or accessories, only a few sales may be left after filtering. That is exactly what the sales column is for.
- Coverage differs by marketplace. Histories start on different dates, and some marketplaces are young and still growing. Check a marketplace's start date before comparing a long window.
- I have not published sample output here. Numbers change daily, so run it on your own items.
CompsAPI is not affiliated with eBay, Reverb, Poshmark, Mercari or Grailed.
Get a key
A free key covers everything above: get one here. If the script returns something that looks wrong for an item you know, tell us in the comments and we'll look.
Top comments (0)