What an API is.
A restaurant menu: you order from a set list, and the kitchen handles the rest.
- Can I just… go in?1
You want something from another program — but you cannot just walk into its kitchen.
- 2
It hands you a menu instead: the fixed list of requests it agrees to accept.
- Weather for London, please.3
You place a specific, allowed order — that is a request.
- 4
The door checks it: well-formed? are you allowed? (often via an API key).
- 5
Behind the wall the kitchen does whatever it does — you never see how.
- Exactly what I asked for.6
Back comes a tidy, structured plate (usually JSON) your code can read.
Semicolony semicolony.dev/eli5/what-is-an-api/comic