# Marktplaats Categories API Documentation

List the top-level Marktplaats.nl categories, or pass category_id to get one category with its subcategories. Each category has an id, name, key and, for subcategories, parent_id. Use the ids as category_id and subcategory_ids in the search endpoint.

- **Documentation:** [https://scrappa.co/docs/marktplaats-api/marktplaats_categories](https://scrappa.co/docs/marktplaats-api/marktplaats_categories)
- **API group:** Marktplaats API
- **Endpoint:** `GET https://scrappa.co/api/marktplaats/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.

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `category_id` | integer | No | Top-level category id, e.g. 445. Omit to list all top-level categories. |

## Example request

```bash
#!/bin/bash

curl -X GET \
    -H "x-api-key: YOUR_API_KEY_HERE" \
    "https://scrappa.co/api/marktplaats/categories?category_id=445"
```

## Example response

```json
{
    "success": true,
    "data": {
        "category": {
            "id": 445,
            "name": "Fietsen en Brommers",
            "key": "fietsen-en-brommers"
        },
        "categories": [
            {
                "id": 2735,
                "name": "Brommerhelmen",
                "key": "brommerhelmen",
                "parent_id": 445
            },
            {
                "id": 712,
                "name": "Brommeronderdelen | Algemeen",
                "key": "brommeronderdelen-algemeen",
                "parent_id": 445
            },
            {
                "id": 1623,
                "name": "Kreidler",
                "key": "brommeronderdelen-kreidler",
                "parent_id": 445
            },
            {
                "id": 2027,
                "name": "Oldtimers",
                "key": "brommeronderdelen-oldtimers",
                "parent_id": 445
            }
        ]
    },
    "meta": {
        "endpoint_family": "categories",
        "billable": true
    }
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 422 | Validation Error | A parameter is missing or invalid. This response is not billable and makes no upstream request. |
| 404 | Resource Not Found | The requested Marktplaats category does not exist. This response is not billable. |
| 503 | Invalid Source Response | Marktplaats answered with a shape that no longer matches the documented contract. This response is not billable. |
| 503 | Service Unavailable | The upstream service is temporarily unavailable. Please retry shortly. |

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