May 31, 2026
Exact match counts, uniform random sampling, faster reads
This release sharpens the pieces you build quizzes on: accurate totals when you ask for them, unbiased random questions, and lower latency on the most common reads.
Added
- Exact match counts on demand. Add
?count=exactto/api/v1/questionsand the response includesmeta.total— the precise number of questions matching your filters, computed in milliseconds. Use it when you want to show "N results"; skip it when you're just paging.
Changed
- Pagination is cursor-first by default. Without
?count, responses no longer include a total — page forward with the cursor and_links.next(the pattern large APIs use). Ask for?count=exactonly when you need the number. The field ismeta.total. - Random sampling is now uniform.
/api/v1/questions/randomreturns an evenly distributed, unbiased sample across the whole matching set — previously sampling leaned toward certain slices of the catalog. Same call, better spread. - Faster reads. Listing, category-filtered queries, random, and single-question lookups all return quicker — typical reads are in the tens of milliseconds when warm. See /docs/performance for the current numbers.
- Per-question totals stay exact in discovery.
/api/v1/tags,/subcategories,/topics, and/regionsalready return an exactcountper item — the place to look when you want "how many questions are in X" without scanning. - TypeScript SDK.
@quizbase/clientis now0.9.0—meta.total(replacing the old estimate field) andcount: 'exact' | 'none'typings.
Removed
- The approximate count (
?count=estimate). The estimate could be far off on narrow filter combinations, so we replaced it with the exact opt-in count above. If you were sending?count=estimate, switch to?count=exactfor an accurate total or drop the parameter to page by cursor.