Skip to content
Scrappa Get API key
X-Kom API 1 credit / request

X-Kom Categories API Documentation

GET https://scrappa.co/api/xkom/categories

X-Kom Categories API Documentation 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.

X-Kom Categories API Documentation 1 credit / request

Endpoint

Request preview
GET
https://scrappa.co/api/xkom/categories
Auth header
x-api-key
Cost
1 credit / request
Response preview
200 OK
{
    "data": {
        "categories": [
            {
                "id": 2,
                "name": "Komputery",
                "children": [
                    {
                        "id": 159,
                        "name": "Laptopy",
                        "products_count": 4224
                    }
                ],
                "products_count": 12000
...

Response Schema

Example response fields are illustrative; inspect the JSON before integrating.

Example response fields

Scan these fields before integrating.

data meta success
JSON Response
200 OK
{
    "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

Handle these documented responses before retrying or showing customer-facing failures.

502

Upstream Unavailable

X-Kom could not be reached. Retry. Not billed.

{
    "meta": {
        "billable": false
    },
    "error": {
        "code": "UPSTREAM_UNAVAILABLE",
        "message": "X-Kom is temporarily unavailable. Please retry."
    },
    "success": false
}

Generate Code with AI

Copy a ready-made prompt with all the endpoint details, parameters, and example responses. Paste it into ChatGPT, Claude, or any AI assistant to instantly generate working code.

Try It Live

Test this endpoint in our interactive playground with real data.