# bonprix Category Products API Documentation

Scrappa's `GET /api/bonprix/search` lists the products of a bonprix category as JSON. Get category slugs from the sitemap endpoint.

## What you get

Each item has `article_id`, `title`, `url`, numeric `price`, `original_price`, `discount_percent`, `currency`, `availability` and a full-size `image`. The response also has `page`, `total_pages`, `total` and `shop_id`.

`image` uses the largest public CDN size shipped by bonprix. `original_price` is filled from the on-site sale state when the site shows a strike price; it is `null` when the site shows none or sets it to zero.

## The page is honoured

`page` is checked against the returned page state. When bonprix does not return the requested page, the request returns `422` and is never billed. Page 1 is never returned under another page number.

Sort and facet values (`sob`, `fh_*` and `a_*`, including a price range) are not offered yet. The live site has not mapped those enums, so accepting them could silently ignore a requested filter. This is a named follow-up for `coverage_expansion`.

## Credits

A successful request costs **1 credit**. Errors and `404` answers cost nothing. The response shows the charge in `meta.credits_charged`.

- **Documentation:** [https://scrappa.co/docs/bonprix-api/bonprix_search](https://scrappa.co/docs/bonprix-api/bonprix_search)
- **API group:** bonprix API
- **Endpoint:** `GET https://scrappa.co/api/bonprix/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 |
| --- | --- | --- | --- |
| `category` | string | Yes | Category slug from the sitemap. |
| `page` | integer | No | Result page, 1-50. |
| `site` | string | No | Storefront: DE (default) or AT. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/bonprix/search?category=damenmode&page=1"
```

## Example response

```json
{
    "success": true,
    "category": "damenmode",
    "items": [
        {
            "position": 1,
            "article_id": "926761",
            "title": "Kleid aus Baumwolle",
            "price": 17.99,
            "original_price": 24.99,
            "discount_percent": 28,
            "currency": "EUR",
            "availability": "in_stock",
            "image": "https://www.bonprix.de/image/926761/1400x1960.jpg"
        }
    ],
    "page": 1,
    "total_pages": 4,
    "total": 336,
    "shop_id": "5489",
    "meta": {
        "endpoint_family": "bonprix-search",
        "billable": true,
        "attempts": 1,
        "credits_charged": 1
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Page Not Applied | bonprix did not apply the requested page or identifier (`upstream_rejected`). The request fails instead of returning unchecked results. Non-billable. |
| 422 | Validation Error | A query parameter is missing, unknown or unusable. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | bonprix could not be reached in time, answered with a block or returned an unexpected page. 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)
