---
title: "Hierarchical CNAE tree"
method: GET
path: "/api/v1/cnae/tree"
tags: ["Sectors"]
---

# Hierarchical CNAE tree

`GET /api/v1/cnae/tree`

Return the CNAE-2009 hierarchy with counts read only from the offline sector projection. Cached 24h; no live aggregation is performed.

## Response `200`

CNAE tree

- CnaeTreeResponse
  - `sections` CnaeNode[], required
    - `code` string
    - `name` string
    - `level` integer, nullable
    - `parent` string, nullable
    - `companies_count` integer, nullable
    - `count_status` 'precomputed' | 'not_precomputed'
    - `children` CnaeNode[]

## Other responses

- `429` — Rate limit exceeded
- `503` — The public read failed closed because its legal source catalog, subject classification, bounded projection, database helper or required artifact is unavailable. Clients must not infer an empty result.

---

[API](https://skmtc.net/openmercantil/apis/openmercantil-public-api.md) · [All operations](https://skmtc.net/openmercantil/apis/openmercantil-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openmercantil/openmercantil-public-api/versions/996f96a11758/schema)
