eBay search API
eBay listings for a query on any of 19 eBay sites, with eBay’s sort, condition, format, sold-listings, price and aspect filters.
GET /v1/ebay/search2 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/ebay/search?query=iphone%2015&show_only=sold",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 2 credits{ "query": "iphone 15", "country": "US", "page": 1, "next_page": 2, "total_results": null, "items": [ { "item_id": "227537680346", "title": "T-Mobile Apple iPhone 16 - 128GB Black - 92% Batt - Fair Cond - Crck Back - READ", "subtitle": "Apple iPhone 16 · 128 GB · Metro", "url": "https://www.ebay.com/itm/227537680346", "image": "https://i.ebayimg.com/images/g/J90AAeSwvOBqtXLA/s-l300.webp", "condition": "Pre-Owned", "price": { "value": 341.99, "currency": "USD", "raw": "$341.99" }, "attributes": [ "$341.99$359.99", "$324.89 with coupon", "… 4 more" ], "bids": null, "is_sponsored": false }, { "item_id": "335761219642", "title": "Apple iPhone 13 Pro (Great Condition) - (Unlocked, AT&T, Verizon, T-Mobile)", "subtitle": "Apple iPhone 13 Pro · 128 GB · Factory Unlocked", "url": "https://www.ebay.com/itm/335761219642", "image": "https://i.ebayimg.com/images/g/GCoAAeSwsgZpjOVt/s-l300.webp", "condition": "Pre-Owned", "price": { "value": 349.99, "currency": "USD", "raw": "$349.99" }, "attributes": [ "$349.99 to $449.99$469.99", "From $332.49 with coupon", "… 4 more" ], "bids": null, "is_sponsored": false }, "… 6 more" ]}Parameters
| Name | Type | Description |
|---|---|---|
queryquery · required | string | Search keywords. Example: iphone 15. |
countryquery | "US" | "GB" | "AU" | "CA" | "DE" | "FR" | "IT" | "ES" | "IE" | "AT" | "CH" | "NL" | "BE" | "PL" | "SG" | "MY" | "PH" | "HK" | "MX" | eBay site: US (default), GB, AU, CA, DE, FR, IT, ES, IE, AT, CH, NL, BE, PL, SG, MY, PH, HK, MX. One of US, GB, AU, CA, DE, FR, IT, ES, IE, AT, CH, NL, BE, PL, SG, MY, PH, HK, MX. |
pagequery | integer | |
sort_byquery | "best_match" | "price_low" | "price_high" | "newly_listed" | "ending_soonest" | One of best_match, price_low, price_high, newly_listed, ending_soonest. |
conditionquery | string | Comma-separated: new, refurbished, used. |
buying_formatquery | string | Comma-separated: auction, buy_it_now, accepts_offers. |
show_onlyquery | string | Comma-separated: free_shipping, sold, completed, returns_accepted, local_pickup, authorized_seller, free_returns. |
min_pricequery | number | null | |
max_pricequery | number | null | |
aspectsquery | string | Item aspects: Name=Value pairs separated by ; |
Response fields
200 with a EbaySearch, in eBay’s own listing labels and the schema.org Product it embeds.
| Field | Type | Description |
|---|---|---|
query | string | |
country | string | |
page | number | |
next_page | number | null | |
total_results | number | null | |
items | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | A page of listings. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | The item does not exist or was removed. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | eBay is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
eBay is a trademark of eBay Inc. We are not affiliated with or endorsed by eBay.