# eBay Sold Items API

Get recent sold eBay listings for any product search: what each item actually sold for, the buyer protection fee and shipping where shown, the total, the sold date, condition, sale type and the seller, on 17 eBay marketplaces.

**Pricing:** $0.01 per listing

**Endpoint:** `POST /v1/data/ebay/sold/run`

**Auth:** `Authorization: Bearer mk_live_...`

## Parameters

| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `keywords` | string | Yes | Product words a buyer would type, e.g. 'nintendo switch oled'. One search per run. Listings of a different model than the one you name (iPhone 12 for 'iphone 13') are left out. A web address is not accepted. |
| `marketplace` | string | No | Which eBay site to search. Prices come in that site's currency, and condition and location labels in its language. eBay.com by default. |
| `days` | integer | No | Only sales from the last N days (whole days, UTC). Last 30 days by default; eBay keeps about 90 days of sold listings. |
| `maxResults` | integer | No | How many sold listings to return in total. Defaults to 100; use 0 for all. |

## Example

`?wait=true` holds the request open until the run finishes (up to 60s) and returns the rows inline: one request, no polling.

```bash
curl -X POST "https://api.mindcase.co/v1/data/ebay/sold/run?wait=true" \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"params":{"keywords":"..."}}'
```

```python
import requests

resp = requests.post(
    "https://api.mindcase.co/v1/data/ebay/sold/run",
    params={"wait": "true"},
    headers={"Authorization": "Bearer mk_live_YOUR_API_KEY"},
    json={"params": {
    "keywords": "..."
}},
)
rows = resp.json()["data"]
```

## Longer runs

If the run is still going at the 60s ceiling you get back `{ job_id, status: "running" }` instead of rows (same if the result is over 100 rows; those come back `truncated`). Poll with that `job_id`:

```bash
# 1) check status
curl https://api.mindcase.co/v1/jobs/JOB_ID \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"

# 2) when status == completed, fetch the rows
curl https://api.mindcase.co/v1/jobs/JOB_ID/results \
  -H "Authorization: Bearer mk_live_YOUR_API_KEY"
```

Full API reference (auth, jobs, balance, SDKs, MCP): https://mindcase.co/skills.md

## Response columns

| Field | Display name | Type |
|-------|--------------|------|
| `itemId` | Item ID | text |
| `title` | Title | text |
| `url` | URL | url |
| `marketplace` | Marketplace | text |
| `soldPrice` | Sold Price | number |
| `currency` | Currency | text |
| `buyerProtectionFee` | Buyer Protection Fee | number |
| `shippingPrice` | Shipping Price | number |
| `totalPrice` | Total Price | number |
| `soldDate` | Sold Date | date |
| `condition` | Condition | text |
| `listingType` | Listing Type | text |
| `bestOfferAccepted` | Best Offer Accepted | boolean |
| `bidCount` | Bid Count | number |
| `categoryId` | Category ID | text |
| `categoryName` | Category Name | text |
| `itemLocation` | Item Location | text |
| `sellerType` | Seller Type | text |
| `mainImage` | Main Image | url |
| `seller` | Seller | object |
