← 娱乐

问答题

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": "General Knowledge",
      "correct_answer": "Full House",
      "difficulty": "easy",
      "incorrect_answers": [
        "Flush",
        "Straight",
        "High card"
      ],
      "question": "What is the name of the poker hand containing three of a kind and a pair?",
      "type": "multiple"
    },
    {
      "category": "Entertainment: Film",
      "correct_answer": "True",
      "difficulty": "easy",
      "incorrect_answers": [
        "False"
      ],
      "question": "In the original Star Wars: A New Hope, Han Solo is the first to shoot his blaster in a conversation with Greedo.",
      "type": "boolean"
    },
    {
      "category": "Entertainment: Video Games",
      "correct_answer": "2011",
      "difficulty": "medium",
      "incorrect_answers": [
        "2012",
        "2010",
        "2014"
      ],
      "question": "What year was the video game streaming platform TwitchTV founded?",
      "type": "multiple"
    },
    {
      "category": "History",
      "correct_answer": "Mormonism",
      "difficulty": "medium",
      "incorrect_answers": [
        "Buddhism",
        "Christianity",
        "Hinduism"
      ],
      "question": "Joseph Smith was the founder of what religion?",
      "type": "multiple"
    },
    {
      "category": "History",
      "correct_answer": "1923",
      "difficulty": "medium",
      "incorrect_answers": [
        "1903",
        "1913",
        "1933"
      ],
      "question": "In what year was the famous 45 foot tall Hollywood sign first erected?",
      "type": "multiple"
    }
  ],
  "success": true
}