Open Trivia
Pull random trivia questions across categories and difficulties
Fetch multiple-choice or true/false trivia questions filtered by category, difficulty, and type. Each result ships with the correct answer plus shuffled distractors, ready to drop straight into a quiz. Content is licensed CC BY-SA 4.0.
GET https://opentdb.com/api.php?amount=1
{
"response_code": 0,
"results": [
{
"type": "multiple",
"difficulty": "medium",
"category": "Entertainment: Music",
"question": "What is the opening track on Lorde's Pure Heroine?",
"correct_answer": "Tennis Court",
"incorrect_answers": [
"Team",
"Royals",
"400 Lux"
]
}
]
}curl "https://opentdb.com/api.php?amount=1"const res = await fetch("https://opentdb.com/api.php?amount=1");
const data = await res.json();
console.log(data);import requests
res = requests.get("https://opentdb.com/api.php?amount=1")
print(res.json())/api.php?amount=1PROBEDPull random trivia questions across categories and difficulties
/api.php?limit=5Api Php — documented GET route.
/api.php?page=1Api Php — documented GET route.
We probe a documented GET and expect 2xx JSON — full uptime and health score. Export includes every documented route below.
Stable. No schema drift observed since monitoring began — the response shape has not changed under our checks.
Open Trivia: common questions
Is Open Trivia free to use?
Yes — Open Trivia is a free fun API. Free tier: Free, no API key. Commercial use is allowed on the free tier.
Does Open Trivia need an API key?
No — Open Trivia needs no API key or signup. You can call it straight away; rate limits still apply (One request per IP every 5 seconds (documented)).
Can I call Open Trivia from the browser?
Yes — Open Trivia returns CORS headers over HTTPS, so front-end code can fetch it directly with no backend proxy. Use the fetch snippet on this page, or hit "Run live" to try it now.
Is Open Trivia up right now?
As of our last scheduled check, Open Trivia is unmonitored. We re-probe it every sweep — the status badge and uptime chart above always show the latest.