The Questions API provides access to the Jarvis Questions database,
including random questions, categories, Question of the Day (QOTD),
search capabilities and question management tools.
Base Endpoint
/api/questions/[action]/[object]
| Part |
Description |
| action |
The operation to perform. |
| object |
Optional value used by the action. |
Available Endpoints
| Endpoint |
Description |
/api/questions |
List active questions. |
/api/questions/random |
Return a random active question. |
/api/questions/qotd |
Returns today's Question of the Day. If one does not exist, a new question is selected, marked as today's QOTD and returned. |
/api/questions/id/{id} |
Return a specific question. |
/api/questions/category/{category} |
Return questions from a category. |
/api/questions/categories |
List all categories with question counts. |
/api/questions/search/{text} |
Search question text. |
/api/questions/recent |
Recent questions ordered by creation date. |
/api/questions/count |
Question statistics. |
Query Parameters
| Parameter |
Example |
Description |
limit |
25 |
Maximum number of results returned. |
category |
funny |
Filter questions by category. |
active |
true |
Filter active or inactive questions. |
Examples
GET /api/questions
GET /api/questions?limit=50
GET /api/questions/random
GET /api/questions/random?category=gaming
GET /api/questions/qotd
GET /api/questions/id/123
GET /api/questions/category/funny
GET /api/questions/search/food
GET /api/questions/recent?limit=10
GET /api/questions/count
Question Of The Day Logic
QOTD Generation
- If a question already exists with today's QOTD date, it is returned.
- If no QOTD exists for today, a random active question is selected.
- The selected question cannot be one of the last 30 questions previously used as a QOTD.
- The selected question's
qotd field is updated to today's date.
- The newly assigned question is returned.
Example Question Response
{
"id": 42,
"question": "What is your favourite game of all time?",
"category": "gaming",
"active": true,
"created_at": "2026-11-03T12:15:00+00:00",
"qotd": "2026-11-04"
}
Example Category Response
[
{
"category": "gaming",
"question_count": 125
},
{
"category": "relationships",
"question_count": 87
}
]
Example Count Response
{
"total": 1250,
"active": 1198,
"used_as_qotd": 365
}