eBay API
The TrueScrape eBay API exposes 2 public endpoints covering eBay listing details and Search eBay listings. Every call is a GET against public, logged-out pages and returns the same unified schema as every other platform here. Calls cost 1 credit each. A cache hit is free, and a failed or empty response is never charged.
Endpoints
| Endpoint | Returns | Credits | Cacheable | Batchable |
|---|---|---|---|---|
| /v1/ebay/product | eBay listing details | 1 | yes | yes |
| /v1/ebay/search | Search eBay listings | 1 | yes | yes |
Reference
/v1/ebay/product1 creditcacheablebatchableeBay listing details
Public details for an eBay listing: title, price, condition, seller and an inline sample of reviews. **Required:** Pass either product_id or url.
| Parameter | Type | Required | Description |
|---|---|---|---|
| product_id | string | no | Numeric eBay item id, e.g. 166619046796 |
| url | string | no | eBay listing URL, e.g. https://www.ebay.com/itm/166619046796 |
| tld | string | no | eBay marketplace, default com. One of: com, co.uk, com.au, de, ca, fr, it, es, at, ch, com.sg, com.my, ph, ie, pl, nl |
| country_code | string | no | — |
Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).
Returns one Product.
Fields
| Field | Type | Present | Description |
|---|---|---|---|
| platform | one of 32 strings | always | |
| id | string | always | The product id on its marketplace: the ASIN on Amazon, the item id on Walmart and eBay. Always a string. |
| title | string | null | always | |
| brand | string | null | always | |
| description | string | null | always | |
| url | string | null | always | |
| imageUrls | string[] | always | |
| price | number | null | always | The price a buyer pays now, in `currency`. |
| currency | string | null | always | ISO 4217 currency code for the amounts in this record, such as USD or EUR. |
| listPrice | number | null | always | The struck-through reference price shown next to `price` when the listing shows a discount. |
| availability | in_stock | out_of_stock | preorder | discontinued | unknown | null | always | Stock status. `unknown` means the listing showed a status that could not be read as one of the other values. |
| rating | number | null | always | Average customer rating, out of 5. |
| reviewCount | number | null | always | Number of ratings or reviews the marketplace reports for the product, not the number of entries in `reviews`. |
| sellerName | string | null | always | |
| shipsFrom | string | null | always | The party the item ships from, as the listing names it. |
| marketplace | string | null | always | The marketplace site this product was read from, such as `amazon.co.uk`. |
| categories | string[] | always | Category breadcrumb, from the broadest category to the most specific. |
| featureBullets | string[] | always | |
| attributes | Record<string, string> | always | Specifications as label and value pairs. Which labels appear varies by marketplace and category. |
| reviews | ProductReview[] | always | A sample of reviews shown on the product page, not the full review list. |
| fetchedAt | string | always | When this record was retrieved, as an ISO 8601 timestamp. |
curl "$API/v1/ebay/product?cache_max_age=7d" \
-H "x-api-key: $KEY"const query = new URLSearchParams({
cache_max_age: '7d',
});
const response = await fetch(`${API}/v1/ebay/product?${query}`, {
headers: { 'x-api-key': KEY },
});
const body = await response.json();
if (!body.success) throw new Error(body.error.code);
// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);Python
import os, httpx
r = httpx.get(
f"{os.environ['API']}/v1/ebay/product",
params={
"cache_max_age": "7d",
},
headers={"x-api-key": os.environ["KEY"]},
timeout=30,
)
body = r.json()
if not body["success"]:
raise RuntimeError(body["error"]["code"])
print(body["data"], body["meta"]["creditsCharged"])Response codes
| 200 | Success |
| 400 | invalid_request. Not charged |
| 401 | missing_api_key / invalid_api_key / revoked_api_key. Never a billing error |
| 402 | insufficient_credits. The key is valid, the balance is not |
| 429 | daily_cap_exceeded or upstream_rate_limited. Not charged |
| 501 | not_configured. This deployment is not set up to serve this endpoint. Not charged. |
| 502 | upstream_blocked / upstream_schema_drift. Not charged |
| 504 | upstream_timeout. Not charged |
/v1/ebay/search1 creditcacheablebatchableSearch eBay listings
Public eBay search results for a query, with eBay's own filters and sort orders.
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | yes | Search terms, e.g. "iphone 13" |
| tld | string | no | eBay marketplace, default com. One of: com, co.uk, com.au, de, ca, fr, it, es, at, ch, com.sg, com.my, ph, ie, pl, nl |
| country_code | string | no | — |
| page | number | no | — |
| items_per_page | number | no | — |
| sort_by | ending_soonest | newly_listed | price_lowest | price_highest | distance_nearest | best_match | no | — |
| seller_id | string | no | — |
| condition | string | no | Comma list: new, used, open_box, refurbished, for_parts, not_working |
| buying_format | string | no | Comma list: buy_it_now, auction, accepts_offers |
| show_only | string | no | Comma list: returns_accepted, authorized_seller, completed_items, sold_items, sale_items, listed_as_lots, search_in_description, benefits_charity, authenticity_guarantee |
Also accepts cache_max_age (a hit costs 0 credits) and include_raw (returns the untouched upstream payload under raw).
Returns a list of SearchResultItem in data.items.
Fields
| Field | Type | Present | Description |
|---|---|---|---|
| platform | one of 32 strings | always | |
| position | number | null | always | Rank of the result on the page it was read from, starting at 1, in the order the source served it. |
| id | string | null | always | The listing id on its platform, such as an Amazon ASIN. Where the source shows no id, this is the result URL, or the title when there is no URL. |
| title | string | null | always | |
| url | string | null | always | |
| thumbnailUrl | string | null | always | |
| price | number | null | always | Price shown on the result, in `currency`. Where a price range is shown, the lowest price. |
| currency | string | null | always | ISO 4217 currency code for the amounts in this record, such as USD or EUR. |
| listPrice | number | null | always | The struck-through reference price shown on the result, when there is one. |
| rating | number | null | always | Average customer rating, out of 5. |
| reviewCount | number | null | always | |
| sellerName | string | null | always | |
| availability | in_stock | out_of_stock | preorder | discontinued | unknown | null | always | Stock status. `unknown` means the listing showed a status that could not be read as one of the other values. |
| badges | string[] | always | Labels shown on the result, such as Best Seller or Amazon's Choice. |
| isSponsored | boolean | null | always | True for a paid placement. False only where the source marks a result as not sponsored; a result with no sponsored label is null. |
| fetchedAt | string | always | When this record was retrieved, as an ISO 8601 timestamp. |
curl "$API/v1/ebay/search?query=ai%20agents&cache_max_age=7d" \
-H "x-api-key: $KEY"const query = new URLSearchParams({
query: 'ai agents',
cache_max_age: '7d',
});
const response = await fetch(`${API}/v1/ebay/search?${query}`, {
headers: { 'x-api-key': KEY },
});
const body = await response.json();
if (!body.success) throw new Error(body.error.code);
// 1 credit, 0 on a cache hit
console.log(body.data, body.meta.creditsCharged);Python
import os, httpx
r = httpx.get(
f"{os.environ['API']}/v1/ebay/search",
params={
"query": "ai agents",
"cache_max_age": "7d",
},
headers={"x-api-key": os.environ["KEY"]},
timeout=30,
)
body = r.json()
if not body["success"]:
raise RuntimeError(body["error"]["code"])
print(body["data"], body["meta"]["creditsCharged"])Response codes
| 200 | Success |
| 400 | invalid_request. Not charged |
| 401 | missing_api_key / invalid_api_key / revoked_api_key. Never a billing error |
| 402 | insufficient_credits. The key is valid, the balance is not |
| 429 | daily_cap_exceeded or upstream_rate_limited. Not charged |
| 501 | not_configured. This deployment is not set up to serve this endpoint. Not charged. |
| 502 | upstream_blocked / upstream_schema_drift. Not charged |
| 504 | upstream_timeout. Not charged |
Questions
- How much does the eBay API cost?
- Calls cost 1 credit each. Every endpoint is cacheable, and a cache hit costs nothing. A failed request and an empty result are both free, on every endpoint.
- Does the eBay API need a login or cookies?
- No. Every endpoint reads public, logged-out pages only — no account, no cookies, no session. An API key identifies your own TrueScrape account and nothing else.
- Can I fetch many eBay targets in one request?
- Yes. 2 of 2 are batchable: one POST to /v1/jobs/batch takes many targets and returns a job id to poll.
- Can I watch eBay endpoints for changes?
- Yes, 1 of 2. A subscription polls on your schedule and fires your webhook only when the content changed; the rest carry x-subscribable: false in the spec.