Command Palette
Search for a command to run...
GET /v1/topics#
GET
/api/v1/topics Public — no key List of curated topics — stable conceptual identifiers (e.g. star-wars, world-war-ii) with all aliases that map to them in the dataset, plus question counts. No API key required. Cached for 1h server-side, with Cache-Control: public, s-maxage=3600.
Counts freshness: question counts are pre-aggregated and refreshed when the dataset changes. Refresh cadence is irregular at launch — focus is on dataset quality and new languages, not a fixed import schedule. Once that pipeline lands we’ll publish the schedule.
Use this for typeahead search, dropdown filters, or as the first step of any “give me questions about X” flow.
Parameters#
| Parameter | Type | Default | Description |
|---|---|---|---|
| lang | enum | en | Display language for `label`. Supported: `en`, `pl`. Other values return `400`. |
| q | string | — | Substring search across label, slug, and aliases (case-insensitive, 1–64 chars). |
| kind | enum | — | `tag` or `subcategory`. Limits results to one taxonomy layer. |
| cursor | string | — | Slug of the last item from the previous page. Use `_links.next` to navigate. |
| limit | int | 100 | Page size, 1–500. |
Examples#
Response#
{
"data": [
{
"slug": "biography",
"kind": "subcategory",
"label": "Biography",
"aliases": [
"biography",
"biographical-facts",
"biographies",
"biographical-data",
"biographical-details",
"celebrity-biography"
],
"count": 64977
},
{
"slug": "american-history",
"kind": "subcategory",
"label": "American History",
"aliases": [
"american-history",
"united-states-history",
"us-history"
],
"count": 19449
}
],
"meta": {
"count": 2,
"total": 2184,
"language": "en",
"requestId": "req_..."
},
"_links": {
"next": "/api/v1/topics?lang=en&limit=2&cursor=..."
}
}Performance#
- p50 (warm): ~23ms
- p95: ~28ms (sustained 50 RPS, baseline)
- Last measured: 2026-05-07
- SLO: p95 < 500ms, error rate < 1%
- Backed by pre-aggregated topic counts + 1h response cache.
See also#
- GET /v1/categories — the 24 OpenTDB-aligned top-level categories
- GET /v1/tags — raw tags (10k+) when curated topics aren’t enough
- GET /v1/subcategories — middle taxonomy layer
- GET /v1/questions/random — fetch questions filtered by
?topic= - Multi-round quiz tutorial — end-to-end example using topics + filters