# BRACK.CH Category Products API Documentation

`GET /api/brack/category` returns the products of one BRACK.CH category path. It uses the same filters and item fields as search.

## Category path

Use a path from `breadcrumbs` or a public storefront link, for example `it-multimedia/smartphone`. The path is validated before any lookup. Page numbers match the storefront, and ids seen on an earlier page are removed. Prices are numbers in CHF. An empty page is never billed.

## Credits

A successful request with data costs **1 credit**. Errors, challenges and empty pages cost nothing. The response shows the charge in `meta.credits_charged`.

- **Documentation:** [https://scrappa.co/docs/brack-api/brack_category](https://scrappa.co/docs/brack-api/brack_category)
- **API group:** BRACK.CH API
- **Endpoint:** `GET https://scrappa.co/api/brack/category`

## 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 path such as it-multimedia/smartphone. |
| `page` | integer | No | Result page of 48 products, from 1. |
| `sort` | string | No | priceasc, pricedesc, newdesc, stockdesc, rankasc or nameasc. |
| `brand` | string | No | Exact manufacturer name. |
| `min_price` | number | No | Lowest price in CHF. |
| `max_price` | number | No | Highest price in CHF. |
| `availability` | boolean | No | Only products the storefront lists as available. |
| `offer` | string | No | offer, trade, sale, new or another published offer type. |
| `attribute` | array | No | Attribute facet as slug:value. Repeatable. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/brack/category?category=it-multimedia%2Fsmartphone"
```

## Example response

```json
{
    "success": true,
    "query": null,
    "category": "it-multimedia/smartphone",
    "items": [],
    "page": 1,
    "page_size": 48,
    "next_page": null,
    "sort": null,
    "applied_filters": [],
    "meta": {
        "endpoint_family": "brack-category",
        "billable": false,
        "attempts": 1,
        "credits_charged": 0,
        "unavailable_reason": {
            "no_products": "The page held no usable products."
        }
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing, unknown, conflicting or unusable. Unknown parameters are rejected, never ignored. Non-billable. |
| 503 | Upstream Unavailable | The storefront could not be reached, answered with a challenge, or changed its page shape. 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)
