# Search listings

Find active listings by keyword, category, price, condition, seller, and listing type.

- Platform: [eBay](https://docs.upscrape.com/docs/platforms/ebay)
- Capability ID: `ebay.products.search`
- Cost: 1 credit per request
- Maximum runtime: 180 seconds
- Execute endpoint: `POST https://data.upscrape.com/execute`

## Request

Use the exact public capability ID in the shared execute envelope.

```bash
curl --request POST \
  --url https://data.upscrape.com/execute \
  --header "Authorization: Bearer $UPSCRAPE_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "limit": 60,
    "page": 1,
    "query": "used laptop"
  },
  "capability": "ebay.products.search"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `category` | `integer` | No | Category to search or list. At least 0. |
| `condition` | `integer` | No | At least 0. |
| `limit` | `integer` | No | Maximum number of results to return. Allowed values: `60`, `120`, `240`. |
| `listing_type` | `string` | No | Allowed values: `bin`, `auction`. |
| `max_price` | `string` | No | Highest price to include. |
| `min_price` | `string` | No | Lowest price to include. |
| `page` | `integer` | No | One-based result page to fetch. From 1 to 100. |
| `query` | `string` | Yes | Search query. |
| `seller` | `string` | No |  |
| `sold` | `boolean` | No | Only active listings are supported. Sold searches require eBay sign-in. Allowed values: `false`. |
| `sort` | `string` | No | Sort order for returned results. Allowed values: `best`, `newest`, `lowest_price`, `highest_price`, `ending_soonest`. |

### Example input

```json
{
  "limit": 60,
  "page": 1,
  "query": "used laptop"
}
```

## Response

Successful output is returned in `results[0].data`.

Raw platform output is intentionally open-ended and may evolve with the upstream source.

### Illustrative sample output

This example shows one response. Values and optional fields vary with the data available.

```json
{
  "has_more": true,
  "limit": 60,
  "listings": [
    {
      "condition": "Good - Refurbished",
      "image_url": "https://i.ebayimg.com/images/g/LdYAAeSw3vtqjGMR/s-l500.jpg",
      "item_id": "286865561827",
      "leaf_category": "177",
      "location": "United States",
      "price": "$294.73",
      "promoted": true,
      "rank": 0,
      "seller_feedback": "99.6% positive (174.3K)",
      "seller_name": "discountcomputerdepot",
      "shipping": "Free delivery in 2-4 days",
      "sold": false,
      "title": "Dell Latitude 14\" Laptop Computer Intel i7 Up To 32GB RAM 1TB SSD Windows 11 Pro",
      "url": "https://www.ebay.com/itm/286865561827"
    },
    {
      "condition": "Good - Refurbished",
      "image_url": "https://i.ebayimg.com/images/g/9MoAAeSwmHdpckMj/s-l500.jpg",
      "item_id": "286601719329",
      "leaf_category": "177",
      "location": "United States",
      "price": "$224.17",
      "promoted": true,
      "rank": 1,
      "seller_feedback": "99.6% positive (174.3K)",
      "seller_name": "discountcomputerdepot",
      "shipping": "Free delivery in 2-4 days",
      "sold": false,
      "title": "Dell Latitude 14\" Laptop Computer Intel i5 Up To 32GB RAM 1TB SSD Windows 11 Pro",
      "url": "https://www.ebay.com/itm/286601719329"
    },
    {
      "image_url": "https://i.ebayimg.com/images/g/7lMAAeSwrd5qludL/s-l140.jpg",
      "item_id": "264987527030",
      "leaf_category": "177",
      "price": "$204.05",
      "promoted": true,
      "rank": 2,
      "sold": false,
      "title": "Dell Latitude 13.3\" Touchscreen 2n1 Laptop Core i5 8GB RAM 256GB SSD Win 11 Pro",
      "url": "https://www.ebay.com/itm/264987527030"
    }
  ],
  "next_page": 2,
  "page": 1,
  "query": "used laptop"
}
```
### Illustrative output fields

Derived from the sample above for orientation only. These fields are not a fixed response schema.

| Path | Observed type | Example |
| --- | --- | --- |
| `has_more` | `boolean` | true |
| `limit` | `integer` | 60 |
| `listings` | `array` | 3 items |
| `listings` | `array` | 3 items |
| `next_page` | `integer` | 2 |
| `page` | `integer` | 1 |
| `query` | `string` | used laptop |

## Execution behavior

A `200` response completed inline. A `202` response was queued; poll `GET /jobs/{id}` until the job reaches `completed` or `failed`. Use an `Idempotency-Key` when retrying must not create a duplicate logical job.

## Related documentation

- [Authentication](https://docs.upscrape.com/docs/api/authentication)
- [Jobs and results](https://docs.upscrape.com/docs/api/jobs)
- [Errors and retries](https://docs.upscrape.com/docs/api/errors)
- [Idempotency](https://docs.upscrape.com/docs/api/idempotency)
