← 娱乐

问答题

GET /trivia/questions

获取带多选或判断题答案的随机问答题。可按数量(最多 50 题)、分类和难度级别(简单/中等/困难)配置。返回带正确和错误答案、分类和难度的题目。适用于问答应用、问答游戏、教育工具、团队建设活动和聊天机器人娱乐功能。数据来自拥有 4,000+ 验证题目的 Open Trivia Database。

查看可视化效果

参数

amount 可选 默认: 10

Count

category 可选

Category

difficulty 可选

easy/medium/hard

请求示例

基本用法
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"

实时响应

{
  "count": 5,
  "data": [
    {
      "category": "Geography",
      "correct_answer": "Schweizerische Bundesbahnen",
      "difficulty": "hard",
      "incorrect_answers": [
        "Schweizerische Nationalbahnen",
        "Bundesbahnen der Schweiz",
        "Schweizerische Staatsbahnen"
      ],
      "question": "What is the official German name of the Swiss Federal Railways?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "Ossan",
      "difficulty": "medium",
      "incorrect_answers": [
        "Jumpman",
        "Mr. Video",
        "Mario"
      ],
      "question": "What name did \"Mario\", from \"Super Mario Brothers\", originally have?",
      "type": "multiple"
    },
    {
      "category": "Science & Nature",
      "correct_answer": "Magnesium",
      "difficulty": "hard",
      "incorrect_answers": [
        "Copper",
        "Lithium",
        "Lead"
      ],
      "question": "Burning which of these metals will produce a bright white flame?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Television",
      "correct_answer": "True",
      "difficulty": "easy",
      "incorrect_answers": [
        "False"
      ],
      "question": "In \"Star Trek\", Klaang is a typical Klingon male.",
      "type": "boolean"
    },
    {
      "category": "Science & Nature",
      "correct_answer": "Sulfuric acid",
      "difficulty": "hard",
      "incorrect_answers": [
        "Hydrochloric acid",
        "Potassium chloride",
        "Sodium chloride"
      ],
      "question": "Which of these chemical compounds is NOT found in gastric acid?",
      "type": "multiple"
    }
  ],
  "success": true
}