> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scrapebadger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Categories

> Wallapop's full category tree with localised names — the ids are the category_id values search and filters accept.

Wallapop's full category tree. Every `id` in the tree, at any depth, works as the `category_id` in [search](https://docs.scrapebadger.com/api-reference/endpoint/wallapop/search-items.md) and [filters](https://docs.scrapebadger.com/api-reference/endpoint/wallapop/list-filters.md).

**Credits:** 1

## Authorization

**X-API-Key** `string` *required*

Your ScrapeBadger API key.

## Query Parameters

**market** `string` (default: es)

`es`, `it`, or `pt`. Sets the language of category names. See [`/v1/wallapop/markets`](https://docs.scrapebadger.com/api-reference/endpoint/wallapop/list-markets).

## Response

**categories** `Category[]`

Top-level categories, each with its subcategories nested.

**Category**

**id** `integer`

Category id, e.g. `100` (Cars) or `24200` (Technology & electronics).

**name** `string | null`

Localised category name.

**parent\_id** `integer | null`

Parent category id; `null` for top-level categories.

**vertical** `string | null`

Wallapop vertical, e.g. `consumer_goods` or `cars`. Subcategories inherit it from their parent.

**icon** `string | null`

Wallapop icon name for the category, e.g. `car`.

**subcategories** `Category[]`

Child categories, with the same shape, nested to any depth.

**market** `string`

The market used for the request.

## Example

```bash cURL theme={null}
curl "https://scrapebadger.com/v1/wallapop/categories?market=es" \
  -H "X-API-Key: YOUR_API_KEY"
```

```python Python theme={null}
import requests

res = requests.get(
    "https://scrapebadger.com/v1/wallapop/categories",
    headers={"X-API-Key": "YOUR_API_KEY"},
    params={"market": "es"},
)
data = res.json()
```

```javascript Node.js theme={null}
const res = await fetch("https://scrapebadger.com/v1/wallapop/categories?market=es", {
  headers: { "X-API-Key": process.env.SCRAPEBADGER_API_KEY },
});
const data = await res.json();
```

```bash CLI theme={null}
scrapebadger wallapop categories --market es
```

```json Response theme={null}
{
  "categories": [
    {
      "id": 100,
      "name": "Coches",
      "parent_id": null,
      "vertical": "cars",
      "icon": "car",
      "subcategories": []
    },
    {
      "id": 12465,
      "name": "Moda y accesorios",
      "parent_id": null,
      "vertical": "consumer_goods",
      "icon": "t-shirt",
      "subcategories": [
        {
          "id": 11002,
          "name": "Mujer",
          "parent_id": 12465,
          "vertical": "consumer_goods",
          "icon": null,
          "subcategories": [
            {
              "id": 11004,
              "name": "Ropa",
              "parent_id": 11002,
              "vertical": "consumer_goods",
              "icon": null,
              "subcategories": []
            }
          ]
        }
      ]
    }
  ],
  "market": "es"
}
```

> [!NOTE]
>
> Listing categories costs **2 credits**. Failed requests are not charged.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.