---
title: "Get Exercise Counts By Category Path"
method: GET
path: "/public-exercises/counts-by-category-path"
tags: ["public_exercises"]
---

# Get Exercise Counts By Category Path

`GET /public-exercises/counts-by-category-path`

Return `{ "Grade / Chapter / Thematic": count }` for every distinct
`category_path` in the library (Legacy included). The key format is
`segments.join(" / ")` so the caller can build both chapter-level and
thematic-level badges in one round-trip:

  counts["Terminale / Probabilités"]              // chapter-level
  counts["Terminale / Probabilités / Loi binomiale"] // thematic-level

Chapter-level counts are rolled up by the caller from the thematic
entries (or read directly when an exercise is stored at chapter depth).

## Query parameters

- `subject` 'maths' | 'physique-chimie', nullable — Scope counts to a matière (see list endpoint).

## Response `200`

Successful Response

- object

## 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.dev/excellence-ai/apis/excellence-learning/revisions/a5af9b3b34f7?raw)
