Global edge API for trivia questions.
This API powers Trivbot
Random sample: /questions?order=random&limit=10
| Question | Options | Category |
|---|---|---|
| Which movie includes a giant bunny-like spirit who has magic powers including growing trees? | HopMy Neighbor TotoroRise of the GuardiansAlice in Wonderland | film |
| Which type of rock is created by intense heat AND pressure? | DiamondSedimentaryIgneousMetamorphic | science |
| Kanye West at 2009 VMA's interrupted which celebrity? | Taylor SwiftBeckBeyonceMF DOOM | music |
| Which of these Movies was NOT released in 1996? | Independence DayGladiatorThe RockMission: Impossible | film |
| What planet is known for its rings? | MarsJupiterSaturnUranus | science |
# Triviabranch API
Global edge API for trivia questions used by Triviabranch apps.
## Base URL
- `https://api.triviabranch.com`
## Endpoints
- `GET /health`
- `GET /questions?category=&subcategory=&difficulty=&tag=&source=&limit=&offset=`
- `GET /questions/{id}`
- `GET /questions/export?category=&subcategory=&difficulty=&tag=&source=&limit=&offset=&download=1`
## Response Shape
```json
{
"data": [
{
"id": 123,
"question": "What is the capital of France?",
"options": ["Paris", "Berlin", "Madrid", "Rome"],
"correctIndex": 0,
"category": "Geography",
"subcategory": "Europe",
"difficulty": "Easy",
"tags": ["EU"],
"source": "seed",
"lastReviewed": "2024-01-01"
}
],
"meta": {
"limit": 50,
"offset": 0,
"next_offset": 50
}
}
```
## Examples
```sh
curl "https://api.triviabranch.com/questions?limit=10"
curl "https://api.triviabranch.com/questions?category=history&difficulty=easy&limit=5"
curl "https://api.triviabranch.com/questions/export?limit=100&download=1"
```
## Notes
- Results are randomized per request.
- Use pagination to fetch full datasets reliably.