Data
Trivia quiz questions (Open Trivia DB) API
Fetch multiple-choice or true/false trivia questions by category and difficulty from the Open Trivia DB (opentdb.com), HTML-decoded with shuffled options and the correct answer. Answers 'give me trivia questions','random quiz question','science trivia','a hard history question'.
Price$0.01per request
MethodPOST
Route/v1/data/misc-trivia
StatusLive
MIME typeapplication/json
Rate limit60/minute
Cache3600s public
datatriviaquizquestionsopentdbgamefactseducation
API URL
Integration docshttps://x402.hexl.dev/v1/data/misc-triviaExample request
{
"amount": 1,
"category": "science",
"difficulty": "easy"
}Example response
{
"count": 1,
"questions": [
{
"category": "Science & Nature",
"type": "multiple",
"difficulty": "easy",
"question": "What is the chemical symbol for gold?",
"correctAnswer": "Au",
"options": [
"Ag",
"Au",
"Gd",
"Go"
]
}
]
}Input schema
{
"type": "object",
"required": [],
"properties": {
"amount": {
"type": "number",
"default": 5,
"examples": [
5
]
},
"category": {
"type": "string",
"examples": [
"science"
]
},
"difficulty": {
"type": "string",
"enum": [
"easy",
"medium",
"hard"
],
"examples": [
"easy"
]
},
"type": {
"type": "string",
"enum": [
"multiple",
"boolean"
],
"examples": [
"multiple"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}