# Knuspr Filters And Sorting API Documentation

<p><strong>Knuspr Filters And Sorting API</strong> lists public facet groups with their keys and match counts, or the sort options for search and offers. The keys feed the filter data on the search route.</p><p>Send <code>mode</code> search, category, sorting or sale_sorting. A search needs <code>search</code>; a category needs <code>category</code>. Costs 1 credit per request; empty results and failed requests are free.</p>

- **Documentation:** [https://scrappa.co/docs/knuspr-api/knuspr_filters](https://scrappa.co/docs/knuspr-api/knuspr_filters)
- **API group:** Knuspr API
- **Endpoint:** `GET https://scrappa.co/api/knuspr/filters`

## 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 |
| --- | --- | --- | --- |
| `mode` | string | Yes | search, category, sorting or sale_sorting. |
| `search` | string | No | Search text, required for mode=search. |
| `category` | string | No | Category id, required for mode=category. |
| `category_type` | string | No | sales or normal for mode=category, default sales. |

## Example response

```json
{
    "data": {
        "mode": "sorting",
        "sorting": [
            {
                "key": "recommended",
                "label": "Empfohlen"
            }
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "filters"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | The mode or a required value is invalid. This response is not billable. |
| 503 | Upstream Unavailable | The source could not be reached. This response is not billable. |

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