← Underholdning

Trivia-spørsmål

GET /trivia/questions

Hent tilfeldige trivia-spørsmål med flervalgs- eller sant/usant-svar. Konfigurerbart etter antall (opptil 50), kategori og vanskelighetsnivå (lett/middels/vanskelig). Returnerer spørsmål med korrekte og feil svar, kategori og vanskelighetsgrad. Nyttig for quiz-apper, trivia-spill, utdanningsverktøy, teambyggingsaktiviteter og chatbot-underholdningsfunksjoner. Data fra Open Trivia Database med over 4 000 verifiserte spørsmål.

Parametere

amount valgfri standard: 10

Count

category valgfri

Category

difficulty valgfri

easy/medium/hard

Eksempelforespørsler

Grunnleggende bruk
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": "Sports",
      "correct_answer": "Vladivostok",
      "difficulty": "hard",
      "incorrect_answers": [
        "Rostov-on-Don",
        "Yekaterinburg",
        "Kaliningrad"
      ],
      "question": "Which of these Russian cities did NOT contain a stadium that was used in the 2018 FIFA World Cup?",
      "type": "multiple"
    },
    {
      "category": "Geography",
      "correct_answer": "Murcia",
      "difficulty": "medium",
      "incorrect_answers": [
        "Asturias",
        "Navarre",
        "León"
      ],
      "question": "The following Spanish provinces are located in the northern area of Spain except:",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "Infinite",
      "difficulty": "easy",
      "incorrect_answers": [
        "Metal Sonic",
        "Zavoc",
        "Chaos"
      ],
      "question": "In the game Sonic Forces, which of the following was not from a previous game?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "Serial Killer",
      "difficulty": "medium",
      "incorrect_answers": [
        "Parasite",
        "Stalker",
        "Magic Mirror"
      ],
      "question": "In the Jackbox party game Monster Seeking Monster, which monster can steal two hearts from other monsters under certain conditions?",
      "type": "multiple"
    },
    {
      "category": "History",
      "correct_answer": "John Macdonald",
      "difficulty": "easy",
      "incorrect_answers": [
        "John Abbott",
        "Alexander Mackenzie",
        "Robert Borden"
      ],
      "question": "Who was the first prime minister of Canada?",
      "type": "multiple"
    }
  ],
  "success": true
}