Trivia

Get random trivia questions with multiple-choice answers. Filter by category and difficulty to target specific question pools.

Get API Key

Overview

Use Cases

  • Quiz games and trivia applications
  • Educational platforms and learning apps
  • Social and party game features
  • Daily challenge widgets
  • Knowledge-testing integrations

Features

10 categories β€” science, history, geography, sports, music, movies, literature, math, technology, nature
Three difficulty levels β€” easy, medium, hard
Four answer options per question with the correct answer always included
Optional category and difficulty filtering
Each request returns a randomly selected question from the matching pool

API Endpoints

Get Trivia Question

Returns a random trivia question with multiple-choice answers. Use the optional category and difficulty query parameters to filter the question pool.

GET
https://api.requiems.xyz/v1/entertainment/trivia

Parameters

Name Type Required Description
category string Optional Filter by category. One of: science, history, geography, sports, music, movies, literature, math, technology, nature.
difficulty string Optional Filter by difficulty. One of: easy, medium, hard.

Try it out

Live Demo
Request

Filter by category. One of: science, history, geography, sports, music, movies, literature, math, technology, nature.

Filter by difficulty. One of: easy, medium, hard.

Response Fields

Field Type Description
question string The trivia question text
options array[string] Four multiple-choice answer options
answer string The correct answer β€” always one of the values in options
category string The category the question belongs to
difficulty string The difficulty level of the question (easy, medium, or hard)

Code Examples

# Random question (no filters)
curl "https://api.requiems.xyz/v1/entertainment/trivia" \
  -H "requiems-api-key: YOUR_API_KEY"

# Filtered by category and difficulty
curl "https://api.requiems.xyz/v1/entertainment/trivia?category=science&difficulty=medium" \
  -H "requiems-api-key: YOUR_API_KEY"

Error Responses

bad_request

An invalid category or difficulty value was provided

not_found

No questions match the given category and difficulty combination

unauthorized

Missing API key

forbidden

Invalid or revoked API key

Frequently Asked Questions