> ## Documentation Index
> Fetch the complete documentation index at: https://docs.querying.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# eBay API

> Search eBay as JSON: ranked products with prices, ratings and review counts, in the order the store shows them.

Search eBay (ebay.com) through the async task API. Send `COMMERCE_SERP` with `site` `ebay` to get the products a search shows, in the store's order. `COMMERCE_PRODUCT` does not read this store's product pages. A completed search costs **0.5 credits**.

## Search

```bash theme={"theme":"css-variables"}
curl -X POST https://api.querying.ai/v1/async/task \
  -H "Authorization: Bearer $QUERYING_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "taskType": "COMMERCE_SERP", "payload": { "site": "ebay", "query": "wireless earbuds", "limit": 3 } }'
```

Submit the task, then poll `GET /v1/async/task/{id}` or receive its webhook. See [Async tasks](https://docs.querying.ai/concepts/async-tasks.md).

### Parameters

* `site`: Required. `ebay`.
* `query`: Required. The search query, 1-500 characters.
* `limit`: Optional integer from 1 to 40, default 20.
* `country`: Optional. Defaults to `US`, the store's country. Any other country is rejected with `422 REGION_UNSUPPORTED`.

Only the payload fields listed above are accepted. Omit `include`: even `include: {}` returns `422 VALIDATION_ERROR` on `payload.include` before credits are held.

### Response example

```json theme={"theme":"css-variables"}
{
  "site": "ebay",
  "query": "wireless earbuds",
  "country": "US",
  "returnedCount": 3,
  "products": [
    {
      "rank": 1,
      "productId": "265983500898",
      "title": "Skullcandy SESH ANC Wireless In-ear Bluetooth Earbuds (Certified Refurb)-BLACK",
      "url": "https://www.ebay.com/itm/265983500898",
      "price": 16.14,
      "currency": "USD",
      "rating": 4.5,
      "reviewCount": 76,
      "imageUrl": "https://i.ebayimg.com/images/g/YmgAAOSwdBRjH640/s-l500.jpg"
    },
    {
      "rank": 2,
      "productId": "377628519624",
      "title": "TWS Bluetooth 5.1 Earbuds Wireless Noise Cancelling Waterproof Headset",
      "url": "https://www.ebay.com/itm/377628519624",
      "price": 6.9,
      "currency": "USD",
      "imageUrl": "https://i.ebayimg.com/images/g/8HkAAeSwYV1q7y3W/s-l500.jpg"
    },
    {
      "rank": 3,
      "productId": "366736231992",
      "title": "Apple AirPods Pro 3rd Wireless Active Noise Cancelling Earbuds - White MFHP4LL/A",
      "url": "https://www.ebay.com/itm/366736231992",
      "price": 136.99,
      "currency": "USD",
      "rating": 5,
      "reviewCount": 13,
      "imageUrl": "https://i.ebayimg.com/images/g/19QAAeSw8KJq9UoX/s-l500.jpg"
    }
  ]
}
```

### Result fields

* `site`, `query` and `country` echo the request. `returnedCount` is the number of entries in `products`.
* Each product includes `rank`, `productId`, `title` and `url`. `productId` is the eBay item number. `rank` follows the store's default order, and listings the store marks as sponsored are left out.
* `price`, `rating`, `reviewCount` and `imageUrl` appear when the results page shows them. `price` is a number in the product's `currency` (ISO 4217); when sizes are priced apart, it is the lowest one.
* `rating` uses a five-point scale. Abbreviated review counts such as 999+ are left out.
* Each search returns products from the store's first results page.

## Errors and billing

* A search that returns no products ends as a failed task.
* Only completed searches are charged, 0.5 credits each.

## Related

* [Amazon](https://docs.querying.ai/engines/amazon.md)
* [Walmart](https://docs.querying.ai/engines/walmart.md)
* [Target](https://docs.querying.ai/engines/target.md)
* [All Commerce stores](https://docs.querying.ai/engines/overview.md#commerce)
* [Credits and limits](https://docs.querying.ai/concepts/credits-and-limits.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.