Sold-listing valuation math for resellers and AI agents: landed price, purity-gated medians, 90-day sell-through, and a target-ROI max-buy ceiling — async HTTP by default, headless Chrome on request (fetchEngine).
Apify Actor: https://apify.com/mycelia/ebay-sold-comps-intelligence · Apify ID: iqIo5DcNhy0sBSUZs
For $2.00 / 1,000 sold comps parsed, and a query eBay blocks costs $0.
| Field | What you get |
|---|---|
total_landed_price |
sold_price + shipping_price — a "free shipping" listing and a $12.50 shipping listing stop being the same number |
comp_purity |
5 gates: clean_comp, accessory_or_box_only, parts_or_broken, lot_bundle, variation_price_range, best_offer_hidden_price. Query-aware: searching "Switch OLED empty box" keeps box rows as clean comps |
is_iqr_outlier |
Tukey 1.5×IQR fences applied before the quartiles, so one $1,150 lot can't carry your median |
landed_price_p10 / p25 / median / p75 / p90 |
Computed on clean inliers only, in the marketplace's currency |
active_supply_count, sell_through_90d_pct, liquidity_grade |
Parallel active-listing fetch (LH_Sold=0) → sold ÷ (sold + active), graded A_HIGH → D_SLOW |
est_net_payout_after_fees, recommended_max_buy_price |
Median minus feeRatePct (default 13.25% + $0.40), divided by your targetRoiPct (default 25%) |
sold_date_iso |
Parsed from the sold badge across locales (en/de/fr/it/es/nl), giving the real observed_window_days |
10 marketplaces: EBAY_US, UK, DE, CA, AU, FR, IT, ES, NL, IE.
Raw sold-com scrapers dump noisy rows. A $18 empty box, a $9.99–$299 variation, and a
$120 for-parts unit all pollute a naive median — typically dragging it 15–40%. This Actor classifies
each row before the math, removes IQR outliers, and only then reports quartiles, so the number you
quote is the number you can actually repeat.
Money rounding is explicit ROUND_HALF_UP (src/ebay_comps.py::_round_money), because Python's
round(216.475, 2) is 216.47 and a half-cent in a buyback ceiling is a decision, not a rounding error.
- 21 offline tests, deterministic. The parser contract is pinned by
tests/fixtures/ebay_sold_search_sample_us.html(moderns-cardsold DOM) andtests/fixtures/ebay_sch_403_errorpage_live_2026-12-01.html— a real response captured from a cloud run, not a hand-written mock. - Where eBay blocks us, measured precisely.
403 "Error Page | eBay"(Akamaireference-id, ~1.9 KB) is returned to every/sch/path and every URL carryingLH_Sold=1. From the same session and IP,https://www.ebay.com/returns200(400 KB of reals-cardmarkup) and/itm/...returns a served404— so the rule is endpoint-specific (search listings + the completed/sold filter), not "all of eBay". - What has already been ruled out, with measurements. Egress: the free proxy pool (datacenter
AS49532/AS264850/AS36352), a Thai ISP exit, and US residential (AS7922 Comcast, Frontier,AS11426 Charter). Residential is not the unlock: from it/returns200and/sch/still returns the same403. Profiles: Chrome and Firefox fail identically. Cookies: the same-session warm-up fetches/with200first, so the search request carries fresh first-party cookies anyway. Also ruled out: HTTP/1.1 vs HTTP/2,m.ebay.com,&_rss=1,/sch/ebay.ajax. The 403 page ships an Akamai bot-sensor script - it expects JavaScript. - A real browser is shipped, and it is not the unlock either.
fetchEngine: "browser"runs headless Chrome (brandedchromefirst) on Apify; on verified US residential it launchedchrome@158.0.8127.88and/sch/i.html?...LH_Sold=1...still returned403- the same 1,899 B error page, nos-item/s-card,0rows,$0charged (runQQSuhHXqgCNnJ1TMm). The active-listings URL is403from Apify residential too, while a genuine consumer residential exit serves it as200:/sch/is egress-reputation-dependent as well as endpoint-specific. - Proxy keys. Apify honours
apifyProxyGroups/apifyProxyCountryonly;proxyCountries,groupsand friends are silently ignored and hand back the datacenter pool with no error. Residential is accepted on the free tier (billed per GB). The Actor keeps the free pool as its default so you are not billed bandwidth for a0-row result, andmaxFetchProfilescaps how many profiles a run tries (2 on residential). - Error vocabulary you will actually see:
blocked_by_challenge,blocked_<profile>(e.g.blocked_chrome),blocked_browser_chrome/blocked_browser_chromium(browser engine, andSUMMARY.browser_launchesrecords which browser actually ran) orsignin_wall_redirect. Only the last one means eBay asked for a signed-in session - then pass the optionalsessionCookieinput. It has been observed once, from a local branded-Chrome fetch of the sold URL (https://signin.ebay.com/ws/eBayISAPI.dll?SignIn...&sgfl=srch); it parses as0rows, never as data. - No eBay API for sold data. The Finding API -
findCompletedItems, the only sold-items call - was decommissioned on 2025-02-05 (https://developer.ebay.com/devzone/finding/callref/findCompletedItems.html); Browse returns active listings only, andMarketplace Insightsis eligibility-restricted. - Shipped behaviour today: a live query returns
SUCCEEDEDin ~8.6 s withblocked_by_challenge: true(http engine) orblocked_browser_chrome(fetchEngine: "browser", ~37 s),0rows and$0charged. That is an upstream bot-management property, not a parser bug - the 403 body contains nos-cardmarkup, so nothing can be invented from it, which is precisely what the fixture test asserts.
One click, input pre-filled — published example Tasks (append .md to any URL for the
machine-readable rendition):
| Use case | Task page |
|---|---|
| Sold comps + max buyback ceiling | https://apify.com/mycelia/ebay-sold-comps-intelligence/examples/ebay-sold-comps-and-max-buyback-price-calculator |
| Sell-through rate & price bands | https://apify.com/mycelia/ebay-sold-comps-intelligence/examples/used-electronics-sell-through-rate-and-price-bands |
| Clean sold comps for collectibles & TCG | https://apify.com/mycelia/ebay-sold-comps-intelligence/examples/collectibles-and-tcg-clean-ebay-sold-comps |
apify call mycelia/ebay-sold-comps-intelligence -i '{"queries":["Nintendo Switch OLED Console"],"condition":"USED","onlyCleanComps":true}'from apify_client import ApifyClient
client = ApifyClient("APIFY_API_TOKEN")
run = client.actor("mycelia/ebay-sold-comps-intelligence").call(
run_input={"queries": ["Sony WH-1000XM5"], "targetRoiPct": 30}
)
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
print(row["title"], row["total_landed_price"], row["comp_purity"])
summaries = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("VALUATION_SUMMARIES")["value"]{
"mcpServers": {
"apify": { "type": "http", "url": "https://mcp.apify.com/?tools=mycelia/ebay-sold-comps-intelligence" }
}
}sold-comp-item=$0.002per emitted row ($2.00/1,000);apify-actor-start=$0.00005.- Push-before-charge:
Actor.push_data(row)runs beforeActor.charge(...). - Blocked or failed queries are never billed;
SUMMARY.charged_events == items_pushed. onlyCleanComps: truedrops purity-flagged rows before the dataset write and before billing.
debugSaveRawHtml: true writes every fetched catalog page into the run's key-value store as
RAW_HTML_00_0_sold_p1 / RAW_HTML_00_1_active_p1 (status, interstitial flag, body). This is how the
live 403 above was captured, and how you can tell "eBay blocked me" from "the parser broke".
python -m pip install -r requirements.txt
python -m unittest discover -s tests -p "test_*.py" # 10 tests, offlineCovers money parsing across US/EU formats, the 5 purity gates, IQR + valuation math, currency
rounding, URL builders for all locales, interstitial detection, the modern s-card DOM, and the real
captured 403 response.
MIT © 2026 Mycelia
Machine-readable summary for AI agents: llms.txt.