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.
| Parameter | Type | Description |
|---|---|---|
category | string | Category id or name (partial match), e.g. 9 or science |
difficulty | string | easy, medium or hard |
type | string | multiple or boolean |
amount | integer | 1–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.
Errors
| Status | Meaning |
|---|---|
| 401 | Missing or invalid X-API-Key |
| 403 | Subscription inactive (cancelled or payment failed) |
| 404 | No questions match the filters |
| 422 | Bad parameter (e.g. invalid difficulty) |
| 429 | Quota 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