# bonprix Search Suggestions API Documentation

Scrappa's `GET /api/bonprix/suggest` returns the product suggestions bonprix shows while a shopper types. It is autocomplete, not a full result page.

## What you get

`suggestions` holds up to six products with `article_id`, `title`, numeric `price`, `currency`, `formatted_price`, a full-size `image` and an absolute `url`. `terms` holds the matching search phrases. Pass an `article_id` unchanged to the product and reviews endpoints.

An empty suggestion list still answers `200` with `success: true`, but has `meta.billable: false` and `meta.credits_charged: 0`. No product data means no charge.

## Credits

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

- **Documentation:** [https://scrappa.co/docs/bonprix-api/bonprix_suggest](https://scrappa.co/docs/bonprix-api/bonprix_suggest)
- **API group:** bonprix API
- **Endpoint:** `GET https://scrappa.co/api/bonprix/suggest`

## 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, for example kleid. |
| `limit` | integer | No | Product suggestions, 1-6. |
| `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/suggest?query=kleid&limit=6"
```

## Example response

```json
{
    "success": true,
    "query": "kleid",
    "suggestions": [
        {
            "article_id": "926761",
            "title": "Kleid und Bolero aus reiner Baumwolle",
            "price": 17.99,
            "currency": "EUR",
            "formatted_price": "17,99 \u20ac",
            "image": "https://image01.bonprix.de/assets/1400x1960/1792591369/26117928-Bl6xFYOM.webp",
            "url": "https://www.bonprix.de/produkt/kleid-926761/"
        }
    ],
    "terms": [
        "kleid damen"
    ],
    "meta": {
        "endpoint_family": "bonprix-suggest",
        "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)
