canonical: https://jentic.com/apis/fungenerators.com/fungenerators-trivia

# Fungenerators Trivia API

The Trivia API serves random trivia drawn from thousands of categories, with endpoints for random retrieval, keyword search, and category listing alongside record-level GET, PUT, and DELETE operations. The API powers quiz apps, daily content widgets, classroom warmups, voice assistant briefings, and chatbot small talk. Responses are short JSON objects with the trivia text and category metadata, suitable for direct rendering in a UI or for inclusion in agent tool outputs.

## For AI agents

Retrieve random trivia, search the trivia catalogue by keyword, list categories, and manage individual trivia records.

## Scope

Does not run a quiz engine, score user answers, or moderate content - use for retrieving and managing trivia records only.

## Capabilities

- Retrieve a random trivia item for daily widgets and quiz apps
- Search the trivia catalogue by keyword for topical content
- List all supported trivia categories for selection menus
- Fetch a specific trivia record by its identifier
- Update an existing trivia record via PUT
- Remove a trivia record from the catalogue via DELETE

## Use cases

### Quiz Apps and Daily Trivia Widgets

Quiz applications and content sites use the Trivia API as their content backend. The random endpoint supplies a fresh item per call, the categories endpoint populates topic selectors, and the search endpoint finds trivia about a specific subject. Caching the categories list keeps overhead low while runtime calls stay focused on retrieval.

Example prompt: On widget load, call GET `/trivia/random` and render the returned item; cache categories from GET `/trivia/categories` on app startup.

### Classroom Warmups and Educational Tools

Teachers use trivia to warm up classes or fill transition time. The keyword search endpoint lets a teacher pick trivia that matches the lesson topic, and the random endpoint supplies an open-ended item when speed matters. The category list helps build subject-aligned lessons.

Example prompt: Call GET `/trivia/search` with q=biology to fetch three on-topic items for the start of a class.

### Voice Assistants and Chatbot Small Talk

Voice assistants and chatbots fill conversational gaps with trivia. The random and search endpoints let the bot answer 'tell me something interesting' or 'tell me a fact about X' without writing custom content. The category list lets the bot offer the user a choice before retrieving.

Example prompt: On the 'tell me trivia about space' intent, call GET `/trivia/search` with q=space and read the first result aloud.

### AI Agent Trivia Tool

Wire the Trivia API into Jentic so any agent can fetch trivia on demand or search for items on a chosen topic. Through Jentic the agent searches by intent, the API key stays vaulted, and the agent receives the trivia JSON to use in its reply or downstream content workflow.

Example prompt: Use Jentic to search 'get a random trivia item', load GET `/trivia/random`, and execute it to surface the item in chat.

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/trivia/random` | Retrieve a random trivia item |
| GET | `/trivia/search` | Search trivia by keyword |
| GET | `/trivia/categories` | List trivia categories |
| GET | `/trivia` | Get a trivia item by id |
| PUT | `/trivia` | Update a trivia item |
| DELETE | `/trivia` | Delete a trivia item |

## Key resources

- **Trivia** — Individual trivia record
- **Random Trivia** — Retrieve a random trivia item
- **Search** — Keyword search across the trivia catalogue
- **Categories** — List of supported trivia categories

## Why Jentic

- **Setup:** Wiring the Trivia API by hand means setting up its secret-key request header auth against api.fungenerators.com and threading that key through every random, search, and record call yourself. Through Jentic you install once, import the Trivia API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** The trivia record identifiers here travel in the request rather than the URL path, so scope this by operation: limit the agent to the operations it needs, such as fetching a random question or searching by category, and leave write operations like updating or deleting a trivia record out of the allowed set. Every operation the agent can run is one you chose to include.
- **Credential handling:** Your Fungenerators API secret is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get a random trivia question' or 'search trivia by category', and Jentic returns the matching Trivia API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Random Riddles API** — Same vendor; riddle-style puzzles instead of factual trivia
- **Facts API** — Same vendor; declarative facts and on-this-day events instead of quiz items
- **Name Generation API** — Same vendor; supplies themed names alongside trivia for richer content surfaces

## FAQ

### What authentication does the Trivia API use?

It uses an API key supplied in the X-Fungenerators-API-Secret request header. Through Jentic the key is stored encrypted in the vault and attached to outbound calls, never in the agent's prompt.

### Can I search trivia by topic with this API?

Yes. Call GET `/trivia/search` with the q query parameter set to the keyword. The response is a list of trivia items whose text matches the keyword.

### What are the rate limits for the Trivia API?

The OpenAPI spec does not declare explicit rate limits. Fungenerators applies plan-based quotas listed on the subscription page at fungenerators.com, so consult the plan you signed up for.

### How do I get a random trivia item through Jentic?

Search 'get a random trivia item' via the Jentic SDK or MCP server, load GET `/trivia/random`, and execute it. Install with pip install jentic and authenticate using your ak_* key.

### Can I update or delete trivia records via the API?

Yes. The spec exposes PUT /trivia for updates and DELETE /trivia for removal. Write access depends on your subscription tier; check the Fungenerators dashboard to confirm your key has write permissions.

### How do I list all supported trivia categories?

Call GET `/trivia/categories.` The response is the full list of category keys, which you can cache and present in a topic selector.

### Can I limit what my agent is allowed to do with the Trivia API?

Yes. Because you self-host Jentic One, your own rules decide which Trivia API operations and credentials the agent may use, and you include only the operations it needs. You can allow read calls such as GET `/trivia/random`, GET `/trivia/search`, and GET `/trivia/categories` while leaving the write operations, PUT /trivia and DELETE /trivia, out of the allowed set. Since the record identifiers travel in the request body rather than the URL path, you scope access at the operation level, so every operation the agent can run is one you chose to include.
