# Zara Categories API Documentation

<p><strong>Zara Categories API</strong> returns the categories of one country as a flat list. Each category has <code>category_id</code>, name, section, the parent names in <code>path</code>, <code>level</code>, whether it has subcategories and the page url. Use the <code>category_id</code> as <code>category_id</code> in <code>/api/zara/search</code>. Send <code>section</code> (WOMAN, MAN, KID or HOME) to get one section; without it all four sections are returned, which is a large answer. Menu dividers, titles and entries without a name or page are left out. A category that several sections link appears once and <code>sections</code> names all of them; the <code>section</code> filter matches any of them. Some top-level entries group subcategories and may list no products. The tree is cached for six hours. A successful request costs 1 credit.</p>

- **Documentation:** [https://scrappa.co/docs/zara-api/zara_categories](https://scrappa.co/docs/zara-api/zara_categories)
- **API group:** Zara API
- **Endpoint:** `GET https://scrappa.co/api/zara/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 |
| --- | --- | --- | --- |
| `country` | string | No | Country: us (default), de, es, fr or uk. Prices use the currency of the country. |
| `section` | string | No | Optional: WOMAN, MAN, KID or HOME. Without it all four sections are returned. |

## Example response

```json
{
    "data": {
        "total": 410,
        "country": "us",
        "section": "MAN",
        "categories": [
            {
                "url": "https://www.zara.com/us/en/man-l534.html",
                "name": "MAN",
                "path": [],
                "level": 0,
                "section": "MAN",
                "sections": [
                    "MAN"
                ],
                "category_id": "1885841",
                "has_subcategories": true
            },
            {
                "url": "https://www.zara.com/us/en/man-jeans-l659.html",
                "name": "JEANS",
                "path": [
                    "MAN",
                    "COLLECTION"
                ],
                "level": 2,
                "section": "MAN",
                "sections": [
                    "MAN"
                ],
                "category_id": "2432130",
                "has_subcategories": true
            }
        ]
    },
    "meta": {
        "credits": 1,
        "billable": true,
        "endpoint_family": "categories"
    },
    "success": true
}
```

## Errors

| Status | Error | Description |
| --- | --- | --- |
| 404 | Not Found | The category tree was not found. This response is not billable. |
| 422 | Validation Error | A parameter is missing or invalid, or a filter cannot be honoured. This response is not billable. |
| 503 | Upstream Unavailable | Zara could not be reached, or it returned data that does not match the request (another section, another page, a block page). This response is not billable and is retryable. |

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