Public catalog counters with live breakdowns by language, source, category, difficulty, topic, tag.
USE WHEN: showing catalog overview, picking a category programmatically, building landing copy, deciding "do we have enough X-content for this quiz".
OUTPUT FIELDS:
- total: approved questions in 'en' + 'pl'.
- byLanguage: { en: N, pl: N }.
- bySource: { entityq: N, mintaka: N, 'kqa-pro': N, ... } — 12 keys, one per source database.
- byDifficulty: { trivial: N, easy: N, medium: N, hard: N, expert: N, unrated: N } — null difficulty mapped to 'unrated'. trivial/expert populated by LLM calibration.
- byCategory: top 24 with localized names.
- byTopic / byTag: top 30 curated topics + top 30 tags with localized labels.
- meta: { generatedAt: ISO 8601, language }.
INPUTS: lang (default "en") affects byCategory[].name and byTopic[].label / byTag[].label.
DATA FRESHNESS: snapshot regenerated daily (~03:00 UTC) + on demand after batch imports. generatedAt shows when. Counts stable ±0.01% between snapshots.
COMMON MISTAKES: polling stats every request (cache it on your side; 5-min Redis TTL on ours); treating bySource keys as stable enum (use quizbase_languages / quizbase_categories for canonical input enums).
Connector