# How to export eBay sold data to a spreadsheet

URL: https://ebaysoldlistingsapi.com/blog/export-ebay-sold-data-to-spreadsheet

Updated: 2026-09-24



Turn eBay completed sales into a CSV you can open in Excel or Google Sheets, with a short script and a sold-listings API.



If you price inventory in a spreadsheet, you want sold comps sitting right next to your items. Here is how to pull eBay sold data into a CSV in a few lines.

### Pull the sales

Call the API for your keyword and write the results to CSV:

```
import csv, requests
r = requests.get(
    "https://api.ebaysoldlistingsapi.com/scrape",
    params={"keyword": "dyson v11"},
    headers={"Authorization": "Bearer YOUR_API_KEY"},
).json()

with open("sold.csv", "w", newline="") as f:
    w = csv.writer(f)
    w.writerow(["title", "soldPrice", "currency", "endedAt", "condition", "shipping"])
    for i in r["results"]:
        w.writerow([i.get("title"), i.get("soldPrice"), i.get("soldCurrency"),
                    i.get("endedAt"), i.get("condition"), i.get("shippingPrice")])
```

### Open it anywhere

The resulting `sold.csv` opens directly in Excel, Numbers, or Google Sheets. From there you can pivot, chart, or run =MEDIAN() over the price column.

### Google Sheets, live

For a live sheet, put the request behind a small Apps Script or a serverless function that returns CSV, then pull it with IMPORTDATA. Now your comps refresh on demand instead of going stale. The step-by-step version, with a ready Apps Script and a daily trigger, is pull eBay sold prices into Google Sheets automatically (https://ebaysoldlistingsapi.com/blog/pull-ebay-sold-prices-into-google-sheets).

Q: Can I get eBay sold data in Excel?
A: Yes. Call the eBay Sold Listings API, write the results to a CSV, and open it in Excel. A short script (shown above) does the whole thing.

Q: Do I need eBay developer approval?
A: No. The eBay Sold Listings API is an independent service; you just need an API key from your dashboard.
