Skip to content

Questions, filtered and paged. The answer is withheld unless asked for.

GET
/api/v1/questions
curl --request GET \
--url https://api.utmelab.com/api/v1/questions \
--header 'X-API-Key: <X-API-Key>'
topic
string | null

Drill by topic slug.

subtopic
string | null

Drill one subtopic id.

exam
string | null

Scope to an exam.

subject
string | null

Scope to a subject within that exam.

verified
boolean | null

Only human-checked questions. Default: no filter.

year
integer | null format: int32

Scope to one cohort year.

source
string | null

Scope to a provenance, e.g. past_paper.

q
string | null

Substring search over the question text.

country
string | null

Scope to a country; a question with no stated scope survives any.

include_explanation
boolean | null

Include the answer and the working. Default: false.

include_passage
boolean | null

Include companion passages for questions referencing them. Default: false.

page
integer | null format: int32

1-based page. Default: 1.

per_page
integer | null format: int32

Rows per page, clamped. Default: 50, cap: 200.

Media typeapplication/json

One page of a collection in the shape every paged endpoint serves. The envelope lives here, once, so a new paged endpoint cannot re-derive the counts: total_pages comes from total_records and per_page through [Page::new], never from the call site.

The collection field is questions because both surfaces that page today page questions; a future non-question page renames it there.

object
includes_explanation
required
boolean
page
required
integer format: int32
passages
object | null
per_page
required
integer format: int32
questions
required
Array<object>

One question as served. Identical to storage except the answer and working, which are present only when explicitly requested. An answer in a default payload gets rendered by somebody, eventually, by accident. verified comes from the verification log, never a stored flag.

object
answer

Present only when explanations were requested.

string | null
difficulty
required
integer format: int32
exam
required
string
explanation
One of:

Why the answer is what it is: teaser, working, and the distractor that catches people.

object
body
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
key_point
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
trap
One of:

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
id
required
string
lesson_refs

Lessons that teach the idea assessed by this question.

Array<object>
object
id
required
string
order

Canonical position of this reference within its parent.

integer format: int32
title
string
marks
required
number format: float
options
required
Array<object>
object
id
required
string
text
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
passage
One of:

The attached stimulus if requested.

object
author
string | null
exam
required
string
id
required
string
kind
required
string
subject
required
string
text
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
title
string | null
year
required
integer format: int32
passage_id

A stimulus this row belongs to. Fetch it, never ignore it: the stem may be unanswerable without it.

string | null
section
string | null
source
required
string
subject
required
string
subtopic_id
string | null
text
required

Plain text plus offset marks. text stays searchable as characters; structure rides in inline as Unicode-scalar offsets, never bytes.

object
inline
required
Array

One offset mark. Serialised flat with an adjacent kind tag, e.g. {"start":24,"len":6,"kind":"underline"}.

object
One of:
object
kind
required
string
Allowed values: bold
len
required

Length in Unicode scalar values. Zero for an image anchor, which marks an attachment point rather than a span.

integer format: int32
start
required

Offset in Unicode scalar values from the start of text.

integer format: int32
text
required
string
topic_slug

The syllabus topic tag for this question when the catalogue provides one.

string | null
verified
required
boolean
year
required
integer format: int32
total_pages
required
integer format: int32
total_records
required
integer

Example

{
"questions": [
{
"explanation": {
"body": {
"inline": [
{
"kind": "bold"
}
]
},
"key_point": {
"inline": [
{
"kind": "bold"
}
]
},
"trap": {
"inline": [
{
"kind": "bold"
}
]
}
},
"options": [
{
"text": {
"inline": [
{
"kind": "bold"
}
]
}
}
],
"passage": {
"text": {
"inline": [
{
"kind": "bold"
}
]
}
},
"text": {
"inline": [
{
"kind": "bold"
}
]
}
}
]
}

An API key is missing or invalid.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The API key lacks the required scope.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

A filter naming a subject the bank never had

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The caller has exceeded the applicable rate limit.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}

The API is temporarily unavailable.

Media typeapplication/json

Stable body returned by HTTP error responses.

object
code
required
string
error
required
string

Example generated

{
"code": "example",
"error": "example"
}