# Apotea Category Listings API Documentation

`GET /api/apotea/apotea.category` returns public logged-out Apotea data as JSON. Prices are numbers in SEK, images are full-size URLs, and each card carries a `slug` plus a numeric `id`. Pass that `slug` unchanged as `product?id=`. Requested sort is honoured and no page or filter is mislabelled. Reviews, page 2+, facet filters, autocomplete and sale-price splits are not published. Internal transport details never appear in a response.

## Credits

A successful request costs **5 credits**. Errors, challenges and empty results cost nothing. The charge appears in `meta.credits_charged`. Clients are never rate limited.

- **Documentation:** [https://scrappa.co/docs/apotea-api/apotea_category](https://scrappa.co/docs/apotea-api/apotea_category)
- **API group:** Apotea API
- **Endpoint:** `GET https://scrappa.co/api/apotea/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 |
| --- | --- | --- | --- |
| `slug` | string | Yes | Public page slug, for example topplista or nyheter-apotea. |
| `sort` | string | No | price_asc (optional, the only proven sort). |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/apotea/category?slug=topplista"
```

## Example response

```json
{
    "success": true,
    "slug": "topplista",
    "returned": 1,
    "products": [
        {
            "id": "6234",
            "slug": "ccs-vardande-handcreme-200-ml",
            "price": 47,
            "currency": "SEK"
        }
    ],
    "sort": null,
    "meta": {
        "endpoint_family": "category",
        "billable": true,
        "attempts": 1,
        "credits_charged": 5
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | No Apotea product exists for that id (`not_found`). Non-billable. |
| 422 | Validation Error | A parameter is missing, unknown or not published by the storefront. Non-billable. |
| 503 | Upstream Unavailable | The source could not be reached, answered with a challenge, or changed its 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)
