Fetches random trivia facts from a curated database for educational content, conversation starters, or app features. Access via MCP in Cursor and other AI editors using the random_trivia tool, or call GET /v1/fun/trivia directly. Returns structured JSON with the fact, category, and difficulty level. Perfect for Claude agents building quiz apps or adding engaging content to user interactions.
curl "https://tinyfn.io/v1/fun/trivia" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/fun/trivia', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/fun/trivia',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's fun tools:
{
"mcpServers": {
"tinyfn-fun": {
"url": "https://tinyfn.io/mcp/fun",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Returns JSON with 'fact', 'category', and 'difficulty' fields. Example: {"fact": "Honey never spoils", "category": "science", "difficulty": "easy"}.
The base endpoint returns completely random trivia. Check the MCP tool parameters in your AI editor for any available filtering options.
Great for icebreakers, educational chatbots, quiz generation, or adding personality to conversations. MCP integration lets Cursor and Windsurf pull fresh facts dynamically.
Yes, facts are curated for accuracy and appropriate for general audiences. Sources are vetted to ensure educational value.
Standard TinyFn rate limits apply. For high-volume applications, cache responses locally or implement request throttling.
Get your free API key and start using Random Trivia in seconds.
Get Free API Key