← 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": "History",
      "correct_answer": "1869",
      "difficulty": "medium",
      "incorrect_answers": [
        "1859",
        "1860",
        "1850"
      ],
      "question": "When did construction of the Suez Canal finish?",
      "type": "multiple"
    },
    {
      "category": "History",
      "correct_answer": "Woodrow Wilson",
      "difficulty": "medium",
      "incorrect_answers": [
        "Franklin Delano Roosevelt",
        "Herbert Hoover",
        "Theodore Roosevelt"
      ],
      "question": "The Panama Canal was finished under the administration of which U.S. president?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Japanese Anime & Manga",
      "correct_answer": "True",
      "difficulty": "hard",
      "incorrect_answers": [
        "False"
      ],
      "question": "Throughout the entirety of \"Dragon Ball Z\", Goku only kills two characters: a miniboss named Yakon and Kid Buu.",
      "type": "boolean"
    },
    {
      "category": "Geography",
      "correct_answer": "Yugoslavia",
      "difficulty": "medium",
      "incorrect_answers": [
        "Czechoslovakia",
        "Abkhazia",
        "South Ossetia"
      ],
      "question": "What is the name of the former country that was succeeded by countries such as Serbia, Croatia and Slovenia?",
      "type": "multiple"
    },
    {
      "category": "History",
      "correct_answer": "True",
      "difficulty": "medium",
      "incorrect_answers": [
        "False"
      ],
      "question": "The Hundred Years' War was fought for more than a hundred years.",
      "type": "boolean"
    }
  ],
  "success": true
}