Skip to content
Command Palette
Search for a command to run...
QuizBase · Docs

GET /v1/stats#

GET /api/v1/stats Public — no key

Aggregate counters — total questions, per-language, per-source, per-category. No API key required. Cached for 5 minutes server-side (Redis) with Cache-Control: public, s-maxage=300, stale-while-revalidate=60.

Use this for landing pages, dashboards, and status boards.

Parameters#

ParameterTypeDefaultDescription
lang enumenSupported: `en`, `pl`. Sets the language of `byCategory[].name`. Counts themselves are not per-language — `byLanguage` always returns all languages present in the catalog. Any other value returns `400`.

Examples#

Response#

Performance#

  • p50 (warm): ~25ms
  • p95: ~30ms (sustained 50 RPS, baseline)
  • Last measured: 2026-05-07
  • SLO: p95 < 500ms, error rate < 1%
  • Read path: public_stats_snapshots table, then a 5 min Redis cache. No live aggregation on the request path.

See also#