---
title: "List Cpge Exercises"
method: GET
path: "/cpge-exercises"
tags: ["cpge_exercises"]
---

# List Cpge Exercises

`GET /cpge-exercises`

Retrieve CPGE exercises from `public_exercises` (library='cpge').

Preserves the legacy API shape: the storage is unified since migration
013, but the router still returns CPGEExerciseOut and accepts the old
filiere/banque/type_exercice triplet.

- filiere: Optional filiere to filter by (e.g. MP, PSI, PC)
- banque: Optional banque to filter by (e.g. X, ENS, Centrale, Mines Pont, CCINP)
- type_exercice: Optional chapter slug to filter by
- random_selection: If True, returns a single random exercise from the filtered results

## Query parameters

- `filiere` string, nullable — Filter by filiere (e.g. MP)
- `banque` string, nullable — Filter by banque (e.g. X)
- `type_exercice` string, nullable — Filter by type (e.g. Algèbre)
- `random_selection` boolean — Select one random exercise from matches

## Response `200`

Successful Response

- CPGEExerciseOut[]
  - `id` string, required
  - `filiere` string, required
  - `banque` string, required
  - `type_exercice` string, required
  - `content` string, required
  - `solution` string, required
  - `figure_content` string, nullable
  - `figure_solution` string, nullable
  - `hints1` string, nullable
  - `hints2` string, nullable
  - `hints3` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## 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/8d495ed916c6/schema)
