# X-Kom Categories API Documentation

<p><strong>X-Kom Categories API Documentation</strong> List the public X-Kom category tree. Each group and child has a numeric id, a name and a product count. Use any returned category id unchanged as the category of the search route. Cost: 1 credit per successful request. Failed requests are not billed.</p>

- **Documentation:** [https://scrappa.co/docs/xkom-api/xkom_categories](https://scrappa.co/docs/xkom-api/xkom_categories)
- **API group:** X-Kom API
- **Endpoint:** `GET https://scrappa.co/api/xkom/categories`

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

## Example response

```json
{
    "data": {
        "categories": [
            {
                "id": 2,
                "name": "Komputery",
                "children": [
                    {
                        "id": 159,
                        "name": "Laptopy",
                        "products_count": 4224
                    }
                ],
                "products_count": 12000
            }
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "categories"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 502 | Upstream Unavailable | X-Kom could not be reached. Retry. Not billed. |

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