Open Trivia Database
by opentdb.com
Fun and games
Added on October 31st, 2026
Checked and working on November 1st, 2026
Visit opentdb.com →
What it does
The Open Trivia Database is a free, user-contributed collection of thousands of trivia questions. Ask for a number of questions by category, difficulty and type (multiple choice or true/false), and use a session token to avoid getting the same question twice. Responses are JSON. Free, no key needed; the questions are licensed under Creative Commons BY-SA.
At a glance
- API key
- Not needed · More APIs with no key
- Pricing
- Free, no key needed; the questions are licensed under Creative Commons BY-SA.
- From the browser
- Yes (CORS)
- Formats
- JSON
- Interface
- REST, HTTP-GET
- Provider
- opentdb.com
- Last checked
- Working on November 1st, 2026
More information: https://opentdb.com/api_config.php
Is this your service? Show that it is listed
Put this badge on your website or in your README; it links to this page. About the badge
Example request
curl
curl 'https://opentdb.com/api.php?amount=1'
JavaScript
const response = await fetch("https://opentdb.com/api.php?amount=1");
const data = await response.json();
console.log(data);
Python
import requests
response = requests.get(
"https://opentdb.com/api.php?amount=1",
timeout=30,
)
print(response.json())
The JavaScript works in a web page as well as in Node.js 18 or newer.