# Search promotions

Inspect sponsored listings and promotional placements in search results.

- Platform: [eBay](https://docs.upscrape.com/docs/platforms/ebay)
- Capability ID: `ebay.search.promotions`
- 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.search.promotions"
}'
```

## Input


| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | `integer` | No | Maximum number of results to return. Allowed values: `60`, `120`, `240`. |
| `page` | `integer` | No | One-based result page to fetch. From 1 to 100. |
| `query` | `string` | Yes | Search query. |

### 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
{
  "banners": [
    {
      "filled": true,
      "height": "-1",
      "location": "below_pagination",
      "placement_id": "278",
      "type": "html",
      "width": "-1"
    }
  ],
  "sponsored_listings": [
    {
      "item_id": "327340271850",
      "leaf_category": "177",
      "promoted": true,
      "rank": 0,
      "variant_id": "0"
    },
    {
      "item_id": "264987527030",
      "leaf_category": "177",
      "promoted": true,
      "rank": 1,
      "variant_id": "0"
    },
    {
      "item_id": "147465369570",
      "leaf_category": "177",
      "promoted": true,
      "rank": 2,
      "variant_id": "0"
    }
  ]
}
```
### Illustrative output fields

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

| Path | Observed type | Example |
| --- | --- | --- |
| `banners` | `array` | 1 items |
| `banners` | `array` | 1 items |
| `sponsored_listings` | `array` | 3 items |
| `sponsored_listings` | `array` | 3 items |

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