3 Trivia API
Kristoffer Laxing edited this page 2026-05-27 12:26:54 +00:00

Research

The open trivia db provides a public API for retrieving trivia questions and answers the API is free to use under the licensing conditions and suitable for light-weight use such as trivia games.

The API data is distributed under the CC BY-SA 4.0

This means that:

  • the data can be used freely in applications provided the license terms are followed
  • However we must make an attribution to Open Trivia DB in our project can be placed in a footer, about page or similar as long as its visible on our website.
  • If we modify the data and redistribute it as a dataset then it must remain under the same license.

Basically for our project that only fetches and displays the content the main requirement would be attribution. That is assuming there are no redistribution of the dataset occurs.

Technical suitability.

  • simple REST API with no required authentication
  • it supports categories, difficulty and question types.
  • It returns the content in JSON format:
{
  "response_code": 0,
  "results": [
    {
      "type": "multiple",
      "difficulty": "easy",
      "category": "Art",
      "question": "Who painted the Sistine Chapel?",
      "correct_answer": "Michelangelo",
      "incorrect_answers": [
        "Leonardo da Vinci",
        "Pablo Picasso",
        "Raphael"
      ]
    },

Conclusion

The API is acceptable to use for a trivia view and the only requirement would be to include a proper attribution for the data source. and the application respects the CC BY-SA 4.0 license terms.

Links:

CC BY-SA 4.0 Deed in English: Deed

CC BY-SA 4.0 Deed in Swedish: Deed

Complete legal license in Swedish: License