# Heureka Product Search API Documentation

`GET /api/heureka/search` Returns public product cards with a numeric product id, canonical url, price as a number plus currency, offer count, shop count, rating on a 0-100 scale, a full-size image and a sponsored flag. Only product rows are returned; articles, tracking clicks and variant labels are dropped. `public_ids` lists canonical urls that the detail routes accept unchanged. Pass `market=sk`. CZ search stays below the 80 percent soak gate and returns 422. Pagination is not public: `page` above 1 returns 422. Sort is echoed in `request_echo` and must be confirmed before a request is billed. If price filters remove every row, the response stays successful with an empty `items` list, a `reason` of `no_items_match_the_requested_filters` and zero credits.

## Credits

A successful request costs **110 credits**. Errors, challenges and empty results cost nothing. Clients are never rate limited.

- **Documentation:** [https://scrappa.co/docs/heureka-api/heureka_search](https://scrappa.co/docs/heureka-api/heureka_search)
- **API group:** Heureka API
- **Endpoint:** `GET https://scrappa.co/api/heureka/search`

## Authentication

Send your Scrappa API key in the `X-API-KEY` request header. Paid endpoints also support accountless x402 payments when called without an API key.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `query` | string | Yes | Search words. Use this or category. |
| `category` | string | Yes | Category slug from search results. |
| `sort` | string | No | Numeric sort code published by the site. |
| `market` | string | No | Site variant: cz or sk. Search ships sk. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/heureka/search?query=iphone&market=sk"
```

## Example response

```json
{
    "success": true,
    "items": [
        {
            "id": 1400243071,
            "title": "Example phone",
            "price_from": 21996,
            "currency": "EUR",
            "category_slug": "mobilne-telefony"
        }
    ],
    "meta": {
        "endpoint_family": "heureka-search",
        "billable": true,
        "attempts": 1,
        "credits_charged": 110
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The public page has no product with that id. Non-billable. |
| 422 | Parameter Not Available | The market or page has not passed its production soak. Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown, conflicting or unusable. Non-billable. |
| 503 | Upstream Unavailable | The source could not be reached or answered with a challenge. Retryable and never billed. |

## More Scrappa resources

- [API documentation](https://scrappa.co/docs)
- [Full LLM-readable API reference](https://scrappa.co/llms-full.txt)
- [OpenAPI specification](https://scrappa.co/docs/api.json)
- [Pricing](https://scrappa.co/pricing)
