"Fetch a fun fact about a number" has been a first-API exercise for over a decade โ http://numbersapi.com/42 was the whole lesson: no key, no docs to read, a plain-text fact back. If your tutorial app just broke, here's what's left of it (we re-checked while writing this; our status page for it re-checks every 30 minutes):
$ curl http://numbersapi.com/42
<html>
<head><title>404 Not Found</title></head> โฆ // bare nginx, every path
$ curl https://numbersapi.com/42
curl: (60) SSL: no alternative certificate subject name matches
target host name 'numbersapi.com' // the cert is for an unrelated site now
Every endpoint โ /42, /42/math, /random/trivia, /2/14/date, /1969/year, even the homepage โ answers a stock nginx 404. The server the domain points at belongs to someone else entirely. And unlike the Bored API, no coding school has stepped up with a public mirror.
Honorable exits: the API's MIT-licensed source survives at github.com/rithmschool/numbers_api if you want to self-host the original Node app and its fact corpus yourself, and a version is listed on RapidAPI behind a RapidAPI account and key โ neither is the copy-paste-a-URL experience the tutorials were built on. There's a small irony in the fix for a keyless HTTP one-liner being "sign up for an API marketplace."
We host a starter dataset โ 86 number facts we wrote ourselves across the original's trivia, math, and year types, plus 12 calendar facts in a dates collection. Pipe it into the importer:
curl -s https://mockbird.mockbird.workers.dev/data/numberfacts.db.json \
| curl -s -X POST 'https://mockbird.mockbird.workers.dev/api/projects/import?name=numbers' \
--data-binary @-
The response contains your project id and an adminKey (save it โ it manages the project, and lets you claim it into an account later). Your API is live immediately, no signup, no key โ and it speaks HTTPS, which numbersapi.com famously never did (its http:// URLs got blocked as mixed content the moment a tutorial page went HTTPS):
https://mockbird.mockbird.workers.dev/m/YOUR_ID/facts
https://mockbird.mockbird.workers.dev/m/YOUR_ID/dates
sortBy=random shuffles before pagination, so limit=1 is one random fact per request, and it composes with every filter:
| Numbers API | Your Mockbird API |
|---|---|
/42 (default trivia) | /facts?number=42&type=trivia |
/42/math | /facts?number=42&type=math |
/1969/year | /facts?number=1969&type=year |
/random/trivia | /facts?sortBy=random&limit=1&type=trivia |
/random/math?min=10&max=100 | /facts?sortBy=random&limit=1&type=math&number_gte=10&number_lte=100 |
/2/14/date | /dates?month=2&day=14 |
/random/date | /dates?sortBy=random&limit=1 |
/1..5 (batch range) | /facts?number_gte=1&number_lte=5 |
/42?json | every response is already JSON |
Two honest differences. Numbers API returned plain text by default (?json opted into {"text","number","found","type"}); a Mockbird list endpoint always returns a JSON array of records shaped {"id","number","text","type"} โ destructure it. And its ?fragment, ?notfound=floor, and ?default= flags have no equivalent here โ an unmatched filter just returns [], so handle the empty array. The classic fact-of-the-day widget becomes:
const res = await fetch(BASE + "/facts?sortBy=random&limit=1&type=trivia");
const [fact] = await res.json();
factEl.textContent = fact ? fact.text : "No fact today.";
Numbers API's corpus was crowd-sourced but read-only over HTTP โ you could never add the facts your app actually needed. This is full CRUD:
curl -X POST "https://mockbird.mockbird.workers.dev/m/YOUR_ID/facts" \
-H 'content-type: application/json' \
-d '{"number":256,"text":"256 is the number of values an eight-bit byte can represent.",
"type":"math"}'
The record persists โ GET /facts?number=256 finds it and the random endpoint can now serve it. 98 records is a seed, not a ceiling: paste a bigger corpus into the dashboard import panel (up to 1,000 records per collection), and the same project gives you GraphQL on the same data, delay/error simulation for teaching loading states, and a db.json export to leave with your data anytime.
| numbersapi.com | Self-host the source | RapidAPI listing | Your Mockbird project | |
|---|---|---|---|---|
| Works today | โ 404 on every path | โ if you run it | โ (we didn't test past signup) | โ (~60s setup) |
| Setup | โ | clone + Node + deploy somewhere | RapidAPI account + key in every request | one curl, no signup |
| HTTPS | โ never had it (mixed-content errors on HTTPS pages) | your problem | โ | โ |
| Dataset | the original crowd-sourced corpus | the original corpus (MIT) | the original corpus | 98-fact starter; yours to grow |
| Writes | โ | โ (not via the API) | โ | โ full CRUD |
| Who keeps it alive | nobody (that's the point) | you | a marketplace listing | your project, bounded free limits (10k req/day) |
The one-liner in section 1 is the whole setup โ or open the dashboard and paste the dataset into the import panel. The Numbers API joins a crowded beginner-API graveyard โ ICNDb now serves gambling spam, boredapi's DNS is gone, jservice and forismatic time out (the full tour, and the live status board tracking 71 of these). Same fix works for all of them: we keep ready-made quotes, activities, countries, timezones, and currencies datasets, or host any CSV as an API.