What it is
A public, read-only API behind the 420 World Clock: which zones are at 4:20 now, the closest and the next, every zone ranked, and law cards for 197 countries and their zones. The whole law database is also one SQLite file for offline apps.
The source code and data are public on GitHub under open licences, so anyone can read how it works or run their own copy.
Who it is for
Beginners who want a friendly first API to practise on: the front page walks through what an API is, then a five-line first program, with the answer appearing live on the page.
Developers who want the data in their own site or app.
How it started, and how I built it
The website needed its data in one place; publishing that place as an API was a small step that turned a side project into a teaching tool.
- Plain and safe. Read-only endpoints, no key, open CORS so it works straight from a browser, and a rate limit so one user cannot hurt anyone else.
- Locked down. It runs in a read-only container with every privilege dropped, behind the same edge, certificates and monitoring as the rest of this estate.
- Teach as you go. The front page is written for someone who has never seen JSON, and the full reference is generated from the code so it is never out of date.
- Open. The code is MIT licensed and the data CC BY 4.0, published on GitHub with a run-it-yourself guide that was tested from a clean install.
What it shows I can do
- Designing a clean public API and documenting it for two audiences at once: beginners and developers.
- Running a public service safely: rate limits, a locked-down container, TLS and monitoring.
- Publishing open source properly: licences, a README that works, and data you can verify.
For a client, the same work produces internal APIs and integrations that other teams can pick up without a meeting.
Questions people ask
Does it cost anything?
No. It is free and needs no key or sign-up.
Where is the code?
On GitHub at LIBCSYS/420-world-clock-api, linked from the API page.
Is there a limit?
Ten requests a second per address, which is far more than a normal site or app needs.