Welcome to Random Facts API

This API serves random facts from the internet. You can use this API to get random facts or a specific fact by ID. Below are the endpoints you can use:

You can also pass a query parameter html=true to get the response in HTML format.

Example: /api/v1/facts/random?html=true

This will return the fact in HTML format with a permalink to the fact.

You can also view the fact in HTML format by visiting /api/v1/facts/{id}?html=true

Try it now