Data source: Open Trivia Database (opentdb.com)
https://context.gnist.ai/rest/trivia/
AuthenticationAll 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_questionsGet 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | integer | optional | (default: 10) |
category | any | optional | |
difficulty | any | optional | |
question_type | any | optional |
{
"query": "example"
}get_trivia_categoriesList 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=...).
{
"query": "example"
}report_feedbackReport 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'.
| Parameter | Type | Required | Description |
|---|---|---|---|
feedback | string | required | |
feedback_type | string | optional | (default: "general") |
{
"feedback": "example"
}Quick Start
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"}'
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())