← 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.

Se det visualisert

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": "Entertainment: Video Games",
      "correct_answer": "Half-Life",
      "difficulty": "medium",
      "incorrect_answers": [
        "Quake",
        "The Binding of Isaac",
        "Fallout"
      ],
      "question": "Which of these video game series have NOT had a promotional item appear in Team Fortress 2?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "Chicago, Illinois",
      "difficulty": "hard",
      "incorrect_answers": [
        "Dallas, Texas",
        "New York City, New York",
        "Boston, Massachusetts"
      ],
      "question": "In the PAYDAY series, where did Dallas start his criminal career?",
      "type": "multiple"
    },
    {
      "category": "Science: Computers",
      "correct_answer": "Radia Perlman",
      "difficulty": "hard",
      "incorrect_answers": [
        "Paul Vixie",
        "Vint Cerf",
        "Michael Roberts"
      ],
      "question": "Who invented the \"Spanning Tree Protocol\"?",
      "type": "multiple"
    },
    {
      "category": "History",
      "correct_answer": "January 30, 1933",
      "difficulty": "hard",
      "incorrect_answers": [
        "September 1, 1939",
        "February 27, 1933",
        "October 6, 1939"
      ],
      "question": "When was Adolf Hitler appointed as Chancellor of Germany?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Books",
      "correct_answer": "The Artful Dodger",
      "difficulty": "medium",
      "incorrect_answers": [
        "Fagin",
        "Bull’s-eye",
        "Mr. Fang"
      ],
      "question": "By what nickname is Jack Dawkins known in the Charles Dickens novel, 'Oliver Twist'?",
      "type": "multiple"
    }
  ],
  "success": true
}