Open Trivia Database · JSON Structure

Open Trivia Question Structure

A single trivia question with its category, difficulty, and answers.

Type: object Properties: 6 Required: 6
TriviaGames And ComicsQuizOpen DataPublic APIsOpen Source

Question is a JSON Structure definition published by Open Trivia Database, describing 6 properties, of which 6 are required. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

type difficulty category question correct_answer incorrect_answers

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/open-trivia/refs/heads/main/json-structure/open-trivia-question-structure.json",
  "name": "Question",
  "description": "A single trivia question with its category, difficulty, and answers.",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "Question format — multiple-choice or true/false.",
      "enum": ["multiple", "boolean"]
    },
    "difficulty": {
      "type": "string",
      "description": "Difficulty level assigned to the question.",
      "enum": ["easy", "medium", "hard"]
    },
    "category": {
      "type": "string",
      "description": "Human-readable category name (HTML-entity encoded by default)."
    },
    "question": {
      "type": "string",
      "description": "The trivia question prompt, encoded per the encode parameter."
    },
    "correct_answer": {
      "type": "string",
      "description": "The correct answer to the question."
    },
    "incorrect_answers": {
      "type": "array",
      "description": "One incorrect answer for boolean questions, or three for multiple-choice.",
      "items": {"type": "string"}
    }
  },
  "required": [
    "type",
    "difficulty",
    "category",
    "question",
    "correct_answer",
    "incorrect_answers"
  ]
}