Open Trivia DB
Community-sourced trivia question database with 4,000+ questions across 24 categories and 3 difficulty levels. Powers quiz apps and trivia games — optionally returns a session token to avoid question repeats.
🟢 Online · 610 ms
97.37%
Unlimited, no key, no credit card
No key required
Free alternatives (live ranking)
- PokéAPI — 🟢 Online · Unlimited, no key, no credit card
- Rick and Morty API — 🟢 Online · 10,000 req/day, no key, no credit card
- JokeAPI — 🟢 Online · 120 req/min, no key, no credit card
Compare Open Trivia DB with…
- Open Trivia DB vs PokéAPI — Unlimited, no key, no credit card
- Open Trivia DB vs Rick and Morty API — 10,000 req/day, no key, no credit card
- Open Trivia DB vs JokeAPI — 120 req/min, no key, no credit card
Frequently Asked Questions
Does Open Trivia DB require an API key?
No, Open Trivia DB is freely accessible without registration or an API key.
What is Open Trivia DB's free tier?
Unlimited, no key, no credit card
Is Open Trivia DB currently online?
We check Open Trivia DB every hour. The current status is shown at the top of this page. You can also see the 30-day uptime history in the chart above.
Implementation notes
When to use Open Trivia DB
Open Trivia DB has 4,100+ community-verified trivia questions across 24 categories and 3 difficulty levels. It is unlimited, requires no key, and supports session tokens to prevent question repetition within a game session. Use it for quiz apps, trivia bots, or educational games where variety and difficulty tiering matter.
Common pitfalls
- All question and answer text is HTML-entity-encoded (e.g., `"` for `"`, `'` for `'`). You must decode entities before displaying questions. The official docs mention this but it is frequently missed in quick integrations.
- The session token system is optional but important for games. Without a token, the API may return duplicate questions across requests. Tokens are generated via `/api_token.php?command=request` and expire after 6 hours of inactivity — handle token expiry (response code 3) by generating a new token.
- The `incorrect_answers` array and `correct_answer` field are returned separately, not interleaved. You are responsible for shuffling them client-side before presenting answer choices.
- Request too many questions at once (more than the available pool for a category/difficulty combination) and the API returns response code 1 ('No results'). Always check the `response_code` field — a 200 HTTP status does not guarantee question data is present.
Quick start (bash)
curl "https://opentdb.com/api.php?amount=5&category=18&difficulty=medium&type=multiple" Embed this badge
Add a live status badge to your README, docs, or website.
Markdown
[](https://freeapi.watch/opentdb) HTML
<a href="https://freeapi.watch/opentdb"><img src="https://freeapi-builder.a10ayassine.workers.dev/badge/opentdb.svg" alt="Open Trivia DB Status"/></a>