← Underholdning

Triviaspørgsmål

GET /trivia/questions

Hent tilfældige triviaspørgsmål med multiple choice- eller sandt/falsk-svar. Konfigurerbar efter antal (op til 50), kategori og sværhedsgrad (let/medium/svær). Returnerer spørgsmål med korrekte og forkerte svar, kategori og sværhedsgrad. Nyttigt til quizapps, triviaspil, uddannelsesværktøjer, teambuilding-aktiviteter og chatbot-underholdningsfunktioner. Data fra Open Trivia Database med 4.000+ verificerede spørgsmål.

Se det visualiseret

Parametre

amount valgfri standard: 10

Count

category valgfri

Category

difficulty valgfri

easy/medium/hard

Eksempelforespørgsler

Grundlæggende brug
curl "https://nordapi.ee/api/v1/trivia/questions?amount=5"
5 random trivia questions
curl "https://nordapi.ee/api/v1/trivia/questions?amount=5"
10 easy science questions
curl "https://nordapi.ee/api/v1/trivia/questions?amount=10&category=17&difficulty=easy"
20 hard history questions
curl "https://nordapi.ee/api/v1/trivia/questions?amount=20&category=23&difficulty=hard"

Livesvar

{
  "count": 5,
  "data": [
    {
      "category": "Entertainment: Television",
      "correct_answer": "True",
      "difficulty": "hard",
      "incorrect_answers": [
        "False"
      ],
      "question": "The Klingon home planet is Qo'noS.",
      "type": "boolean"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "False",
      "difficulty": "easy",
      "incorrect_answers": [
        "True"
      ],
      "question": "Codemasters is the developer of the Gran Turismo series.",
      "type": "boolean"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "8",
      "difficulty": "hard",
      "incorrect_answers": [
        "6",
        "10",
        "12"
      ],
      "question": "How many voice channels does the Super Nintendo Entertainment System support?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "Larxene",
      "difficulty": "medium",
      "incorrect_answers": [
        "Xehanort",
        "Lea",
        "Mickey"
      ],
      "question": "In Kingdom Hearts which of the following people can NOT wield a keyblade?",
      "type": "multiple"
    },
    {
      "category": "Science & Nature",
      "correct_answer": "Urea",
      "difficulty": "hard",
      "incorrect_answers": [
        "Propane",
        "Ethanol",
        "Formaldehyde"
      ],
      "question": "What was the first organic compound to be synthesized from inorganic compounds?",
      "type": "multiple"
    }
  ],
  "success": true
}