Factastic Daily

API Documentation

Access our fun facts programmatically.

JSON API
Get facts in JSON format, perfect for app integrations.

Get All Facts

Retrieve a list of all 366 facts.

https://fact.otd.lol/api/facts

Example Response

[
  {
    "id": 1,
    "text": "The human brain takes in 11 million bits of information every second but is aware of only 40.",
    "dayOfYear": 1,
    "category": "Science"
  },
  {
    "id": 2,
    "text": "The short-lived Anglo-Zanzibar War of 1896 is the shortest war in history, lasting only 38 minutes.",
    "dayOfYear": 2,
    "category": "History"
  },
  ...
]

Get Today's Fact

Retrieve the fun fact for the current day.

https://fact.otd.lol/api/facts/today

Example Response

{
  "id": 250,
  "text": "A group of porcupines is called a prickle.",
  "dayOfYear": 250,
  "category": "Nature"
}

Get Fact for a Specific Day

Returns the fact for the specified day of the year (1-366).

https://fact.otd.lol/api/facts/{day_of_year}

Example Request

https://fact.otd.lol/api/facts/42

Example Response

{
  "id": 42,
  "text": "The national anthem of Greece has 158 verses.",
  "dayOfYear": 42,
  "category": "History"
}
RSS Feed
Subscribe to the daily fact via our RSS feed.

Endpoint

https://fact.otd.lol/api/facts/rss.xml

This endpoint provides an XML feed suitable for RSS readers, updated daily with the latest fact.