---
title: "Random questions sample"
method: GET
path: "/api/v1/questions/random"
tags: ["Questions"]
---

# Random questions sample

`GET /api/v1/questions/random`

## Request

- Base URL: `https://quizbase.runriva.com`
- URL: `https://quizbase.runriva.com/api/v1/questions/random`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Up to 50 random questions in the requested language. Filter set identical to `/questions`.

## Query parameters

- `amount` integer
- `lang` 'en' | 'pl': Display language for category names + slug labels (subcategories/tags)
- `category` string
- `difficulty` 'trivial' | 'easy' | 'medium' | 'hard' | 'expert'
- `type` 'multiple' | 'boolean' | 'text_input'
- `tags` string
- `tags_any` string
- `topic` string
- `topics_any` string
- `subcategory` string
- `quality` 'high' | 'standard' | 'all': Quality preset: "high" (default) = cleanest, most broadly-useful questions; "standard" = broader pool incl. niche; "all" = everything incl. flagged-for-review
- `regions` string: Cultural affinity codes. A question is tagged with a region if residents of that country, or members of that cultural/religious group, are statistically more likely to know the answer (NOT geography of the subject). Lowercase ISO 3166-1 alpha-2 (e.g. `us`, `pl`, `gb`) plus cultural codes (`jewish`, `christian-catholic`, `islam`). AND-logic. Empty array on a question = universally accessible (no cultural advantage). Discover via `GET /api/v1/regions`. Uppercase tolerated on input (normalized to lowercase).
- `source` string: Filter by source database — one or more of: arc, creak, entityq, kqa-pro, mintaka, mkqa, nq-open, opentdb, opentriviaqa, qasc, quizbase, webq. Comma-separated for multiple (include / OR). Matches `attribution.source` per question.
- `exclude_source` string: Exclude one or more source databases (comma-separated). Use to drop noisy auto-generated sources, e.g. `exclude_source=entityq`. Applied after `source` if both are present.
- `license` 'CC-BY-SA-4.0' | 'CC-BY-SA-3.0' | 'CC-BY-4.0' | 'MIT' | 'proprietary'
- `exclude` string

## Response `200`

Random sample.

- QuestionsRandomResponse
  - `data` Question[], required
    - `id` string, uuid, required
    - `text` string, required
    - `correctAnswer` string, required
    - `incorrectAnswers` string[], required
    - `type` 'multiple' | 'boolean' | 'text_input', required
    - `difficulty` 'trivial' | 'easy' | 'medium' | 'hard' | 'expert' | 'null', nullable, required
    - `language` string, required
    - `category` CategoryRef, required
      - `id` integer, required
      - `slug` string, required
      - `name` string, required
    - `subcategories` SlugLabel[], required: Localized `{slug, label}` per `?lang=`.
      - `slug` string, required
      - `label` string, required
    - `tags` SlugLabel[], required: Localized `{slug, label}` per `?lang=`.
      - `slug` string, required
      - `label` string, required
    - `regions` string[], required: Cultural affinity codes — residents/members of these countries or cultural groups are statistically more likely to know the answer. Lowercase ISO 3166-1 alpha-2 (`us`, `pl`, `gb`) + cultural codes (`jewish`, `christian-catholic`, `islam`). Empty array = universally accessible. Discover the full catalog via `GET /api/v1/regions`.
    - `attribution` Attribution, required
      - `author` string, nullable, required: Upstream contributor or community.
      - `source` string, required: Source slug.
      - `license` string, required: Effective applied license (SPDX).
      - `licenseVersion` string, nullable, required: Original upstream license version.
      - `licenseUrl` string, nullable, required
      - `sourceId` string, required: Original upstream id.
      - `url` string, nullable, required: Link to upstream record.
      - `modifications` string[], required: Our modifications per BY-SA § 3(a)(1)(B). e.g. `translated_pl`, `refined_text`, `quizified`.
      - `lastModified` string, required: ISO timestamp of our last modification.
    - `quality` 'high' | 'needs_review': Quality flag. Present only when the client requested non-default content via `?quality=all` (REST) or `quality: "all"` (MCP) — and always on `/api/v1/questions/{id}` deep-link responses. For default `?quality=high` all returned questions are by definition `high`, so the field is omitted to avoid redundancy. `needs_review` = flagged for moderation review (low-quality distractors, trivial answer-in-question patterns).
    - `translationOf` string, uuid, nullable, required: Direct parent (usually English source) when this is a translation.
    - `rootQuestionId` string, uuid, nullable, required: Canonical source across translation chains.
    - `translator` 'machine' | 'human' | 'native' | 'null', nullable, required: Translation provenance. `null` for original-language records.
    - `explanation` string, nullable, required: Optional explanation of the correct answer.
    - `extensions` object, required: Forward-compatible container for stable per-source extras. Today exposes `subcategories: string[]` (also surfaced as the typed top-level `subcategories` field). Future stable fields land here additively.
    - `createdAt` string, required
    - `updatedAt` string, required
  - `meta` MetaRandom, required
    - `count` integer, required
    - `language` string, required: Language of the response content.
    - `requestId` string, uuid, required: Unique request identifier (also in `X-Request-Id` response header).

## Other responses

- `400`: Invalid query parameters.
- `401`: Missing, malformed, invalid, or revoked API key.
- `403`: IP not allowed (per-key allowlist).
- `429`: Rate limit exceeded. See `Retry-After` header.
- `500`: Server error.

---

[API](https://skmtc.dev/runriva/apis/quizbase-api.md) · [All operations](https://skmtc.dev/runriva/apis/quizbase-api/llms.txt) · [OpenAPI document](https://skmtc.dev/runriva/apis/quizbase-api/revisions/4c2f9be78ec9?raw)
