← 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": "Geography",
      "correct_answer": "The Channel Islands ",
      "difficulty": "medium",
      "incorrect_answers": [
        "Orkney Islands",
        "Isles of Scilly",
        "Shetland Islands "
      ],
      "question": "Which one of these archipelagos are NOT a part of the United Kingdom?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Music",
      "correct_answer": "Panic! At the Disco",
      "difficulty": "easy",
      "incorrect_answers": [
        "Twenty One Pilots",
        "My Chemical Romance",
        "Fall Out Boy"
      ],
      "question": "In 2006, which band released their debut album \"A Fever You Can't Sweat Out\"?",
      "type": "multiple"
    },
    {
      "category": "Science & Nature",
      "correct_answer": "Histology",
      "difficulty": "medium",
      "incorrect_answers": [
        "Microbiology",
        "Anatomy",
        "Biochemistry"
      ],
      "question": "What is the study of the cells and tissues of plants and animals?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "Link",
      "difficulty": "medium",
      "incorrect_answers": [
        "Wario",
        "Q*bert",
        "Solid Snake"
      ],
      "question": "If you play the Super Mario RPG and nap in a rented hotel room, you will wake up next to what familiar looking character?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Film",
      "correct_answer": "Maurice Micklewhite",
      "difficulty": "medium",
      "incorrect_answers": [
        "Morris Coleman",
        "Carl Myers",
        "Martin Michaels"
      ],
      "question": "What is the birth name of Michael Caine?",
      "type": "multiple"
    }
  ],
  "success": true
}