# Products Search

Search Iceland groceries by keyword with published prices, pack sizes and ranked product results.

- Platform: [Iceland](https://docs.upscrape.com/docs/platforms/iceland)
- Capability ID: `iceland.products.search`
- Cost: 5 credits per request
- Maximum runtime: 30 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": {
    "page": 1,
    "query": "semi skimmed milk"
  },
  "capability": "iceland.products.search"
}'
```

## Input

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | `integer` | No | One-based result page to fetch. From 1 to 100. |
| `query` | `string` | Yes | Search query. |

### Example input

```json
{
  "page": 1,
  "query": "semi skimmed milk"
}
```

## 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,
  "items": [
    {
      "available": true,
      "brand": "Iceland",
      "currency": "GBP",
      "gtin": null,
      "image": "https://assets.iceland.co.uk/i/iceland/[redacted:token].jpg",
      "member_prices": [],
      "name": "Iceland British Semi-Skimmed Milk 2 Litres",
      "pack_size": "2l",
      "price": 1.65,
      "promotions": [
        {
          "buy_quantity": 2,
          "description": "2 for £3.00",
          "end": null,
          "for_price": 3,
          "id": "12660",
          "start": null,
          "type": "multibuy"
        }
      ],
      "retailer_product_id": "19492",
      "unit_price": {
        "amount": 0.83,
        "unit": "per_litre"
      },
      "url": "https://www.iceland.co.uk/p/[redacted:token]/19492.html"
    }
  ],
  "page": 1,
  "total": 18
}
```
### 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 |
| `items` | `array` | 1 items |
| `items` | `array` | 1 items |
| `page` | `integer` | 1 |
| `total` | `integer` | 18 |

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