---
title: "Get Teacher Categories"
method: GET
path: "/public-exercises/categories"
tags: ["public_exercises"]
---

# Get Teacher Categories

`GET /public-exercises/categories`

Return the `category_path` tree with cumulative counts.

## Query parameters

- `include_legacy` boolean — Include the 'Legacy' bucket (uncategorized exercises).
- `subject` 'maths' | 'physique-chimie', nullable — Scope the tree to a matière (see list endpoint).

## Response `200`

Successful Response

- TeacherCategoryNode
  - `name` string, required
  - `path` string[], required
  - `exercise_count` integer, required
  - `children` TeacherCategoryNode[]

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) · [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/excellence-ai/excellence-learning/revisions/437cd8414e9e/schema)
