Useless Facts API
Free random facts API with no key: random or daily trivia facts in English and German with source attribution and permalinks. Tested curl example.
Endpoint tested and returned HTTP 200 on 19 Aug 2026
What is the Useless Facts API?
The Useless Facts API is a free, key-free API returning random or daily trivia facts, with source attribution, permalinks and support for English and German.
This API returns short, self-contained trivia facts — the kind that work well as a daily widget or a chatbot command. Both a random endpoint and a today endpoint are available, the latter returning the same fact all day.
It is more careful about provenance than most novelty APIs: each fact carries a `source` and `source_url`, so you can attribute or let users verify. Given the API's own name, treating the facts as entertainment rather than reference material is wise.
Quick facts
- Base URL
https://uselessfacts.jsph.pl/api/v2/facts- Authentication
- No API key required.
- Rate limit
- No published limit.
- Pricing
- Free. Facts are CC BY-SA licensed.
- CORS
- Enabled — callable directly from browser JavaScript
- Official docs
- Read the docs
How to use the Useless Facts API
Every request below was executed against the live API on 19 Aug 2026, and the response shown is the real body it returned — not an illustration.
1. Fetch a random fact
GET https://uselessfacts.jsph.pl/api/v2/facts/random
curl 'https://uselessfacts.jsph.pl/api/v2/facts/random'const res = await fetch("https://uselessfacts.jsph.pl/api/v2/facts/random");
if (!res.ok) throw new Error(`Request failed: ${res.status}`);
const data = await res.json();
console.log(data);import requests
res = requests.get("https://uselessfacts.jsph.pl/api/v2/facts/random", timeout=20)
res.raise_for_status()
print(res.json()){
"id": "12f5f7ad26b5666d67de0ad66da46550",
"text": "Two-thirds of the world’s eggplant is grown in New Jersey.",
"source": "djtech.net",
"source_url": "https://www.djtech.net/humor/shorty_useless_facts.htm",
"language": "en",
"permalink": "https://uselessfacts.jsph.pl/api/v2/facts/12f5f7ad26b5666d67de0ad66da46550"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
random | path | Optional | A random fact. random |
today | path | Optional | The fact of the day, stable for 24 hours. today |
language | string | Optional | `en` or `de`. en |
Response fields
idstring- Fact identifier.
textstring- The fact itself.
sourcestring- Where the fact came from.
source_urlstring- Link to the source.
languagestring- Language code of the fact.
permalinkstring- Stable URL for this fact.
What you can build with the Useless Facts API
- Add a fact of the day to a homepage or newsletter
- Build a trivia command for a chat bot
- Fill loading screens with something to read
- Practise consuming a simple JSON API
Common errors and how to fix them
Same fact repeatedly
You are using the /today endpoint.
Fix: Use /random for a different fact each call; /today is intentionally stable for 24 hours.
Unexpected language
The language parameter was omitted.
Fix: Pass language=en explicitly; the default may not be what you expect.
Useless Facts API — frequently asked questions
Is the Useless Facts API free?
Yes, free with no API key. Facts are CC BY-SA licensed, so attribution is required.
What is the difference between random and today?
/random returns a different fact on every call; /today returns the same fact for the whole day, which is what you want for a daily widget.
Are the facts actually true?
Given the name, treat them as entertainment. Each fact includes a source and source_url so users can check for themselves.
Which languages are supported?
English and German, selected with the language parameter.
Tools that pair with this API
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
Word Counter
Count words, characters, sentences, paragraphs and estimated reading time instantly. Free online word counter for essays, blogs and social media.
Alternatives to Useless Facts API
If Useless Facts does not fit, these entertainment apis cover similar ground. Every one was called before publishing, and each links to its own reference page with a working curl command and the response it returned.
| API | What it does | Auth | CORS | Last verified |
|---|---|---|---|---|
| Official Joke API | Free joke API with no key: random jokes with setup and punchline, filterable by type. Perfect for beginner projects. Tested curl example and live JSON. | No key | Yes | 19 Aug 2026 |
| icanhazdadjoke | Free dad joke API with no key. Returns jokes as JSON, plain text or image depending on the Accept header. Search supported. Tested curl example included. | No key | Yes | 19 Aug 2026 |
| chucknorris.io | Free Chuck Norris jokes API with no key. Random jokes, 16 categories and full-text search. CORS enabled. Tested curl example and live JSON response. | No key | Yes | 19 Aug 2026 |
| Advice Slip | Free advice API with no key. Returns random advice slips as JSON, with search and id lookup. CORS enabled. Tested curl example and live response. | No key | Yes | 19 Aug 2026 |
| xkcd | Free xkcd comic API with no key: fetch any comic by number or the latest, with image URL, title, alt text and publication date. Tested curl example. | No key | No | 19 Aug 2026 |
| YesNo.wtf | Free yes/no API with no key: returns a random yes, no or maybe with a matching animated GIF. The simplest possible API for teaching fetch. Tested example. | No key | Yes | 19 Aug 2026 |
Useless Facts is an independent third-party service and is not affiliated with ByteTools or ByteVancer. Details on this page were verified on 19 Aug 2026; always check the official documentation before relying on this API in production, as terms and limits can change.