Random Facts API

The Random Facts API allows you to fetch a random fact.

Base URL

"https://openapi-idk8.onrender.com"

Endpoints

  1. GET `/facts/random`: Fetches a random useless fact.

Sample Request

GET `https://openapi-idk8.onrender.com/facts/random`

Sample Response

{
    "id": "1fe0dd05895bdc5a5cf1519da948730d",
    "text": "The national anthem of Greece has 158 verses. No one in Greece has memorized all 158 verses.",
    "language": "en",
    "name": "Useless Facts",
    "author": "OpenAPI",
    "description": "Get a random useless fact from OpenAPI"
}

Error Handling

500 Internal Server Error: Returned when there's an issue fetching a random useless fact using the API.

Response Body:


{
    "error": "Failed to fetch random useless fact"
}