# Wehkamp Product Search API Documentation

`GET /api/wehkamp/wehkamp.search` returns public Wehkamp data as JSON. Prices are numbers in EUR with the original price, sale price and computed discount; the `prijs` filter is in cents. Ids are 8-digit productNumbers accepted unchanged by the product, batch and reviews routes. Images are full-size URLs. Ratings and review counts are numbers and review dates are ISO 8601. Requested filters are honoured and a later page never returns page one.

## Credits

A successful request costs **1 credit**. Errors, challenges and empty results cost nothing. The response shows the charge in `meta.credits_charged`. Clients are never rate limited.

- **Documentation:** [https://scrappa.co/docs/wehkamp-api/wehkamp_search](https://scrappa.co/docs/wehkamp-api/wehkamp_search)
- **API group:** Wehkamp API
- **Endpoint:** `GET https://scrappa.co/api/wehkamp/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 |
| --- | --- | --- | --- |
| `term` | string | Yes | Search words, for example jas. |
| `pagina` | integer | No | 1-based page; 96 items per page. |
| `prijs` | string | No | Cents range such as 1000-5000. |
| `sortering` | string | No | Only laagste-prijs is supported. |
| `kleur` | string | No | Colour facet. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/wehkamp/search?term=jas&pagina=1"
```

## Example response

```json
{
    "success": true,
    "currency": "EUR",
    "products": [
        {
            "product_number": "17579821",
            "title": "Example",
            "pricing": {
                "price": 24.99,
                "currency": "EUR"
            }
        }
    ],
    "total": 0,
    "meta": {
        "endpoint_family": "wehkamp-search",
        "billable": true,
        "attempts": 1,
        "credits_charged": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The catalogue has no record for that id (`not_found`). Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown, conflicting or unusable. Unknown parameters are rejected. Non-billable. |
| 503 | Upstream Unavailable | The source could not be reached, answered with a challenge, or changed its response shape (`upstream_blocked`, `upstream_unavailable`, `parser_drift`). Retryable and never billed. Clients are never rate limited. |

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