eBay UK sold listings API

The eBay UK sold listings API is the same GET /ebay/v1/sold with site=EBAY_GB. Every result is a sale on ebay.co.uk, priced in pounds. One script, in Python and Node, returns the last 100 sales of one item and prices it from them.

Do these steps

Click the button to copy this prompt, then paste it into your coding agent. The link tells it which page you came from.

prompt
Read https://trawl.dev/llms.txt?from=/guides/ebay-uk-sold-listings-api and help me integrate this API into my project.
  1. Set your API key. Get a key from the free tier. One key works on both marketplaces.
    terminal
    export TRAWL_API_KEY=your_key
  2. Send site=EBAY_GB with the search. Without it the call searches ebay.com. Nothing else in the request changes.
  3. Run the script in your language. Python needs the requests package. Node 18 needs nothing more. The search costs 1 credit.
the script
# uk_comps.py  (pip install requests)
import os
import statistics
import requests

# The last 100 UK sales of one item, used, priced from the sales. site=EBAY_GB is the whole change.
r = requests.get(
    "https://api.trawl.dev/ebay/v1/sold",
    headers={"x-api-key": os.environ["TRAWL_API_KEY"]},
    params={
        "site": "EBAY_GB",
        "query": "iphone 15 pro 256gb",
        "condition": "used",
        "exclude": "max,case,cracked,parts,locked",
        "max_pages": 1,  # up to 100 sales, 1 credit
    },
    timeout=30,
)
r.raise_for_status()
sold = r.json()
sales = sold["results"]
prices = sorted(s["sale_price"] for s in sales)
n = len(prices)
print(f"{sold['count']} sales on {sold['site']}, {sold['credits_charged']} credit, prices in {sold['currency']}")
print(f"median {statistics.median(prices):.2f}, low {prices[0]:.2f}, high {prices[-1]:.2f}")
print(f"middle half {prices[n // 4]:.2f} to {prices[3 * n // 4]:.2f}")
print("latest five:")
for s in sales[:5]:
    print(f"  {s['date_sold'][:10]}  {s['currency']}{s['sale_price']:>8.2f}  {s['title'][:56]}")
terminal · printed 2026-10-17
100 sales on EBAY_GB, 1 credit, prices in GBP
median 426.95, low 2.80, high 700.39
middle half 380.20 to 474.99
latest five:
  2026-10-17  £  506.49  Apple iPhone 15 Pro 256GB Blue Titanium 5G Smartphone (A
  2026-10-17  £  353.50  Apple iPhone 15 Pro 256GB Unlocked White iOS 48MP 5G Sma
  2026-10-17  £  469.20  Apple iPhone 15 Pro - 256GB - Natural Titanium (Unlocked
  2026-10-17  £  379.00  iPhone 15 Pro 256GB Natural Titanium
  2026-10-17  £  368.80  Apple iPhone 15 Pro 256GB Black Titanium USB-C A17 Pro 4

What changes on ebay.co.uk

Every price in the answer is in pounds: sale_price, shipping_price, and the min_price and max_price you send. Nothing is converted. date_sold is the sale date on UK time. Category ids are specific to a marketplace, so look them up with site=EBAY_GB on the eBay Category IDs API before you filter on one. The low of 2.80 in the output is a mislisted item. The median ignores it, which is why the median is the price to use.

The price a UK buyer paid

For a UK private seller, eBay adds a Buyer Protection fee to every price it shows, and the buyer pays it. sale_price is that figure: the price the buyer saw and paid, fee included. Business sellers carry no fee. The fee is 10p plus 7% of the first £20, 4% of £20 to £300 and 2% of £300 to £4,000, with VAT on top. A £290 sale shows as £302.30. To recover the seller's own figure in the £20 to £300 band, take 70p off and divide by 1.04.

More than 100 sales

A count of 100 means the page is full and older sales exist. Raise max_pages for up to 2,000 in one response, and follow next_cursor past that. Send category with no query for every sale in a UK category. The eBay Sold Listings API reference has every parameter. How the comps become a price is the subject of the eBay sold comps API guide, and how this compares to a service that reads eBay's sold search for you is Trawl vs the SoldComps API.