For Agents
Fetch trivia questions filtered by category, difficulty, and type, and manage session tokens to avoid repeats.
Use for: Get 10 hard science trivia questions, Fetch 5 multiple-choice history questions, Generate a new session token to avoid repeats, List all the trivia categories available
Not supported: Does not handle quiz scoring, user accounts, or curriculum tracking - use for fetching trivia questions and category metadata only.
The Open Trivia Database API serves a free, user-contributed library of trivia questions across categories like history, science, entertainment, and sports. Endpoints provide configurable question retrieval (amount, category, difficulty, type), session token management to avoid repeat questions, category metadata, and per-category and global question counts. The service is openly accessible with no authentication required and is widely used for quiz games, educational apps, and developer learning projects.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Open Trivia Database API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fopentdb.com%2Fopentdb" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fopentdb.com%2Fopentdb" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Open Trivia Database API.
Fetch up to 50 trivia questions per request via /api.php with category, difficulty, and type filters
Request multiple-choice, true/false, or both question types from /api.php
Generate or reset a session token with /api_token.php to avoid repeat questions across rounds
List all available trivia categories with /api_category.php
Get the question count for a single category via /api_count.php
Get global question counts across the entire database with /api_count_global.php
Patterns agents use Open Trivia Database API for, with concrete tasks.
★ Quiz Game Question Source
Mobile and web quiz games can power their question feed from /api.php, requesting batches of 10-20 questions with the desired category, difficulty, and type. Pair with /api_token.php session tokens so the same question doesn't appear twice in a single user's run. The Open Trivia DB has thousands of community-contributed questions covering 24+ categories, eliminating the need to build and maintain a private question bank.
GET /api.php?amount=10&category=21&difficulty=hard&type=multiple to fetch 10 hard sports multiple-choice questions
Educational Practice App
Learning apps that drill students on a topic can pull from /api.php with the relevant category and difficulty, then track progress per session using a token from /api_token.php. The /api_count.php endpoint exposes how many questions remain in a category so the app can warn the learner before exhausting available content. No API key is needed, simplifying classroom deployment.
Generate a token via /api_token.php, then loop GET /api.php?amount=20&category=18&difficulty=easy&token=... until /api_count.php is exhausted
Trivia Bot for Chat Platforms
A Discord, Slack, or Telegram bot can post a trivia question on a schedule by calling /api.php?amount=1 and rendering the question and answers in the channel. Use /api_category.php at startup to expose category-selection commands to users. Because Open Trivia DB has no auth and no per-key rate limit, the bot can be deployed without operator configuration.
GET /api_category.php to list categories, then GET /api.php?amount=1&category={chosen}&type=boolean for a true/false question
AI Agent Trivia Host
An AI agent acting as a trivia host can fetch questions from the Open Trivia DB through Jentic without managing rate limits or HTML decoding wrappers. Jentic resolves the natural-language intent ('get me a hard history question') into the right /api.php call with category and difficulty params and returns the structured JSON the agent renders to the user.
Through Jentic, search 'get a trivia question', resolve to GET /api.php, and execute with amount=1, category=23 (history), difficulty=hard
5 endpoints — the open trivia database api serves a free, user-contributed library of trivia questions across categories like history, science, entertainment, and sports.
METHOD
PATH
DESCRIPTION
/api.php
Fetch trivia questions with filters
/api_token.php
Create or reset a session token
/api_category.php
List all trivia categories
/api_count.php
Get question count for a category
/api_count_global.php
Get global question counts
/api.php
Fetch trivia questions with filters
/api_token.php
Create or reset a session token
/api_category.php
List all trivia categories
/api_count.php
Get question count for a category
/api_count_global.php
Get global question counts
What agents get from Jentic-routed access to this vendor.
Setup
Wiring the Open Trivia Database API by hand means managing its session token so you do not draw the same question twice and mapping category and count endpoints yourself. Through Jentic you install once, import the Open Trivia Database API from the API Directory, and your agent calls it directly.
Permission scoping
Open Trivia DB is read-only with no credential, so scoping is by operation: you limit the agent to the operations it needs, such as fetching questions or listing categories, and leave the token and count endpoints out unless you want them. Every operation the agent can call is one you chose to allow.
Credential isolation
Open Trivia DB needs no credential, so nothing secret is stored for this API. Jentic routes each call directly, and no secret ever enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'get a trivia question' or 'list trivia categories', and Jentic returns the matching Open Trivia operation with its parameter schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using Open Trivia Database API through Jentic.
What authentication does the Open Trivia Database API use?
None - the API is fully open and requires no API key. Through Jentic the request is dispatched without any credential handling, so there is nothing to provision in the vault for this API.
Can I avoid repeat questions across rounds with the Open Trivia Database API?
Yes - call /api_token.php to generate a session token, then pass token={token} on subsequent /api.php calls. The token tracks which questions have been served and the API will return a response code 4 once the category is exhausted, at which point you can reset the token.
What are the rate limits for the Open Trivia Database API?
Open Trivia DB enforces a fair-use policy of one request every 5 seconds per IP. There are no documented hard caps for low-traffic apps. /api_count_global.php and /api_count.php can be polled less frequently to plan question budgets.
How do I fetch a hard multiple-choice question through Jentic?
Search Jentic for 'get a trivia question', load the GET /api.php schema, and execute with amount=1, type=multiple, difficulty=hard. Jentic returns the question and shuffled answer list in JSON.
Is the Open Trivia Database API free for commercial use?
Yes - Open Trivia DB content is licensed under Creative Commons Attribution-ShareAlike 4.0. Attribution and redistribution rules apply; check opentdb.com for the current licensing notice before shipping a commercial product.
What categories does the Open Trivia Database API cover?
Categories include General Knowledge, Books, Film, Music, TV, Video Games, Science & Nature, Mathematics, History, Geography, Politics, Sports, and more. Call /api_category.php for the live list of category IDs and names.
Can I limit what my agent is allowed to do with the Open Trivia Database API?
Yes. Because you run Jentic One self-hosted, your own rules decide which of this API's operations the agent may call, and the Open Trivia Database API is read-only with no credential to manage. You can allow only the operations the agent needs, such as fetching questions from /api.php or listing categories from /api_category.php, while leaving out the session-token endpoint /api_token.php and the count endpoints /api_count.php and /api_count_global.php. Every operation the agent can reach is one you explicitly chose to permit.
GET STARTED