Trivia API

Over 5,000 trivia questions in 24 categories — general knowledge, science, history, geography, film, music, video games and more — as multiple choice or true/false, in three difficulty levels.

Quick start

curl "https://trivia.quiply.net/v1/random?category=science&difficulty=hard&amount=5" \
  -H "X-API-Key: YOUR_KEY"

Authentication

Every request must include your key in the X-API-Key header. You get your key instantly on the pricing section. Keep it secret — don't put it in public front-end code.

Base URL: https://trivia.quiply.net

GET/v1/random

Random questions, optionally filtered.

ParameterTypeDescription
categorystringCategory id or name (partial match), e.g. 9 or science
difficultystringeasy, medium or hard
typestringmultiple or boolean
amountinteger1–50 (default 1)
{ "count": 1, "questions": [ {
    "id": 284, "category": "General Knowledge", "difficulty": "easy", "type": "multiple",
    "question": "…", "correct_answer": "…", "incorrect_answers": ["…", "…", "…"] } ] }

Answers are returned in a fixed order — shuffle correct_answer with incorrect_answers in your app before showing them.

GET/v1/categories

Categories with the number of questions, in total and per difficulty.

GET/v1/health

Service status and dataset size. No key needed.

Questions come from a community-contributed collection and may occasionally contain errors. The collection is fixed and not updated automatically.

Errors

StatusMeaning
401Missing or invalid X-API-Key
403Subscription inactive (cancelled or payment failed)
404No questions match the filters
422Bad parameter (e.g. invalid difficulty)
429Quota reached for your plan

Pricing

Free trial: 5 requests/day. All APIs plan: $9.95/month gives you every Quiply API, 250,000 requests a month.

Get your API key