← All guides

πŸ“‘ We check api.forismatic.com (and 85+ other public dev APIs) with a plain GET every 30 minutes β€” see the live status page. It has not answered once since our monitoring began on August 31, 2026.

Forismatic API alternative β€” the quote machine API is dead

If you ever built freeCodeCamp's Random Quote Machine β€” and for a decade, nearly everyone learning front-end did β€” you've probably typed this URL:

curl 'http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en'
# …hangs ~20 seconds, then:
# HTTP 522
# error code: 522

That's the response today β€” checked live on September 19, 2026. Not the documented quote object, not even JSON: sixteen bytes of plain text from Cloudflare saying the origin server is gone. res.json() throws, data.quoteText is a TypeError, and every CodePen from the jQuery era of "build a quote machine" is quietly broken. HTTPS, HTTP, and the forismatic.com homepage itself all fail the same way, and our monitor has never seen it up in 19 days of half-hourly checks.

Honestly: Forismatic earned its place. Free, keyless, a charming multilingual quote catalogue, and it powered more first API calls than almost anything except JSONPlaceholder. But it was struggling even in its prime β€” no CORS-friendly HTTPS, so a generation of freeCodeCamp forum threads exists just to explain the format=jsonp&jsonp=? workaround and why plain fetch() didn't work from a browser. Those hacks are the part nobody should miss.

Here's the same shape on an API you control β€” HTTPS, open CORS, no JSONP, and it writes. One curl, no signup:

1. Host 50 quotes in one curl

curl -s https://mockbird.mockbird.workers.dev/data/forismatic.db.json \
  | curl -s -X POST 'https://mockbird.mockbird.workers.dev/api/projects/import?name=quotes' \
    -H 'content-type: application/json' --data-binary @-
# β†’ {"id":"YOUR_ID","adminKey":"…"}  β€” save both

The dataset is 50 public-domain quotes (Wilde, Twain, Seneca, Austen, Dickinson, Douglass…) with attributions we double-checked, in Forismatic's exact field shape: quoteText, quoteAuthor, senderName, senderLink, quoteLink. Famous lines that are commonly misattributed online were deliberately left out.

2. The translation table

ForismaticYour Mockbird project
?method=getQuote (random)/quotes?sortBy=random&limit=1 β€” read data[0].quoteText
&key=457653 (deterministic pick)/quotes/17 β€” an id is a key that always works
&format=jsonp&jsonp=? + $.getJSONβ€” not needed. HTTPS with open CORS; plain fetch() works
search: none/quotes?quoteText_like=stars β€” case-insensitive substring
filter by author: none/quotes?quoteAuthor=Oscar+Wilde
submit a quote: nonePOST /quotes β€” persists, visible in every later GET
curl "https://mockbird.mockbird.workers.dev/m/YOUR_ID/quotes?sortBy=random&limit=1&select=quoteText,quoteAuthor"

curl "https://mockbird.mockbird.workers.dev/m/YOUR_ID/quotes?quoteText_like=stars"

3. A byte-exact /api/1.0 fixture route

Forismatic's whole API was one path. If your test suite or old CodePen wants that literal URL shape back, pin a fixture to it (custom routes):

curl -X POST https://mockbird.mockbird.workers.dev/api/projects/YOUR_ID/routes \
  -H 'x-admin-key: YOUR_ADMIN_KEY' -H 'content-type: application/json' \
  -d '{"method":"GET","path":"/api/1.0","contentType":"application/json",
       "body":"{\"quoteText\":\"We are all in the gutter, but some of us are looking at the stars.\",\"quoteAuthor\":\"Oscar Wilde\",\"senderName\":\"\",\"senderLink\":\"\",\"quoteLink\":\"\"}"}'

curl "https://mockbird.mockbird.workers.dev/m/YOUR_ID/api/1.0?method=getQuote&format=json&lang=en"
# β†’ the exact five-field object, every time β€” query params and all

A fixed fixture is a feature in tests: assert against known bytes. Use the resource endpoints from section 2 when you want real randomness.

4. Rehearse the exact way it died

Forismatic's failure mode β€” an eventual non-JSON 522 β€” is precisely what most quote-machine code never handled. Recreate it deterministically and make your error state real:

# a route that answers like the dead API does (plain text, not JSON):
curl -X POST https://mockbird.mockbird.workers.dev/api/projects/YOUR_ID/routes \
  -H 'x-admin-key: YOUR_ADMIN_KEY' -H 'content-type: application/json' \
  -d '{"method":"GET","path":"/drills/522","status":522,"contentType":"text/plain","body":"error code: 522"}'
# res.ok is false AND res.json() throws β€” does your UI survive both?

# two failures, then success β€” exercise retry logic:
curl "https://mockbird.mockbird.workers.dev/m/YOUR_ID/quotes/1?mock_seq=522,522,200"

# the 20-second hang, for timeout testing:
curl --max-time 2 "https://mockbird.mockbird.workers.dev/m/YOUR_ID/quotes/1?mock_delay=5000"
# β†’ curl exit 28, same as the real thing

More recipes in testing loading & error states.

If you want real quote content

Our 50 quotes are a dev dataset, not a catalogue. For production quote content, the honest state of the genre (all checked September 19, 2026): ZenQuotes is keyless and answering; DummyJSON's /quotes endpoints are fast and reliable; Quotable β€” the API most tutorials moved to after Forismatic β€” is currently unreachable too (its TLS handshake fails; see our Quotable guide and status page). The pattern behind this guide and that one is the same: quote APIs run on one volunteer's goodwill, and they die. Content from whichever survivor you like β€” but point development, tests, CI, and demos at data you control.

Start now

The one-curl import in section 1, or zero setup at all:

curl https://mockbird.mockbird.workers.dev/m/demo/products?limit=3

Facts checked live on September 19, 2026: http://api.forismatic.com/api/1.0/?method=getQuote&format=json&lang=en answered HTTP 522 with the 16-byte plain-text body error code: 522 after 19.8 s; the HTTPS variant and both forismatic.com/en/ homepage URLs failed identically (~20 s, 522); our half-hourly monitor has recorded zero successful checks since August 31, 2026. JSONP-era workaround threads referenced: freeCodeCamp forum's "Can't seem to get forismatic api working" and "Quote generator β€” help with JSONP". Every Mockbird command on this page was run against a live project before publishing.

Full API reference in the docs. More guides: Quotable alternative Β· Advice Slip alternative Β· ICNDb alternative Β· Numbers API alternative Β· Host a JSON file as an API. Create your API β†’

⚑ Skip the terminal: this link opens the dashboard's import panel β€” paste the dataset from section 1 and you're done. No signup.