← Underhållning

Triviafrågor

GET /trivia/questions

Hämta slumpmässiga triviafrågor med flervalsalternativ eller sant/falskt-svar. Konfigurerbar efter antal (upp till 50), kategori och svårighetsgrad (lätt/medel/svår). Returnerar frågor med korrekta och felaktiga svar, kategori och svårighetsgrad. Användbart för quiz-appar, triviaspel, utbildningsverktyg, team-byggande aktiviteter och underhållningsfunktioner i chattbotar. Data från Open Trivia Database med 4 000+ verifierade frågor.

Se det visualiserat

Parametrar

amount valfri standard: 10

Count

category valfri

Category

difficulty valfri

easy/medium/hard

Exempelförfrågningar

Grundläggande användning
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": "Honest Hearts ",
      "difficulty": "medium",
      "incorrect_answers": [
        "Old World Blues",
        "Lonesome Road",
        "Dead Money"
      ],
      "question": "In Fallout: New Vegas, upon starting each one of the four campaign DLCs, which one of them does not have a warning screen/recommended level? ",
      "type": "multiple"
    },
    {
      "category": "General Knowledge",
      "correct_answer": "Libra",
      "difficulty": "easy",
      "incorrect_answers": [
        "Gemini",
        "Taurus",
        "Capricorn"
      ],
      "question": "Which sign of the zodiac comes between Virgo and Scorpio?",
      "type": "multiple"
    },
    {
      "category": "History",
      "correct_answer": "True",
      "difficulty": "easy",
      "incorrect_answers": [
        "False"
      ],
      "question": "Vikings were the first Europeans to discover North America.",
      "type": "boolean"
    },
    {
      "category": "Vehicles",
      "correct_answer": "VANOS",
      "difficulty": "hard",
      "incorrect_answers": [
        "VVT-iw",
        "VVEL",
        "MultiAir"
      ],
      "question": "Which Variable Valve Timing technology is used by BMW?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "1998",
      "difficulty": "easy",
      "incorrect_answers": [
        "1987",
        "2001",
        "2004"
      ],
      "question": "In what year was \"Metal Gear Solid\" released in North America?",
      "type": "multiple"
    }
  ],
  "success": true
}