Skip to main content
Community-driven trivia question database serving questions across 24 categories with configurable difficulty and answer format. Supports session tokens to prevent duplicate questions across requests. Best for quiz apps, gamification features, or educational workflows needing structured Q&A content. Free with 1 request per 5 seconds rate limit. 1 example endpoint available through Lava’s AI Gateway. See the Open Trivia Database API docs for full documentation.
This provider is managed — no additional setup required.
This is a catch-all provider — any valid URL under https://opentdb.com is supported. Trivia question API. Construct URL as https://opentdb.com/api.php?amount={n}&category={id}&difficulty={level}. See https://opentdb.com/api_config.php for categories and options. The endpoints below are curated examples.

Endpoints

Get trivia questions

GET https://opentdb.com/api.php?amount=10&category=18&difficulty=medium — Free
const data = await lava.gateway('https://opentdb.com/api.php?amount=10&category=18&difficulty=medium', { method: 'GET' });

Next Steps

All Providers

Browse all supported AI providers

Forward Proxy

Learn how to construct proxy URLs and authenticate requests