Random Trivia API

This endpoint returns a random piece of trivia like "Rio de Janeiro was once the capital of Portugal, making it the only European capital outside of Europe.".

GET
https://api.apileague.com/retrieve-random-trivia
Example Request and Response
GET
https://api.apileague.com/{{ examples.getRandomTrivia }}
{
    "trivia": "Koalas sleep up to 20 hours a day."
}
cURL
Java
Javascript
Python
Go
C#
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}
 {{ codeCopyText }}

Frequently Asked Questions

What topics does the trivia cover?

The trivia covers a vast array of topics including history, science, geography, entertainment, sports, and general knowledge.

Is the trivia verified?

We strive to ensure accuracy, but given the nature of trivia, some facts may be simplified or subject to debate.

Can I use this for a quiz app?

Absolutely! This API is perfect for populating quiz apps, daily fact widgets, or educational games.

How is the Random Trivia API different from the Random Life Hack API?

The Random Trivia API returns interesting but often non-practical facts and questions, whereas the Random Life Hack API provides practical tips to improve daily life.

Questions? Need Help? Ask Away