GnistAI GnistAI
Log in

Trivia Questions

Quiz and trivia questions by category and difficulty from the Open Trivia Database.

Overview   |   MCP   |   REST API   |   OpenAPI   |   CLI   |   Tutorial   |   Toolkits   |   Home
status: healthy status status healthy healthy tools: 3 tools tools 3 3 type: api wrapper type type api wrapper api wrapper lifecycle: maintained lifecycle lifecycle maintained maintained Entertainment

Data source: Open Trivia Database (opentdb.com)

REST Bridge Endpoint https://context.gnist.ai/rest/trivia/
Authentication

All requests require a Gnist-API-Key header (or api_key query parameter).

Free tier: 100 calls/day. Get your API key.

Tools (3)

get_trivia_questions

Get trivia questions from the Open Trivia Database.

Args:
amount: Number of questions to retrieve (1-50, default 10).
category: Optional category ID to filter questions. Use get_trivia_categories() to see valid IDs.
difficulty: Optional difficulty level — one of "easy", "medium", "hard".
question_type: Optional question type — "multiple" (4 choices) or "boolean" (true/false).

Returns:
Dictionary with count and list of trivia questions, each containing category,
difficulty, question text, correct answer, and incorrect answers.

ParameterTypeRequiredDescription
amountintegeroptional (default: 10)
categoryanyoptional
difficultyanyoptional
question_typeanyoptional
Request Body
{
  "query": "example"
}
get_trivia_categories

List all available trivia question categories.

Returns:
Dictionary with count and list of categories, each with an id and name.
Use the id when calling get_trivia_questions(category=...).

Request Body
{
  "query": "example"
}
report_feedback

Report a bug, feature request, or general feedback for this data source.

Use this when something doesn't work as expected, when you'd like
a new feature, or when you have suggestions for improvement.

Args:
feedback: Describe the issue or suggestion.
feedback_type: One of 'bug', 'feature_request', or 'general'.

ParameterTypeRequiredDescription
feedbackstringrequired
feedback_typestringoptional (default: "general")
Request Body
{
  "feedback": "example"
}

Quick Start

Shell
curl -X POST "https://context.gnist.ai/rest/trivia/report_feedback" \
  -H "Content-Type: application/json" \
  -H "Gnist-API-Key: YOUR_API_KEY" \
  -d '{"feedback": "example"}'
Python
import httpx

resp = httpx.post(
    "https://context.gnist.ai/rest/trivia/report_feedback",
    headers={"Gnist-API-Key": "YOUR_API_KEY"},
    json={
  "feedback": "example"
},
)
print(resp.json())

Related Toolkits (Entertainment)

Resources