Practical guide · verified against the real thing
What is an API? The explainer that finally makes it click
In one line: The restaurant menu, the weather app, and why “API” is less mysterious than the people using the word want it to sound.
API is three words — Application Programming Interface — that describe a simple idea: a defined way for one program to ask another program for something, without knowing how it works inside. You have used dozens today. Every app on your phone that shows weather, maps, or payments is asking another service through an API.
The menu, used properly
A restaurant API would be its menu. You do not enter the kitchen and cook; you order from a fixed list of dishes, described in fixed terms, and the kitchen brings food. The menu is the interface: it promises what you can ask for and what you will get. Change the kitchen's chef, ovens or suppliers — the menu survives, and your order still works. Programs hide their insides the same way, which is why the insides can be rewritten without breaking yours.
The weather app, end to end
Your weather app does not own satellites. It asks a weather service's API: "give me today's forecast for Lagos" — a request to a web address with parameters — and gets back structured data (temperatures, times, codes), not a designed webpage. The app's job is presenting that data well. The service's job is being right. The API is the contract between them: named fields, agreed formats, rules about how often you may ask.
Why APIs explain a lot of errors
When an app "can't connect", the conversation between programs failed — the request was malformed, the answer came back in an unexpected shape, or the contract changed. Our error-reading guide applies directly: the message names which side of the contract broke. And pricing models follow contracts too — AI services charge per tokens of text through their APIs, which is why our DeepSeek comparison keeps insisting the free chat and the paid API are different products.
The one-line version to keep
An API is a menu: a promise about what you can ask for and what you will get back — so programs can work together without peeking into each other's kitchens.
Next