What is The Trivia API?
The Trivia API is an API that provides multiple choice quiz questions across a range of categories. It is designed to let developers build quiz apps without needing to manage a large database of questions. For paying subscribers there is also additional functionality:
- Create sessions so that users don't receive duplicate questions
- Image questions
- Translate all questions into other languages, including Hindi, Spanish, Dutch & Turkish.
- Create quizzes so that you can give the same questions to different users.
The API is under active development; new questions and features are being added all the time!
How do I get questions from the API?
Do I need a license?
The API and all data returned from it are licensed under a Creative Commons Attribution-NonCommercial 4.0 International License..
This means that the API and the questions it returns are free for noncommercial use. If you have somewhere suitable in your app, then please credit the API somewhere discreet - we love having our hard work shared!
If you would like to use the API commercially or would like to use some of the API's advanced features, this is offered as a paid subscription.
Where do the questions come from?
The questions come from a range of sources:
- User submissions
- SPARQL queries to Wikidata used to procedurally generate questions.
- Large Language Models backed by ground truth
- Scripts to scrape and build questions from information on public websites.
All questions are reviewed before being made available through the API.