# Search listings

Return current Amazon search listings with prices, ratings, badges, and sponsored disclosure.

- Platform: [Amazon Commerce](https://docs.upscrape.com/docs/platforms/amazon)
- Capability ID: `amazon.products.search`
- Cost: 1 credit per request
- Maximum runtime: 45 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 YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Prefer: wait=30" \
  --data '{
  "input": {
    "limit": 24,
    "page": 1,
    "query": "wireless earbuds",
    "sort": "average_review"
  },
  "capability": "amazon.products.search"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `department` | `string` | No | Department supplied for this request. |
| `limit` | `integer` | No | Maximum number of results to return. |
| `max_price` | `number` | No | Max price supplied for this request. |
| `min_price` | `number` | No | Min price supplied for this request. |
| `node` | `string` | No | Node supplied for this request. |
| `page` | `integer` | No | One-based result page to fetch. |
| `query` | `string` | Yes | Search query. |
| `refinements` | `array<string>` | No | Refinements supplied for this request. |
| `sort` | `string` | No | Sort order for returned results. Allowed values: `featured`, `price_low_to_high`, `price_high_to_low`, `average_review`, `most_recent`, `bestsellers`. |

### Example input

```json
{
  "limit": 24,
  "page": 1,
  "query": "wireless earbuds",
  "sort": "average_review"
}
```

## 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 redacted fixture is an example, not a fixed response schema.

```json
{
  "has_next": false,
  "limit": 24,
  "page": 1,
  "query": "wireless earbuds",
  "results": [
    {
      "asin": "B0H9CYZCYL",
      "currency": "USD",
      "image_url": "https://m.media-amazon.com/images/I/717VeiPNjDL._AC_SX148_SY213_QL70_.jpg",
      "position": 1,
      "price": "$79.99",
      "prime": false,
      "rating": 5,
      "reviews_count": 2,
      "sponsored": false,
      "title": "GNMN Active Noise Cancelling Ear Buds Wireless Earbuds 96hrs Playback Bluetooth Headphones Dual Battery Display Stereo Bass Earphones with Earhooks Microphone IPX7 Waterproof for Sports/Runing/Workout",
      "url": "https://www.amazon.com/dp/B0H9CYZCYL"
    },
    {
      "asin": "B0HB95MBY5",
      "badge": "Limited time deal",
      "currency": "USD",
      "image_url": "https://m.media-amazon.com/images/I/71ym35VlGmL._AC_SX148_SY213_QL70_.jpg",
      "position": 2,
      "price": "$32.00",
      "prime": false,
      "rating": 5,
      "sponsored": false,
      "title": "Wireless Earbuds, Bluetooth 5.4 Headphones with Multifunctional Touch Screen, 48H Bass Stereo Ear Buds with ANC/ENC Noise Cancelling/Transparency Mode, IPX7 Earphones with 5 EQ Modes for iOS Android",
      "url": "https://www.amazon.com/dp/B0HB95MBY5"
    },
    {
      "asin": "B0HC18NGB3",
      "currency": "USD",
      "image_url": "https://m.media-amazon.com/images/I/61tXgQLSZrL._AC_SX148_SY213_QL70_.jpg",
      "position": 3,
      "price": "$32.99",
      "prime": false,
      "rating": 5,
      "sponsored": false,
      "title": "Wireless Earbuds, Bluetooth 5.4 Headphones with 42H Ultralight Ear Buds,Bluetooth Earbuds with 4 ENC Noise Cancelling Mics, HiFi Deep Bass Dual LED Display Waterproof Earphones for Android iOS, Rose",
      "url": "https://www.amazon.com/dp/B0HC18NGB3"
    }
  ],
  "source": "semantic search-result attributes"
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `has_next` | `boolean` | false |
| `limit` | `integer` | 24 |
| `page` | `integer` | 1 |
| `query` | `string` | wireless earbuds |
| `results` | `array` | 3 items |
| `results` | `array` | 3 items |
| `source` | `string` | semantic search-result attributes |

## 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)
