<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sam Smith</title>
    <description>The latest articles on DEV Community by Sam Smith (@sam_compsapi).</description>
    <link>https://dev.to/sam_compsapi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4174389%2F4b17ffaf-14dc-435e-867a-96a8e1d91d08.png</url>
      <title>DEV Community: Sam Smith</title>
      <link>https://dev.to/sam_compsapi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sam_compsapi"/>
    <language>en</language>
    <item>
      <title>Audit what an AI junk filter removed from your sold-price data, in 25 lines of Python</title>
      <dc:creator>Sam Smith</dc:creator>
      <pubDate>Sat, 21 Nov 2026 12:41:16 +0000</pubDate>
      <link>https://dev.to/sam_compsapi/audit-what-an-ai-junk-filter-removed-from-your-sold-price-data-in-25-lines-of-python-12e2</link>
      <guid>https://dev.to/sam_compsapi/audit-what-an-ai-junk-filter-removed-from-your-sold-price-data-in-25-lines-of-python-12e2</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: we build CompsAPI, the sold-price API this post is about. It was drafted with AI assistance, and every figure comes from CompsAPI's published test notes. A free key needs no card.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;CompsAPI's new AI filter labels each sale as the item itself or as junk (a lot, a part, an accessory, an empty box, a mystery pack, a replica, a digital code). It is opt-in, and it is right most of the time. This post is about the rest: how to look at what it removed, in about 25 lines, so you can check the rows that matter before you trust a median.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the filter slips
&lt;/h2&gt;

&lt;p&gt;The published test notes are specific about the failure modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;eBay, 690 listings from 20 unseen searches:&lt;/strong&gt; about 92% agreement with CompsAPI's own labels. It wrongly removed 24 of 413 real items (5.8%) and kept 30 of 277 junk listings (10.8%).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bundles are the known weak spot.&lt;/strong&gt; A console sold with its own dock and controller should be kept, and usually is, but 2 of 23 higher-priced removed Xbox Series X listings, 2 of 21 for Nintendo Switch OLED, 1 of 18 for PS5 and 5 of 68 for PlayStation 4 Slim were single consoles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Other slips:&lt;/strong&gt; multipacks sold as one product can be treated as lots, and "body only" cameras can be treated as parts.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Notice the pattern: the wrongly removed rows are real items, so they tend to sit at real-item prices. A removed accessory usually sells for far less than the item. That gives a cheap heuristic for where to look.&lt;/p&gt;

&lt;h2&gt;
  
  
  The audit script
&lt;/h2&gt;

&lt;p&gt;With &lt;code&gt;ai=1&lt;/code&gt;, nothing is removed and every row carries a label, so one request gives you both sides. The script computes the median of the rows the filter would keep, then lists the removed rows priced at or above that median, least confident first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="no"&gt;QUERY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="no"&gt;SOURCE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"SOURCE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ebay"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;"https://api.compsapi.com/v1/sold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;SOURCE&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"q"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;QUERY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"X-API-Key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"COMPSAPI_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# A very recent sale can arrive before it has a label, so skip unlabelled rows.&lt;/span&gt;
&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;kept&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"junk"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;removed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"junk"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;kept&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Nothing was kept, so there is no median to compare against."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;median&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;median&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;kept&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;suspects&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;removed&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;median&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"confidence"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{len(rows)} sales, {len(removed)} removed, median of kept rows ${median:,.2f}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{len(suspects)} removed rows priced at or above that median:\n"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;suspects&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;'{ai["confidence"]:.2f} {ai["kind"]:&amp;lt;10} ${row["price"]:&amp;gt;9,.2f}  {row["title"][:70]}'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it on any search:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python audit.py &lt;span class="s2"&gt;"nintendo switch oled"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set &lt;code&gt;SOURCE=reverb&lt;/code&gt; (or another marketplace) to audit a different one.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to read the output
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A removed row at a real-item price is worth a look.&lt;/strong&gt; If the title says "console with dock and controller", the filter may have mistaken a bundle for a lot. If it says "lot of 5", it was right.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low confidence matters more than the kind.&lt;/strong&gt; The list is sorted so the rows the model was least sure about come first.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An empty list is a good sign, not proof.&lt;/strong&gt; It means every removed row sold for less than the kept median, which is what accessories and parts usually do.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lots will show up here legitimately.&lt;/strong&gt; A real lot can sell for more than one item. The script points you at rows to read, it does not decide.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it costs
&lt;/h2&gt;

&lt;p&gt;One request per search. On the free plan (100 requests a month, 10 a minute) that is 100 audits a month.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits worth knowing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The price rule is my heuristic, not something the API reports.&lt;/strong&gt; It finds rows worth reading, and plenty of correctly removed lots will appear in the list.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It cannot find junk the filter kept.&lt;/strong&gt; The 10.8% of eBay junk that slipped through is not in this list. For that, sort the kept rows by price and read the top few.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The test labels are CompsAPI's own,&lt;/strong&gt; checked twice independently and reviewed, but not by an outside party.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I have not run this script against a live key.&lt;/strong&gt; It follows the documented parameters and fields (&lt;code&gt;ai.kind&lt;/code&gt;, &lt;code&gt;ai.junk&lt;/code&gt;, &lt;code&gt;ai.confidence&lt;/code&gt;, &lt;code&gt;price&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;) and assumes rows come back under &lt;code&gt;items&lt;/code&gt;. Treat it as a starting point and try it on a search you know.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CompsAPI is not affiliated with eBay or the marketplaces named.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;A free key is enough to audit a few searches: &lt;a href="https://compsapi.com/?utm_source=dev&amp;amp;utm_medium=article&amp;amp;utm_campaign=audit-ai-filter" rel="noopener noreferrer"&gt;get one here&lt;/a&gt;. If you find a removed row that was clearly a real item, tell us in the comments.&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>ai</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>One request, two medians: what an AI junk filter changes on eBay, Reverb, Poshmark and Mercari</title>
      <dc:creator>Sam Smith</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:24:19 +0000</pubDate>
      <link>https://dev.to/sam_compsapi/one-request-two-medians-what-an-ai-junk-filter-changes-on-ebay-reverb-poshmark-and-mercari-7bc</link>
      <guid>https://dev.to/sam_compsapi/one-request-two-medians-what-an-ai-junk-filter-changes-on-ebay-reverb-poshmark-and-mercari-7bc</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: we build CompsAPI, the sold-price API this post is about. It was drafted with AI assistance, and every figure comes from CompsAPI's own measurements on 18 November 2026. A free key needs no card.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This week CompsAPI shipped two things at once: sold prices from 12 marketplaces beyond eBay on the same key, and an opt-in AI filter that labels every sale as the item itself or as junk (a lot, a part, an accessory, an empty box, a mystery pack, a replica, a digital code).&lt;/p&gt;

&lt;p&gt;Here is what the two do together, with numbers, and a short script that shows the difference on any search with a single request per marketplace.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes in the median
&lt;/h2&gt;

&lt;p&gt;We ran the same search with the filter off and on. Each figure is the median over a 30-day window on the marketplaces, measured on 18 November 2026, and approximate:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Marketplace&lt;/th&gt;
&lt;th&gt;Search&lt;/th&gt;
&lt;th&gt;Median, filter off&lt;/th&gt;
&lt;th&gt;Median, filter on&lt;/th&gt;
&lt;th&gt;Sales removed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Reverb&lt;/td&gt;
&lt;td&gt;&lt;code&gt;fender stratocaster&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;about $400&lt;/td&gt;
&lt;td&gt;about $900&lt;/td&gt;
&lt;td&gt;about 1,130 of about 2,830&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Poshmark&lt;/td&gt;
&lt;td&gt;&lt;code&gt;dyson airwrap&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;about $220&lt;/td&gt;
&lt;td&gt;about $280&lt;/td&gt;
&lt;td&gt;about 110 of about 255&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mercari&lt;/td&gt;
&lt;td&gt;&lt;code&gt;nintendo switch oled&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;about $165&lt;/td&gt;
&lt;td&gt;about $200&lt;/td&gt;
&lt;td&gt;about 37 of about 123&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;On eBay, using the 240 newest sales of each search, the gaps are larger:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;eBay search&lt;/th&gt;
&lt;th&gt;Median, filter off&lt;/th&gt;
&lt;th&gt;Median, filter on&lt;/th&gt;
&lt;th&gt;Sales removed&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rolex submariner&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;about $40&lt;/td&gt;
&lt;td&gt;about $10,600&lt;/td&gt;
&lt;td&gt;190 of 239&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;canon eos r5&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;about $65&lt;/td&gt;
&lt;td&gt;about $1,810&lt;/td&gt;
&lt;td&gt;167 of 239&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;omega seamaster&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;about $220&lt;/td&gt;
&lt;td&gt;about $1,900&lt;/td&gt;
&lt;td&gt;116 of 239&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;dyson airwrap&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;about $185&lt;/td&gt;
&lt;td&gt;about $320&lt;/td&gt;
&lt;td&gt;95 of 239&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A median is robust to outliers, and that is exactly the problem. When most rows are cheap accessories, the median faithfully reports the accessories.&lt;/p&gt;

&lt;h2&gt;
  
  
  One request, two medians
&lt;/h2&gt;

&lt;p&gt;The filter is opt-in. With &lt;code&gt;ai=1&lt;/code&gt;, every row comes back with a label and nothing is removed. That means one request gives you everything you need to compute the median both ways yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Counter&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="no"&gt;SOURCES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ebay"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"reverb"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"poshmark"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"mercari"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="no"&gt;QUERY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;labelled_rows&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s2"&gt;"https://api.compsapi.com/v1/sold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"q"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="no"&gt;QUERY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"X-API-Key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"COMPSAPI_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="c1"&gt;# A very recent sale can arrive before it has a label, so skip unlabelled rows.&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;


&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="no"&gt;SOURCES&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;labelled_rows&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{source:&amp;lt;9} no labelled sales"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;continue&lt;/span&gt;
    &lt;span class="n"&gt;every&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;kept&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"junk"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;junk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"kind"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"junk"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;off&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;median&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;every&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;on&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;median&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;kept&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;kept&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{source:&amp;lt;9} sales={len(rows):&amp;lt;4} off=${off:&amp;gt;9,.2f}  "&lt;/span&gt;
          &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"on={'n/a' if on is None else f'${on:&amp;gt;9,.2f}'}  "&lt;/span&gt;
          &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"removed={len(rows) - len(kept)}  {dict(junk.most_common(3))}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it with any search:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python compare.py &lt;span class="s2"&gt;"fender stratocaster"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line shows the marketplace, how many labelled sales came back, the median with the filter off and on, how many rows the filter would remove, and the top three kinds of junk it found. Searches that a marketplace does not carry, such as a guitar on Poshmark, will legitimately return nothing.&lt;/p&gt;

&lt;p&gt;If you only want the server to do it, &lt;code&gt;exclude=ai_junk&lt;/code&gt; returns the filtered results and median directly. The script above is for seeing what was taken out.&lt;/p&gt;

&lt;h2&gt;
  
  
  How good is the filter?
&lt;/h2&gt;

&lt;p&gt;CompsAPI published the test behind it, and the numbers are worth reading, not just the headline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;600 marketplace listings, none used to train the filter:&lt;/strong&gt; it made the same call as the labels on 97.7%, with 8 real items wrongly removed and 6 junk rows wrongly kept.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;690 eBay listings from 20 searches it had never seen:&lt;/strong&gt; about 92%. It wrongly removed 24 of 413 real items (5.8%) and kept 30 of 277 junk listings (10.8%).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By marketplace on the 600:&lt;/strong&gt; Poshmark 98.4%, Goldin 97.5%, Reverb 95.2%, Vinted 93.9%, Mercari 93.8%. Several marketplaces had too few test listings, or too little junk in the sample, to publish a figure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;By kind of junk:&lt;/strong&gt; lots 25 of 26 removed, parts 13 of 13, mystery boxes and packs 30 of 32, accessories 35 of 41.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The 600-marketplace sample was only about 8.5% junk, so a filter that did nothing would already score about 91.5% there. On eBay, where about 40% of the test listings were junk, the filter is doing much more of the work. (Those baseline figures are my arithmetic from the published counts.)&lt;/p&gt;

&lt;h2&gt;
  
  
  The 12 marketplaces
&lt;/h2&gt;

&lt;p&gt;The same &lt;code&gt;/v1/sold&lt;/code&gt; and &lt;code&gt;/v1/comps&lt;/code&gt; endpoints, the same key and the same monthly quota now read Reverb, Poshmark, Mercari, Vinted, Goldin, Grailed, TCGplayer, MySlabs, GOAT and more, with a &lt;code&gt;source=&lt;/code&gt; parameter. &lt;code&gt;source=all&lt;/code&gt; merges them in one call, newest sale first. Histories start on different dates (Reverb goes back to 2014, Mercari and Poshmark from November 2025, Vinted from 15 November 2026), so check a marketplace's start date before asking for a long window.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits worth knowing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It does not check that what is left is the exact model you searched for,&lt;/strong&gt; and it does not detect counterfeits. A replica is only labelled if the listing says so.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bundles are the known weak spot.&lt;/strong&gt; A console sold with its own dock and controller should be kept, and usually is, but 2 of 23 higher-priced removed Xbox Series X listings and 5 of 68 for the PlayStation 4 Slim were single consoles. Compare filtered and unfiltered results before relying on it for consoles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The test labels are CompsAPI's own,&lt;/strong&gt; checked twice independently and reviewed, but not by an outside party.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I have not run the script above against a live key.&lt;/strong&gt; It follows the documented parameters and fields (&lt;code&gt;ai.kind&lt;/code&gt;, &lt;code&gt;ai.junk&lt;/code&gt;, &lt;code&gt;price&lt;/code&gt;) and assumes rows come back under &lt;code&gt;items&lt;/code&gt;. Treat it as a starting point and try it on a search you know.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CompsAPI is not affiliated with eBay or the marketplaces named.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;A free key gives you 100 requests a month, enough to run the script on a few searches: &lt;a href="https://compsapi.com/?utm_source=dev&amp;amp;utm_medium=article&amp;amp;utm_campaign=launch-two-medians" rel="noopener noreferrer"&gt;get one here&lt;/a&gt;. If you find a sale the filter labels wrongly, tell us in the comments.&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>datascience</category>
      <category>ai</category>
    </item>
    <item>
      <title>How we tested an AI classifier on marketplace data: two error rates, not one accuracy number</title>
      <dc:creator>Sam Smith</dc:creator>
      <pubDate>Thu, 19 Nov 2026 19:58:52 +0000</pubDate>
      <link>https://dev.to/sam_compsapi/how-we-tested-an-ai-classifier-on-marketplace-data-two-error-rates-not-one-accuracy-number-3aji</link>
      <guid>https://dev.to/sam_compsapi/how-we-tested-an-ai-classifier-on-marketplace-data-two-error-rates-not-one-accuracy-number-3aji</guid>
      <description>&lt;p&gt;&lt;em&gt;Disclosure: we build CompsAPI, the sold-price API whose filter is measured in this post. It was drafted with AI assistance, and every figure below comes from CompsAPI's published test notes. The labels in the test were made by us, which is a limit I come back to at the end.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;"The model is 92% accurate" is a sentence that sounds like a result and tells you almost nothing. This post takes one real example, a classifier that labels marketplace sales as "a normal item" or "junk", and shows what the published test numbers say once you split the one percentage into the parts it hides.&lt;/p&gt;

&lt;h2&gt;
  
  
  The task
&lt;/h2&gt;

&lt;p&gt;Sold-price data from resale marketplaces is full of rows that are not the thing you searched for: lots, parts, accessories, empty boxes, mystery packs, replicas and digital codes. A median over all of them can describe nothing you could actually buy.&lt;/p&gt;

&lt;p&gt;CompsAPI's classifier gives every sale one label (&lt;code&gt;item&lt;/code&gt;, &lt;code&gt;lot&lt;/code&gt;, &lt;code&gt;parts&lt;/code&gt;, &lt;code&gt;accessory&lt;/code&gt;, &lt;code&gt;box_only&lt;/code&gt;, &lt;code&gt;mystery&lt;/code&gt;, &lt;code&gt;replica&lt;/code&gt;, &lt;code&gt;digital&lt;/code&gt; or &lt;code&gt;other&lt;/code&gt;). Everything except &lt;code&gt;item&lt;/code&gt; counts as junk. Nothing is deleted: with &lt;code&gt;ai=1&lt;/code&gt; every row keeps its label, and with &lt;code&gt;exclude=ai_junk&lt;/code&gt; the junk rows are left out of the results and the median.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it was tested
&lt;/h2&gt;

&lt;p&gt;Three choices in the method are worth copying if you ever evaluate a classifier yourself:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Two independent labels per listing.&lt;/strong&gt; Each test listing was labelled twice independently, and the disagreements were settled by review. Without that, you are measuring your own labelling mood as much as the model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Listings the model never trained on.&lt;/strong&gt; None of the test listings were used to train the filter. For eBay, the 690 test listings came from 20 searches the filter had never seen, which tests generalisation, not memory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;eBay measured separately from the other marketplaces.&lt;/strong&gt; The junk rate is very different between them, as the next section shows.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The results
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Test set&lt;/th&gt;
&lt;th&gt;Listings&lt;/th&gt;
&lt;th&gt;Junk in the set&lt;/th&gt;
&lt;th&gt;Agreement with labels&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Marketplaces (Reverb, Mercari, Poshmark and others)&lt;/td&gt;
&lt;td&gt;600&lt;/td&gt;
&lt;td&gt;51&lt;/td&gt;
&lt;td&gt;97.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;eBay, unseen searches&lt;/td&gt;
&lt;td&gt;690&lt;/td&gt;
&lt;td&gt;277&lt;/td&gt;
&lt;td&gt;about 92%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now split the eBay figure into its two kinds of mistake:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Real items wrongly removed:&lt;/strong&gt; 24 of 413, which is &lt;strong&gt;5.8%&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Junk wrongly kept:&lt;/strong&gt; 30 of 277, which is &lt;strong&gt;10.8%&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;On the marketplaces: 8 of 549 real items were wrongly removed (1.5%), and 6 junk rows were wrongly kept.&lt;/p&gt;

&lt;p&gt;So "92%" is really "removes about 1 in 17 real items and lets through about 1 in 9 junk rows". Those are different problems, and they hurt different uses.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why one accuracy number hides the base rate
&lt;/h2&gt;

&lt;p&gt;Here is the part that changed how I read these numbers. Compare the filter with a classifier that does nothing and calls every listing a real item:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Test set&lt;/th&gt;
&lt;th&gt;Do-nothing baseline&lt;/th&gt;
&lt;th&gt;Filter&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Marketplaces (549 real of 600)&lt;/td&gt;
&lt;td&gt;91.5%&lt;/td&gt;
&lt;td&gt;97.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;eBay (413 real of 690)&lt;/td&gt;
&lt;td&gt;59.9%&lt;/td&gt;
&lt;td&gt;about 92%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The do-nothing figures are my arithmetic from the published counts, not a number the test reports. They show why the same word, "accuracy", means different things on the two sets. On the marketplaces, junk is rare (about 8.5% of the sample), so a lazy baseline already scores 91.5% and the filter's 97.7% is a more modest step up. On eBay, about 40% of the test listings were junk, so the baseline is poor and the filter's job is much bigger.&lt;/p&gt;

&lt;p&gt;If you evaluate your own classifier, report the base rate and both error types next to the headline number.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which mistake costs more?
&lt;/h2&gt;

&lt;p&gt;That depends on what you do with the output. This is reasoning, not a measurement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you compute a &lt;strong&gt;median&lt;/strong&gt;, a few removed real items thin the sample a little, but missed junk can pull the median away from the true price. For that use, the 10.8% miss rate on eBay is the figure to watch.&lt;/li&gt;
&lt;li&gt;If you are &lt;strong&gt;hunting for individual deals&lt;/strong&gt;, a real item wrongly removed is a deal you never see, so the 5.8% matters more.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What the filter is bad at
&lt;/h2&gt;

&lt;p&gt;The test notes are specific about this, which is the useful part:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;By kind of junk,&lt;/strong&gt; across the test: lots, 25 of 26 removed. Parts, 13 of 13. Mystery boxes and packs, 30 of 32. Listings that are not a product, such as services, 18 of 18. Accessories, only 35 of 41.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bundles.&lt;/strong&gt; A console sold with its own dock and controller should be kept, and usually is, but not always: 2 of 23 higher-priced removed listings for Xbox Series X, 2 of 21 for Nintendo Switch OLED, 1 of 18 for PS5 and 5 of 68 for PlayStation 4 Slim were single consoles.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vague titles.&lt;/strong&gt; Very short titles, one or two words, are sometimes left out as unclear.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multipacks&lt;/strong&gt; sold as one product, such as a 2 pack or a 6 pack, are sometimes treated as lots.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;"Body only" cameras&lt;/strong&gt; are sometimes treated as parts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Real lots that stay in.&lt;/strong&gt; A console with games or two controllers can survive the filter, usually when the listing says so in another language or avoids a word like "bundle".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Counterfeits.&lt;/strong&gt; It labels a listing a replica only if the listing says so. A fake sold as real is outside what it can see.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Run your own check in 20 lines
&lt;/h2&gt;

&lt;p&gt;You should not take a filter's word for it. This script pulls one search with labels attached, counts what the model thinks is in it, and prints the rows it was least sure about, so you can judge those yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Counter&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;"https://api.compsapi.com/v1/sold"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"q"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"X-API-Key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"COMPSAPI_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;rows&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"kind"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"\nLeast sure rows:"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"confidence"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;ai&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ai"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s1"&gt;'{ai["confidence"]:.2f} {ai["kind"]:&amp;lt;10} ${r["price"]:&amp;gt;9,.2f}  {r["title"][:70]}'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it as &lt;code&gt;python check.py "nintendo switch oled"&lt;/code&gt; and compare the low-confidence rows with your own eye. &lt;code&gt;ai=1&lt;/code&gt; removes nothing, so it is safe to try on any search. The script only prints rows that came back with a label. A very recent sale can arrive before it has one.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits of these numbers
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The labels are ours.&lt;/strong&gt; The test measures agreement with labels made by the same team that built the filter, double-checked and reviewed, but not by an outside party.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Small samples.&lt;/strong&gt; 20 eBay searches is not all of eBay. Several marketplaces had fewer than 50 test listings, and a few had no junk at all in the sample, so they get no accuracy figure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Agreement is not truth.&lt;/strong&gt; It tells you how often the model matches a reviewed label, not whether the remaining rows match the exact model you meant.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I did not run the script above against a live key.&lt;/strong&gt; It follows the documented fields (&lt;code&gt;ai.kind&lt;/code&gt;, &lt;code&gt;ai.confidence&lt;/code&gt;, &lt;code&gt;price&lt;/code&gt;, &lt;code&gt;title&lt;/code&gt;), but treat it as a starting point.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CompsAPI is not affiliated with eBay or the other marketplaces mentioned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;A free key gives you 100 requests a month, enough to run the check on a few searches you know well: &lt;a href="https://compsapi.com/?utm_source=dev&amp;amp;utm_medium=article&amp;amp;utm_campaign=ai-filter-evaluation" rel="noopener noreferrer"&gt;get one here&lt;/a&gt;. If you find a listing the filter gets wrong, send it to us in the comments.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>python</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Build a cross-marketplace sold-price checker in Python (eBay, Reverb, Poshmark, Mercari)</title>
      <dc:creator>Sam Smith</dc:creator>
      <pubDate>Thu, 19 Nov 2026 13:42:08 +0000</pubDate>
      <link>https://dev.to/sam_compsapi/build-a-cross-marketplace-sold-price-checker-in-python-ebay-reverb-poshmark-mercari-535p</link>
      <guid>https://dev.to/sam_compsapi/build-a-cross-marketplace-sold-price-checker-in-python-ebay-reverb-poshmark-mercari-535p</guid>
      <description>&lt;p&gt;&lt;em&gt;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.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Python 3 and &lt;code&gt;requests&lt;/code&gt; (&lt;code&gt;pip install requests&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;A free CompsAPI key (100 requests a month, no card), saved as an environment variable so it never sits in the code:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="kd"&gt;export&lt;/span&gt; &lt;span class="nv"&gt;COMPSAPI_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-key-here"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The script
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="s2"&gt;"""price_check.py: median sold price for one item across several marketplaces."""&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;sys&lt;/span&gt;

&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="no"&gt;API&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://api.compsapi.com/v1/sold"&lt;/span&gt;
&lt;span class="no"&gt;SOURCES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"ebay"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"reverb"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"poshmark"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"mercari"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"grailed"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="no"&gt;MIN_SALES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;  &lt;span class="c1"&gt;# below this, treat the median as a direction, not a figure&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;median_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;90&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="no"&gt;API&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"q"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"days"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"stats"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"exclude"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ai_junk"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"X-API-Key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"COMPSAPI_KEY"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;stats&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"stats"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"median"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;stats&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"used_for_stats"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;sys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;exit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'usage: python price_check.py "item name"'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{'source':&amp;lt;10} {'median':&amp;gt;10} {'sales':&amp;gt;6}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;source&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="no"&gt;SOURCES&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;median&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;median_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;source&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;median&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{source:&amp;lt;10} {'no sales':&amp;gt;10} {0:&amp;gt;6}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;
        &lt;span class="n"&gt;flag&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"  &amp;lt;- few sales"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="no"&gt;MIN_SALES&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{source:&amp;lt;10} {median:&amp;gt;10,.2f} {n:&amp;gt;6}{flag}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"__main__"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it with an item name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python price_check.py &lt;span class="s2"&gt;"dyson airwrap"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What each part does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;source&lt;/code&gt;&lt;/strong&gt; picks the marketplace. Leave it off and you get eBay. The same key and the same monthly quota cover all of them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;days=90&lt;/code&gt;&lt;/strong&gt; is 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;stats=1&lt;/code&gt;&lt;/strong&gt; asks for a summary of the sales that are left: median, mean, quartiles and the number used.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;exclude=ai_junk&lt;/code&gt;&lt;/strong&gt; drops 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;used_for_stats&lt;/code&gt;&lt;/strong&gt; is 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.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to read the output
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Look at the sales column first.&lt;/strong&gt; The script flags any marketplace with fewer than 8 sales. A median from a handful of sales is a direction, not a price.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A marketplace that returns no sales may simply not carry the item.&lt;/strong&gt; Reverb is musical gear and Poshmark is mostly clothing, so many searches will legitimately come back empty for them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Different medians are not automatically an arbitrage.&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run it once without the filter.&lt;/strong&gt; Remove the &lt;code&gt;exclude&lt;/code&gt; line, or change it to &lt;code&gt;ai=1&lt;/code&gt;, which keeps every row and adds a label to each one (&lt;code&gt;kind&lt;/code&gt;, &lt;code&gt;junk&lt;/code&gt;, &lt;code&gt;confidence&lt;/code&gt;). 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.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Limits worth knowing
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quota:&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The classifier is not perfect.&lt;/strong&gt; 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 &lt;code&gt;ai=1&lt;/code&gt; and read the borderline rows yourself.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It works one page at a time.&lt;/strong&gt; 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.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Coverage differs by marketplace.&lt;/strong&gt; Histories start on different dates, and some marketplaces are young and still growing. Check a marketplace's start date before comparing a long window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;I have not published sample output here.&lt;/strong&gt; Numbers change daily, so run it on your own items.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;CompsAPI is not affiliated with eBay, Reverb, Poshmark, Mercari or Grailed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Get a key
&lt;/h2&gt;

&lt;p&gt;A free key covers everything above: &lt;a href="https://compsapi.com/?utm_source=dev&amp;amp;utm_medium=article&amp;amp;utm_campaign=cross-marketplace-python" rel="noopener noreferrer"&gt;get one here&lt;/a&gt;. If the script returns something that looks wrong for an item you know, tell us in the comments and we'll look.&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>tutorial</category>
      <category>datascience</category>
    </item>
    <item>
      <title>I logged every status code scraping eBay sold listings. The block is not where you think</title>
      <dc:creator>Sam Smith</dc:creator>
      <pubDate>Sat, 17 Oct 2026 18:29:56 +0000</pubDate>
      <link>https://dev.to/sam_compsapi/i-logged-every-status-code-scraping-ebay-sold-listings-the-block-is-not-where-you-think-gb9</link>
      <guid>https://dev.to/sam_compsapi/i-logged-every-status-code-scraping-ebay-sold-listings-the-block-is-not-where-you-think-gb9</guid>
      <description>&lt;p&gt;Every tutorial for this is the same twelve lines. I ran them today, logged every status code, and the interesting part is not that it failed. It is &lt;em&gt;where&lt;/em&gt; it failed, which turns out to be a different place than the tutorials assume.&lt;/p&gt;

&lt;p&gt;All numbers below are from 17 October 2026, from one residential address, in the order shown.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attempt 1: the twelve lines
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://www.ebay.com/sch/i.html&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;params&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;_nkw&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;incredible hulk 181&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;LH_Sold&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;LH_Complete&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="n"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;User-Agent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
                         &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;AppleWebKit/537.36 (KHTML, like Gecko) &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
                         &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Chrome/129.0.0.0 Safari/537.36&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;   &lt;span class="c1"&gt;# 403 1832
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;403, 1,832 bytes.&lt;/strong&gt; Not a captcha, not a login redirect. A page titled &lt;code&gt;Error Page | eBay&lt;/code&gt; carrying &lt;code&gt;&amp;lt;meta name="robots" content="noindex,nofollow"&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The useful control: the same request with the sold flags removed, against the ordinary active search, also returned 403, at 1,831 bytes.&lt;/p&gt;

&lt;p&gt;So the first block has nothing to do with sold data. It is the request not looking like a browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attempt 2: look like a browser
&lt;/h2&gt;

&lt;p&gt;Copy a real request's headers. &lt;code&gt;accept&lt;/code&gt;, &lt;code&gt;accept-language&lt;/code&gt;, the &lt;code&gt;sec-ch-ua&lt;/code&gt; client hints, the &lt;code&gt;sec-fetch-*&lt;/code&gt; set, &lt;code&gt;upgrade-insecure-requests&lt;/code&gt;. This is where it gets interesting, because the same headers produced different outcomes for the two URLs.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Request&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;User agent only, active search&lt;/td&gt;
&lt;td&gt;403, 1,831 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;User agent only, sold search&lt;/td&gt;
&lt;td&gt;403, 1,832 bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Full header set, active search&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;200, 198,706 bytes, 67 listings&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Full header set, sold search&lt;/td&gt;
&lt;td&gt;302, empty body&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Identical headers. The active search handed over a real page with 67 listing ids in it. The sold search did not.&lt;/p&gt;

&lt;p&gt;That is the actual shape of the problem. Active listings are public and indexable. Completed sales are the dataset eBay sells research subscriptions against.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attempt 3: it stops working at all
&lt;/h2&gt;

&lt;p&gt;Retrying the sold URL a minute later, following redirects this time, returned &lt;strong&gt;403&lt;/strong&gt; rather than the 302.&lt;/p&gt;

&lt;p&gt;Then I ran ten more trials, alternating active and sold, ten seconds apart. &lt;strong&gt;403 on all ten, including the active search that had worked minutes earlier.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Total requests before the address was finished: about fifteen.&lt;/p&gt;

&lt;p&gt;So there are two findings here, not one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sold search is gated harder than active search.&lt;/li&gt;
&lt;li&gt;The dominant effect over any real workload is address reputation, not headers.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Point 2 is the one that kills projects. Your scraper works on your laptop for an afternoon and dies the moment it does anything useful.&lt;/p&gt;

&lt;h2&gt;
  
  
  The selector in every tutorial is also wrong
&lt;/h2&gt;

&lt;p&gt;Worth knowing if you do get a page back. Essentially every tutorial and Stack Overflow answer parses &lt;code&gt;.s-item__price&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In the 200 response above, that selector matched &lt;strong&gt;zero&lt;/strong&gt; elements. The prices were in &lt;code&gt;.s-card__price&lt;/code&gt;, 70 of them.&lt;/p&gt;

&lt;p&gt;eBay reworked the search markup. The tutorials did not. If your scraper quietly returns empty lists, check the class names before you check your parsing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why there is no API to fall back to
&lt;/h2&gt;

&lt;p&gt;The usual next question is why not use eBay's own API. The short version:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;findCompletedItems&lt;/code&gt;, the Finding API call that returned sold listings, is retired.&lt;/li&gt;
&lt;li&gt;The Browse API is open to everyone and returns &lt;strong&gt;active&lt;/strong&gt; listings only. There is no sold filter, because sold items are not in the index it reads.&lt;/li&gt;
&lt;li&gt;The Marketplace Insights API does carry sold data. It is a limited release restricted to approved partners, and it caps at 90 days.&lt;/li&gt;
&lt;li&gt;Terapeak, now Product Research in Seller Hub, has three years of it and no API, no export, and requires a signed in seller session.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is the whole reason a third party market exists for this data.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it actually costs
&lt;/h2&gt;

&lt;p&gt;The parser is an afternoon. The real cost is sessions. eBay has required a signed in account to see sold search results since around the middle of 2026, so the job becomes account management: real accounts, keeping them signed in, addresses that hold up, handling challenges, re-auth when they fail. That is an operations problem with a monthly bill, and no tutorial covers it because it is not fun to write about.&lt;/p&gt;

&lt;p&gt;I work on an API that runs that layer, so take the conclusion with the appropriate amount of salt. But the status codes above are reproducible in about five minutes, and I would rather publish the control case (active search, same headers, 200) than imply eBay blocks everything, because it does not.&lt;/p&gt;

&lt;p&gt;If you are starting this project: budget for the session layer rather than the parser, and test from the address your code will actually run on, not from your laptop.&lt;/p&gt;

</description>
      <category>python</category>
      <category>webscraping</category>
      <category>api</category>
      <category>ebay</category>
    </item>
    <item>
      <title>I changed one parameter and the median moved 10x</title>
      <dc:creator>Sam Smith</dc:creator>
      <pubDate>Sat, 17 Oct 2026 16:07:44 +0000</pubDate>
      <link>https://dev.to/sam_compsapi/i-changed-one-parameter-and-the-median-moved-10x-1kam</link>
      <guid>https://dev.to/sam_compsapi/i-changed-one-parameter-and-the-median-moved-10x-1kam</guid>
      <description>&lt;p&gt;I went looking for one thing, failed to find it, and measured something more useful on the way. Both results are below, including the hypothesis that did not survive.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;60 specific products across ten categories: graded cards, retro games, sneakers, watches, lenses, coins, tools, collectibles, consumer electronics. For each one, the same query twice, once over 90 days and once over 1,095 days, reading cleaned server side statistics rather than raw listings. 120 requests, paced.&lt;/p&gt;

&lt;p&gt;The question: eBay's public sold filter shows about 90 days. How much of an item's sales record does that window hide?&lt;/p&gt;

&lt;h2&gt;
  
  
  The hypothesis failed
&lt;/h2&gt;

&lt;p&gt;I expected thin 90 day windows and rich three year ones. Instead, &lt;strong&gt;58 of 59 comparable queries already had eight or more clean sales inside 90 days&lt;/strong&gt;. For the typical product, the 90 day window held essentially the whole visible record.&lt;/p&gt;

&lt;p&gt;Only one query was genuinely starved: a complete copy of Earthbound on SNES, 6 sales in 90 days against 228 over three years.&lt;/p&gt;

&lt;p&gt;The reason is not that eBay shows more than I thought. It is that &lt;strong&gt;a keyword search is broad&lt;/strong&gt;. Ask for &lt;code&gt;seiko skx007 dive watch&lt;/code&gt; and the window fills easily, because it fills with straps, bezels, crystals and cases as well as watches.&lt;/p&gt;

&lt;p&gt;Breadth hides depth.&lt;/p&gt;

&lt;h2&gt;
  
  
  What showed up instead
&lt;/h2&gt;

&lt;p&gt;Changing only the window changed the answer, often by a lot.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Change in median, 90d vs 3y&lt;/th&gt;
&lt;th&gt;Share of products&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;10% or more&lt;/td&gt;
&lt;td&gt;16%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25% or more&lt;/td&gt;
&lt;td&gt;9%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The individual movers:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Query&lt;/th&gt;
&lt;th&gt;90 day median&lt;/th&gt;
&lt;th&gt;3 year median&lt;/th&gt;
&lt;th&gt;Move&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;rolex datejust 16220&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$435.56&lt;/td&gt;
&lt;td&gt;$4,400.00&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;10x&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;seiko skx007 dive watch&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$14.13&lt;/td&gt;
&lt;td&gt;$200.00&lt;/td&gt;
&lt;td&gt;14x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;marantz 2270 receiver&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$99.00&lt;/td&gt;
&lt;td&gt;$710.00&lt;/td&gt;
&lt;td&gt;7.2x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mike trout bowman chrome 2009&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$4,750.00&lt;/td&gt;
&lt;td&gt;$897.50&lt;/td&gt;
&lt;td&gt;5.3x&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;festool track saw ts 55&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;$199.31&lt;/td&gt;
&lt;td&gt;$325.00&lt;/td&gt;
&lt;td&gt;1.6x&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  I checked the biggest one, because 10x usually means bug
&lt;/h2&gt;

&lt;p&gt;Pulled both windows again and looked at listings instead of statistics.&lt;/p&gt;

&lt;p&gt;Both windows return the same kinds of thing. Bottom of the distribution: a sapphire crystal at $23, a bracelet link at $39, an engine turned bezel at $84. Top: real watches at $4,500, $5,100, $5,700. Identical price deciles in both.&lt;/p&gt;

&lt;p&gt;The three year set is the 90 day set &lt;strong&gt;plus 62 older sales&lt;/strong&gt;, and those added sales sit high in the distribution. That drags the midpoint from the parts end of the list to the watch end.&lt;/p&gt;

&lt;p&gt;So the market did not move. The &lt;strong&gt;composition of the match&lt;/strong&gt; moved. Nobody's Datejust changed price by 10x, and anyone comparing those two medians would have concluded it did.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is the more useful result
&lt;/h2&gt;

&lt;p&gt;Price history gets sold on depth. More years, more data, better answers. Depth is real, and its actual value is sample size on scarce items.&lt;/p&gt;

&lt;p&gt;But depth does nothing if the query is matching the wrong population, and widening the window can quietly change which population you are measuring. Retrieval is the problem. The time window is just another way to perturb it.&lt;/p&gt;

&lt;p&gt;I measured the same failure from another angle recently: the same card search returned a $14.73 median raw and $545.00 once lots, proxies, accessories and "PSA 10 contender" listings were removed. &lt;a href="https://compsapi.com/blog/why-your-card-comps-are-wrong" rel="noopener noreferrer"&gt;That write up is here&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Four rules if you work with marketplace price data
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Never compare medians across windows unless the filters are identical and tight.&lt;/strong&gt; If the only thing you changed is the date range and the number moved more than a few percent, suspect the match before you believe the market.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Filter on parsed structure before you widen.&lt;/strong&gt; Condition, grading fields, print run, category, and dropping lots and accessories. A tight match is stable across windows. A loose one is not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read the count alongside the median.&lt;/strong&gt; If the median moved and the count jumped, you are looking at a different set of sales, not a trend.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use depth for sample size, not for trend.&lt;/strong&gt; Three years is the right tool for something that sells twice a quarter. For a trend, bucket sales by date and compare buckets. One long window median is a level, not a trend.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproducing it
&lt;/h2&gt;

&lt;p&gt;Numbers are from a run on 17 October 2026. Capped queries, where the result hit the page size, are marked and excluded from the volume claims. Two of 59 were capped.&lt;/p&gt;

&lt;p&gt;The free tier is 100 requests a month and no card, and &lt;code&gt;count&lt;/code&gt;, &lt;code&gt;used_for_stats&lt;/code&gt;, &lt;code&gt;median&lt;/code&gt;, &lt;code&gt;p25&lt;/code&gt; and &lt;code&gt;p75&lt;/code&gt; come back on every response: &lt;a href="https://compsapi.com/docs" rel="noopener noreferrer"&gt;compsapi.com/docs&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>api</category>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Your card pricing API is returning the median of a junk drawer</title>
      <dc:creator>Sam Smith</dc:creator>
      <pubDate>Sat, 17 Oct 2026 15:58:11 +0000</pubDate>
      <link>https://dev.to/sam_compsapi/your-card-pricing-api-is-returning-the-median-of-a-junk-drawer-101m</link>
      <guid>https://dev.to/sam_compsapi/your-card-pricing-api-is-returning-the-median-of-a-junk-drawer-101m</guid>
      <description>&lt;p&gt;Here is a measurement I ran on 17 October 2026 against my own API, which does not flatter it.&lt;/p&gt;

&lt;p&gt;Search three years of completed eBay sales for &lt;code&gt;charizard base set psa 10&lt;/code&gt;. Take the raw feed of sold listings, keep only the rows that sold a single unit, take the median:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;$14.73&lt;/strong&gt;, over 239 listings, with individual sales running from $1.30 to $30,000.&lt;/p&gt;

&lt;p&gt;Run the same words through an endpoint that drops lots, mystery packs, accessories, replicas and keyword stuffed titles before it calculates anything:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;$545.00&lt;/strong&gt;, over 60 matching sales, middle half between $236.77 and $2,861.08.&lt;/p&gt;

&lt;p&gt;Same words. Same window. Same marketplace. A 37x difference in the answer.&lt;/p&gt;

&lt;p&gt;If you are building anything that prices collectibles, this is the whole problem in one example, and it is not specific to my data. Any tool reading the same eBay search sees the same listings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the first number happens
&lt;/h2&gt;

&lt;p&gt;eBay matches on words in the title, and it matches generously. A search for &lt;code&gt;charizard base set psa 10&lt;/code&gt; returns every listing whose title holds those words in any arrangement:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a card sleeve titled "fits PSA 10 Charizard Base Set"&lt;/li&gt;
&lt;li&gt;a bulk lot of commons advertised as "Charizard Base Set PSA 10 chase"&lt;/li&gt;
&lt;li&gt;a raw card described as a "PSA 10 contender"&lt;/li&gt;
&lt;li&gt;a custom fan art proxy&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of those is the card. All of them are cheap, so they drag the middle of the distribution to the floor.&lt;/p&gt;

&lt;p&gt;The difference between pricing tools is entirely in what they throw away after retrieval. Most throw away nothing and show you a median anyway.&lt;/p&gt;

&lt;h2&gt;
  
  
  The trap that looks like the fix
&lt;/h2&gt;

&lt;p&gt;The obvious response is to put more words in the query. Add the card number:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;q=charizard base set psa 10 4/102   -&amp;gt;  median $555.50
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks like it worked. It did not work, it moved. The range is still $4.00 to $35,000, which tells you the set is still full of things that are not the card.&lt;/p&gt;

&lt;p&gt;Two things go wrong when you push identity into the query string:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;More words makes eBay widen, not narrow.&lt;/strong&gt; You get a different population of wrong listings rather than a clean population of right ones.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Card numbers are reused across sets.&lt;/strong&gt; &lt;code&gt;4/102&lt;/code&gt; is Base Set Charizard and it is also a later anniversary reprint. Pinning the number without pinning the set pins nothing.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What actually works: filter on structure, not words
&lt;/h2&gt;

&lt;p&gt;Parse the title into fields, then filter the fields. Grading company, grade, graded status and a junk classifier do almost all of the work:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-G&lt;/span&gt; https://api.compsapi.com/v1/comps &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer YOUR_KEY"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"q=charizard base set"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"graded=true"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"grader=PSA"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"grade=10"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"days=1095"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"stats"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"used_for_stats"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;57&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"median"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;545.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"p25"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;236.77&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"p75"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;2861.08&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"outliers_removed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The classifier flags that matter in practice, each one a listing class that will quietly wreck a median:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Flag&lt;/th&gt;
&lt;th&gt;What it catches&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;lot&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;More than one card sold together&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;mystery&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Repacks and "chance to win a PSA 10" listings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;accessory&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Cases, sleeves, binders, display stands&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;replica&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Customs, proxies, fan art&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;keyword_stuffing&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Several graders named with no grade, to catch searches&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;not_graded_claim&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Raw cards described as a "PSA 10 contender"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;To pin a specific card inside a set, filter after retrieval rather than before it. A post-search filter can only ever remove rows, so the effect is auditable. Text in the query changes which rows come back at all, so it is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three rules if you are building this
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Never ship a median without its sample size.&lt;/strong&gt; A median of three sales is an anecdote. Return &lt;code&gt;count&lt;/code&gt; next to it and let the caller decide.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Return the spread.&lt;/strong&gt; In the cleaned set above the middle half ran $236.77 to $2,861.08. That is not noise to average away, it is the market. A nominally identical slab does not fetch the same price in a quiet week as it does with good photos and a seller with feedback. &lt;code&gt;p25&lt;/code&gt; and &lt;code&gt;p75&lt;/code&gt; are cheap to compute and they stop your users trusting a point estimate they should not.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Treat an empty window as missing data, not a low price.&lt;/strong&gt; eBay's public sold filter reaches back about 90 days. For anything scarce that window is often empty, and the reflex is to loosen the query until something appears. What appears is a different item.&lt;/p&gt;

&lt;h2&gt;
  
  
  The part nobody can see at all
&lt;/h2&gt;

&lt;p&gt;One more thing that silently biases every price model built on eBay sold data: when a sale completes as an accepted Best Offer, the public sold page keeps showing the &lt;strong&gt;asking&lt;/strong&gt; price, not what the buyer paid.&lt;/p&gt;

&lt;p&gt;I matched 5,859 accepted offer sales against what the public page displayed for the same listing. 99.0% read high, by a median of 14.9%, with the top tenth over 40%. Full numbers and method: &lt;a href="https://compsapi.com/best-offer-gap" rel="noopener noreferrer"&gt;compsapi.com/best-offer-gap&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;That error is one directional. It never cancels out, and the data itself will never show it to you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduce it
&lt;/h2&gt;

&lt;p&gt;The free tier is 100 requests a month, no card, every filter on. The numbers above reproduce: &lt;a href="https://compsapi.com/docs" rel="noopener noreferrer"&gt;compsapi.com/docs&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And if you only take one thing from this: ask any pricing tool how many sales its number rests on, over what window, and what it discarded. If it cannot answer all three, it is showing you the median of a junk drawer.&lt;/p&gt;

</description>
      <category>api</category>
      <category>datascience</category>
      <category>python</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Your eBay sold-price data is 14.9% too high and the response looks fine</title>
      <dc:creator>Sam Smith</dc:creator>
      <pubDate>Sat, 10 Oct 2026 16:42:41 +0000</pubDate>
      <link>https://dev.to/sam_compsapi/your-ebay-sold-price-data-is-149-too-high-and-the-response-looks-fine-2b92</link>
      <guid>https://dev.to/sam_compsapi/your-ebay-sold-price-data-is-149-too-high-and-the-response-looks-fine-2b92</guid>
      <description>&lt;p&gt;If your code reads eBay sold prices, it has a bug you cannot see. Not a parsing bug. The number comes back well formed, plausible, in the right currency, and wrong.&lt;/p&gt;

&lt;p&gt;I run CompsAPI, so I hold both the asking price and the accepted price on the same sale. That let me measure the gap instead of guessing at it. Here is what came out, and why no amount of better scraping fixes it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The failure mode
&lt;/h2&gt;

&lt;p&gt;When an eBay listing sells through an accepted Best Offer, eBay's public sold page shows &lt;strong&gt;the asking price&lt;/strong&gt;. The amount the buyer actually paid is not on that page. There is no field holding it, no query parameter that reveals it, and no header that hints the row is affected.&lt;/p&gt;

&lt;p&gt;So the sale closed at $15,500, the page says $24,995, and your parser returns $24,995 with no error. Every tool reading that page returns the same wrong number, which is worse than disagreement, because when two sources agree you stop checking.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I measured
&lt;/h2&gt;

&lt;p&gt;Over the 90 days to 10 October 2026: &lt;strong&gt;5,859 completed Best Offer sales across 5,840 distinct listings&lt;/strong&gt;, from 93 searches in 12 categories. Every pair is matched on listing id, so the asking price and the accepted price belong to the same item on the same sale. No row was discarded.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;99.0% read high&lt;/strong&gt; on the public sold page. 0.7% match within half a percent, 0.4% read low.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Median overstatement 14.9%.&lt;/strong&gt; A typical Best Offer sale shows about a seventh above what it closed at.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;p90 40.8%.&lt;/strong&gt; One sale in ten is overstated by more than two fifths.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Money weighted 14.2%&lt;/strong&gt;, across every dollar that changed hands, so this is not an artifact of cheap items.&lt;/li&gt;
&lt;li&gt;Median accepted price &lt;strong&gt;$240&lt;/strong&gt;, against a median asking price of &lt;strong&gt;$284&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;How the tail behaves, which matters more than the median if you are setting a ceiling:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Overstated by more than&lt;/th&gt;
&lt;th&gt;Share of accepted Best Offer sales&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;5%&lt;/td&gt;
&lt;td&gt;89.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10%&lt;/td&gt;
&lt;td&gt;68.9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25%&lt;/td&gt;
&lt;td&gt;23.4%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;5.9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;100%&lt;/td&gt;
&lt;td&gt;0.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  By category
&lt;/h2&gt;

&lt;p&gt;Every one of the 12 categories sits above 11% money weighted. The ones where sellers list high and expect to negotiate are the worst.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Category&lt;/th&gt;
&lt;th&gt;Sales matched&lt;/th&gt;
&lt;th&gt;Read high&lt;/th&gt;
&lt;th&gt;Median gap&lt;/th&gt;
&lt;th&gt;p90&lt;/th&gt;
&lt;th&gt;Money weighted&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Auto parts&lt;/td&gt;
&lt;td&gt;228&lt;/td&gt;
&lt;td&gt;96.9%&lt;/td&gt;
&lt;td&gt;12.2%&lt;/td&gt;
&lt;td&gt;51.3%&lt;/td&gt;
&lt;td&gt;23.9%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sneakers&lt;/td&gt;
&lt;td&gt;857&lt;/td&gt;
&lt;td&gt;99.9%&lt;/td&gt;
&lt;td&gt;20.0%&lt;/td&gt;
&lt;td&gt;50.0%&lt;/td&gt;
&lt;td&gt;22.0%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Graded trading cards&lt;/td&gt;
&lt;td&gt;390&lt;/td&gt;
&lt;td&gt;99.7%&lt;/td&gt;
&lt;td&gt;15.7%&lt;/td&gt;
&lt;td&gt;40.0%&lt;/td&gt;
&lt;td&gt;17.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Jewellery&lt;/td&gt;
&lt;td&gt;652&lt;/td&gt;
&lt;td&gt;99.1%&lt;/td&gt;
&lt;td&gt;17.6%&lt;/td&gt;
&lt;td&gt;55.6%&lt;/td&gt;
&lt;td&gt;16.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Designer handbags&lt;/td&gt;
&lt;td&gt;723&lt;/td&gt;
&lt;td&gt;98.9%&lt;/td&gt;
&lt;td&gt;17.5%&lt;/td&gt;
&lt;td&gt;46.7%&lt;/td&gt;
&lt;td&gt;15.8%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Video games and consoles&lt;/td&gt;
&lt;td&gt;446&lt;/td&gt;
&lt;td&gt;99.8%&lt;/td&gt;
&lt;td&gt;14.7%&lt;/td&gt;
&lt;td&gt;36.4%&lt;/td&gt;
&lt;td&gt;15.7%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Phones and tablets&lt;/td&gt;
&lt;td&gt;300&lt;/td&gt;
&lt;td&gt;99.7%&lt;/td&gt;
&lt;td&gt;10.0%&lt;/td&gt;
&lt;td&gt;35.9%&lt;/td&gt;
&lt;td&gt;15.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Golf clubs&lt;/td&gt;
&lt;td&gt;599&lt;/td&gt;
&lt;td&gt;99.3%&lt;/td&gt;
&lt;td&gt;13.7%&lt;/td&gt;
&lt;td&gt;33.3%&lt;/td&gt;
&lt;td&gt;14.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Musical instruments&lt;/td&gt;
&lt;td&gt;365&lt;/td&gt;
&lt;td&gt;98.4%&lt;/td&gt;
&lt;td&gt;13.2%&lt;/td&gt;
&lt;td&gt;33.3%&lt;/td&gt;
&lt;td&gt;14.4%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Coins and bullion&lt;/td&gt;
&lt;td&gt;362&lt;/td&gt;
&lt;td&gt;98.1%&lt;/td&gt;
&lt;td&gt;11.1%&lt;/td&gt;
&lt;td&gt;30.0%&lt;/td&gt;
&lt;td&gt;13.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Luxury watches&lt;/td&gt;
&lt;td&gt;655&lt;/td&gt;
&lt;td&gt;98.0%&lt;/td&gt;
&lt;td&gt;11.2%&lt;/td&gt;
&lt;td&gt;31.2%&lt;/td&gt;
&lt;td&gt;12.1%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cameras and lenses&lt;/td&gt;
&lt;td&gt;282&lt;/td&gt;
&lt;td&gt;97.9%&lt;/td&gt;
&lt;td&gt;11.1%&lt;/td&gt;
&lt;td&gt;25.0%&lt;/td&gt;
&lt;td&gt;11.5%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Why a better scraper does not help
&lt;/h2&gt;

&lt;p&gt;A Best Offer is a private negotiation. eBay publishes that the item sold and what it was listed at, and keeps the accepted amount off the public record. This is not a rendering quirk or a lazy loaded element. The number is not in the page, so there is nothing to select.&lt;/p&gt;

&lt;p&gt;That is the part worth internalising if you maintain a pricing pipeline: this is not a coverage problem you can close with more requests. It is a field that does not exist on the surface you are reading.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it does not average out
&lt;/h2&gt;

&lt;p&gt;The instinct with noisy data is that errors cancel. These do not. A Best Offer is almost never accepted &lt;strong&gt;above&lt;/strong&gt; the asking price, so the error is one sided and every affected comp pushes your estimate the same direction.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# The quiet version of this bug in a repricing loop.
&lt;/span&gt;&lt;span class="n"&gt;comps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;fetch_sold_comps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;          &lt;span class="c1"&gt;# some read the public sold page
&lt;/span&gt;&lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;median&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;comps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;list_price&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;target&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.97&lt;/span&gt;               &lt;span class="c1"&gt;# "just under market"
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a third of those comps were accepted offers reading a median 14.9% high, &lt;code&gt;target&lt;/code&gt; is not the market, it is above it, and &lt;code&gt;0.97&lt;/code&gt; does not save you. You sit high, the item does not move, and nothing in the data looks wrong. Four places it bites:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repricing.&lt;/strong&gt; You list against a level nobody paid.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Buying.&lt;/strong&gt; You pay to a ceiling that was never real, and the margin you modelled was not there.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Valuation and insurance.&lt;/strong&gt; Values come out high in exactly the categories people insure: graded cards 17.3% and jewellery 16.8% money weighted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Anything trained on the data.&lt;/strong&gt; A model fed asking prices learns a price level that never cleared.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Getting the accepted figure
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;price&lt;/code&gt; is what the sale closed at, and &lt;code&gt;best_offer&lt;/code&gt; flags which rows were negotiated, so you can measure your own category rather than taking my median for it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-G&lt;/span&gt; https://api.compsapi.com/v1/sold &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer YOUR_KEY"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"q=charizard psa 10"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"days=1095"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"best_offer=1"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;best_offer=only&lt;/code&gt; returns negotiated sales alone, which is the query that produced the tables above. In Python, the gap on your own data is about six lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt;

&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://api.compsapi.com/v1/sold&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Authorization&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bearer YOUR_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
                 &lt;span class="n"&gt;params&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;q&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;charizard psa 10&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;days&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1095&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;best_offer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;only&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="n"&gt;sales&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;items&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sales&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;negotiated sales&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;median accepted&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;median&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;sales&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is also an opt in &lt;code&gt;best_offer=verify&lt;/code&gt; mode that returns a &lt;code&gt;best_offer_confidence&lt;/code&gt; of &lt;code&gt;confirmed&lt;/code&gt;, &lt;code&gt;likely&lt;/code&gt;, &lt;code&gt;unlikely&lt;/code&gt; or &lt;code&gt;unknown&lt;/code&gt; per row, plus the &lt;code&gt;asking_price&lt;/code&gt; and &lt;code&gt;asking_gap_pct&lt;/code&gt; it reasoned from, so you can set your own threshold instead of inheriting mine. It costs extra upstream reads, so it is off by default.&lt;/p&gt;

&lt;p&gt;Free key is 100 requests a month, no card. That is enough to reproduce this on one category.&lt;/p&gt;

&lt;h2&gt;
  
  
  What this does not say
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;It is 93 searches in 12 categories over 90 days, not a census of eBay. Other categories will differ.&lt;/li&gt;
&lt;li&gt;It measures &lt;strong&gt;accepted Best Offer sales only&lt;/strong&gt;. It says nothing about what share of all eBay sales go through an offer, which varies enormously by category. The 14.9% applies to affected rows, not to your whole dataset.&lt;/li&gt;
&lt;li&gt;Three rows of 5,859 have an accepted price under $5 and are almost certainly an opening bid or a bad parse. Dropping every row under $10 moves the median from 14.9% to 14.8% and the money weighted figure from 14.2% to 14.0%, so nothing rests on them.&lt;/li&gt;
&lt;li&gt;0.4% of pairs read low. I report that rather than filtering it out.&lt;/li&gt;
&lt;li&gt;Where one listing sold several units in the window, the accepted figure is the average of that listing's accepted offers. In these categories almost every listing is a single item.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full tables and method: &lt;a href="https://compsapi.com/best-offer-gap" rel="noopener noreferrer"&gt;compsapi.com/best-offer-gap&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you maintain something that prices off eBay comps, the useful takeaway is not my number. It is that the error exists, it is one sided, and it is invisible in the response, so it is worth measuring on your own categories rather than assuming it is small.&lt;/p&gt;

</description>
      <category>ebay</category>
      <category>api</category>
      <category>python</category>
      <category>datascience</category>
    </item>
    <item>
      <title>How to get eBay sold listings data in 2026 (findCompletedItems is dead)</title>
      <dc:creator>Sam Smith</dc:creator>
      <pubDate>Sat, 10 Oct 2026 01:19:48 +0000</pubDate>
      <link>https://dev.to/sam_compsapi/how-to-get-ebay-sold-listings-data-in-2026-findcompleteditems-is-dead-3l2j</link>
      <guid>https://dev.to/sam_compsapi/how-to-get-ebay-sold-listings-data-in-2026-findcompleteditems-is-dead-3l2j</guid>
      <description>&lt;p&gt;If you build anything that needs eBay sold prices, 2026 broke your stack twice. Here is the current state of every route to completed listings data, and working code for the one that still works.&lt;/p&gt;

&lt;p&gt;Full disclosure up front: I run CompsAPI, which is one of the options below. The rest of this post is accurate whether or not you use it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually happened
&lt;/h2&gt;

&lt;p&gt;A short timeline, because half the tutorials online are now wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;2020&lt;/strong&gt;: eBay deprecates &lt;code&gt;findCompletedItems&lt;/code&gt;, the Finding API call everyone used for sold listings.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;February 2025&lt;/strong&gt;: the whole Finding API is decommissioned. Code that called it gets security errors, not data.&lt;/li&gt;
&lt;li&gt;The official replacement, the &lt;strong&gt;Marketplace Insights API&lt;/strong&gt;, is a limited release. You apply with a business case, and approval is restricted to established eBay partners. Most applications go nowhere, and the developer forums are full of people stuck at the same wall.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mid 2026&lt;/strong&gt;: eBay puts the public sold listings filter behind a login. The &lt;code&gt;LH_Sold=1&lt;/code&gt; URL that every scraper and browser extension relied on now redirects to a sign in page for most traffic.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So the two free routes, the official API and scraping the public page, are both gone. What is left:&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 1: Terapeak, if a human is doing the looking
&lt;/h2&gt;

&lt;p&gt;eBay's own research tool (now called Product Research, inside Seller Hub) shows up to three years of sold data. If you price items by hand a few times a day, it is genuinely good and costs nothing extra with a seller account.&lt;/p&gt;

&lt;p&gt;It stops at the browser: no API, no export of research results, and sellers report daily caps on queries. The moment you need sold prices in a spreadsheet, a pricing model or an app, there is no door.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 2: scrapers against the logged in page
&lt;/h2&gt;

&lt;p&gt;Some scrapers now run eBay accounts to get through the login wall. Two structural problems. First, the public sold page shows at most 90 days of history. Second, when a sale closes as an accepted Best Offer, the page shows the asking price, not what the buyer actually paid. In offer heavy categories (watches, cards, anything expensive) those numbers run high by 20 to 40 percent per affected row. A scraper inherits both limits because the page itself is the ceiling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Option 3: a sold listings API
&lt;/h2&gt;

&lt;p&gt;This is what I build. One GET request, JSON back, up to 1,095 days of history per search, and on accepted Best Offer sales the &lt;code&gt;price&lt;/code&gt; field is the real closing amount, flagged per row.&lt;/p&gt;

&lt;p&gt;Get a free key at &lt;a href="https://app.compsapi.com" rel="noopener noreferrer"&gt;app.compsapi.com&lt;/a&gt; (100 searches a month, no card), then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-G&lt;/span&gt; &lt;span class="s2"&gt;"https://api.compsapi.com/v1/sold"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer sk_live_YOUR_KEY"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data-urlencode&lt;/span&gt; &lt;span class="s2"&gt;"q=charizard psa 10"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"days=365"&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s2"&gt;"best_offer=1"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Response, trimmed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"ok"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;239&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"items"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Charizard PSA 10 Base Set Holo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;1450.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"best_offer"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"last_sold"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-10-04 18:32"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"format"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"FIXED_PRICE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"shipping_cost"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;12.5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://www.ebay.com/itm/..."&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"next_page"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That &lt;code&gt;best_offer: true&lt;/code&gt; row is the point. On the eBay page this sale displays its asking price. Here it is the amount it closed at.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Python version
&lt;/h2&gt;

&lt;p&gt;There is a zero dependency client (&lt;a href="https://github.com/compsapi/compsapi-python" rel="noopener noreferrer"&gt;github.com/compsapi/compsapi-python&lt;/a&gt;):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;git+https://github.com/compsapi/compsapi-python.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;compsapi&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;CompsAPI&lt;/span&gt;

&lt;span class="n"&gt;api&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CompsAPI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sk_live_YOUR_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;r&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sold&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;iphone 14 pro 256gb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;365&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;condition&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;used&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;prices&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;s&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;s&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;items&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;count&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; sales, median $&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;prices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prices&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Three years of price history in 15 lines
&lt;/h2&gt;

&lt;p&gt;The thing you could never do with the public page, since it stops at 90 days:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;defaultdict&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;median&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;compsapi&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;CompsAPI&lt;/span&gt;

&lt;span class="n"&gt;api&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;CompsAPI&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sk_live_YOUR_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;monthly&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;defaultdict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;sale&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;iter_sold&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;iphone 14 pro 256gb&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1095&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_results&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;monthly&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;sale&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;last_sold&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][:&lt;/span&gt;&lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;]].&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sale&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;price&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;month&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;monthly&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;median&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;monthly&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;]),&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;(&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nf"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;monthly&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;month&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; sales)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output is a monthly depreciation curve built from real completed sales. Each page of 240 sales costs one request, so a three year pull like this uses about a dozen requests.&lt;/p&gt;

&lt;p&gt;If you want a pre-aggregated answer instead of rows, &lt;code&gt;/v1/comps&lt;/code&gt; returns a cleaned median, the spread and the newest matches in one call, with lots, bundles and wrong model junk filtered before the math runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest limitations
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;eBay US is the primary marketplace, with matching sales from UK, DE, FR, IT, ES, CA and AU merged in or pinned with &lt;code&gt;site=&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;No seller information on rows.&lt;/li&gt;
&lt;li&gt;The free tier is 100 requests a month. Paid plans start at $9.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  If you came here from dead code
&lt;/h2&gt;

&lt;p&gt;Migrating from &lt;code&gt;findCompletedItems&lt;/code&gt;: your &lt;code&gt;keywords&lt;/code&gt; becomes &lt;code&gt;q&lt;/code&gt;, &lt;code&gt;EndTimeFrom/To&lt;/code&gt; becomes &lt;code&gt;days&lt;/code&gt;, &lt;code&gt;entriesPerPage&lt;/code&gt; becomes &lt;code&gt;size&lt;/code&gt; (max 240 instead of 100), and the response is flat JSON instead of a SOAP envelope. There is a field by field mapping at &lt;a href="https://compsapi.com/replace/findcompleteditems" rel="noopener noreferrer"&gt;compsapi.com/replace/findcompleteditems&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Questions welcome in the comments. If you hit something the API does not cover, tell me and there is a decent chance it ships.&lt;/p&gt;

</description>
      <category>ebay</category>
      <category>api</category>
      <category>python</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
