# Albert Heijn Search API Documentation

<p><strong>Albert Heijn Search API</strong> searches public products by query or by a taxonomyId from the Categories route. One of the two is required. Pages are 0-based and the requested page and size are honoured. Results are deduplicated on product id.</p><p>Prices are numbers with EUR, with the previous price and discount where published. Images use a larger rendition. Supported filters are bonus, brand and dieet. An unsupported filter returns 422. Filters cannot be combined with taxonomyId or a non-default sort. Filtered answers have no total counts; has_next_page reflects a full page. Costs 1 credit per successful page; failed and empty answers are free.</p>

- **Documentation:** [https://scrappa.co/docs/albert-heijn-api/albert_heijn_search](https://scrappa.co/docs/albert-heijn-api/albert_heijn_search)
- **API group:** Albert Heijn API
- **Endpoint:** `GET https://scrappa.co/api/albert-heijn/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 | No | Search words, for example melk. Required unless taxonomyId is sent |
| `taxonomyId` | string | No | Category id from the Categories route. Required unless query is sent |
| `page` | integer | No | 0-based page number, default 0 |
| `size` | integer | No | Page size from 1 to 100, default 20 |
| `sortOn` | string | No | RELEVANCE, PRICELOWHIGH, PRICEHIGHLOW, TAXONOMY or NUTRISCORE |
| `bonus` | boolean | No | Only bonus products; false is the same as no filter |
| `brand` | string | No | Brand slug filter, for example ah |
| `dieet` | string | No | Diet property filter, for example biologisch |

## Example response

```json
{
    "data": {
        "page": 0,
        "size": 5,
        "count": 5,
        "items": [
            {
                "id": "582865",
                "name": "Halfvolle melk",
                "price": 1.19,
                "currency": "EUR",
                "discount": 0.2,
                "position": 1,
                "unit_price": "EUR 0.79 per liter",
                "regular_price": 1.39
            }
        ],
        "query": "melk",
        "total_pages": 187
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "search"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Unsupported filter | The requested filter cannot be honoured. Not billed. |
| 503 | Data unavailable | The source could not be reached. Not 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)
