Free Trivia API
169,768 trivia questions with answers across 8,801 categories, as JSON. No API key, no sign-up, CORS enabled. Build quiz apps, Discord bots, classroom tools or anything else.
Base URL: https://anyguesser.com/api/v1 · Limit: 60 requests/minute per IP · OpenAPI spec
Quick start
Get a random question:
curl "https://anyguesser.com/api/v1/questions"Response:
{
"count": 1,
"questions": [
{
"id": "10th-grade-001",
"question": "What kind of triangle has three sides of equal length?",
"answer": "equilateral triangle",
"acceptable_answers": [],
"explanation": "An equilateral triangle is also equiangular: each interior angle measures 60 degrees.",
"difficulty": "easy",
"difficulty_level": 1,
"subtopic": "Geometry",
"category": { "slug": "10th-grade", "name": "10th Grade", "group": "Professional" },
"tags": ["school-grades", "math", "biology", "world-history"],
"url": "https://anyguesser.com/10th-grade-trivia"
}
]
}From JavaScript:
const res = await fetch("https://anyguesser.com/api/v1/questions?amount=10&difficulty=hard&group=Movies");
const { questions } = await res.json();Endpoints
All endpoints are GET requests that return JSON.
| Path | Returns | Parameters |
|---|---|---|
| /questions | Random questions | amount (1-50), category, group, tag, difficulty, answers |
| /questions/{id} | One question by id | answers |
| /categories | List and search categories | group, tag, q, limit, offset |
| /categories/{slug} | One category | questions, answers |
| /groups | Category groups with counts | – |
| /tags | Tags with counts | – |
| /stats | Total categories and questions | – |
Filtering questions
amount: 1 to 50 questions (default 1). Questions in one response never repeat.category: a category slug, likepixar-movies. Browse them with/categories.group: one of Fun, TV, Movies, Music, Books, Sports, Gaming, History, Earth & Science, Professional.tag: a tag slug from/tags.difficulty:easy,mediumorhard(or 1 to 3).answers=false: leave out the answer, accepted answers and explanation, handy when you check guesses elsewhere.
curl "https://anyguesser.com/api/v1/questions?amount=5&group=Music&difficulty=easy"
curl "https://anyguesser.com/api/v1/categories?q=space&limit=10"
curl "https://anyguesser.com/api/v1/categories/pixar-movies?questions=true"Rate limits and errors
Each IP address gets 60 requests per minute. Responses include RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset (seconds). Past the limit you get 429 with a Retry-After header. Category and tag lists are cached, so cache them in your app too. Need more? Email us.
Errors use standard HTTP status codes and a consistent body:
{ "error": { "code": "invalid_parameter", "message": "\"amount\" must be between 1 and 50.", "docs": "/trivia-api" } }Attribution (optional)
You don't have to credit us. There is no legal requirement and no license condition. But if you can, a line like the one below in your app, site, README or video description is a big help:
Trivia from AnyGuesser Trivia (https://anyguesser.com)FAQ
Is the trivia API free?
Yes. It is free to use, including in commercial projects. There is no API key or sign-up.
What are the rate limits?
Each IP address can make 60 requests per minute. Every response includes RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset headers, and going over returns HTTP 429 with a Retry-After header. Ask for up to 50 questions per request instead of making many small ones.
Do I have to credit AnyGuesser Trivia?
No. Attribution is not required and is not a license condition. If you can, a small credit such as "Trivia from AnyGuesser Trivia" with a link helps us keep the project going, and we appreciate it.
Can I call it from the browser?
Yes. CORS is enabled for all origins, so you can use fetch() from any web page.
How are questions checked?
Questions are written by AI and then fact-checked by a second, independent model before they are published. Mistakes still happen, so tell us if you spot one.