APIs — Explain Like I'm 5
What is an API?
Imagine you’re at a restaurant. You don’t walk into the kitchen and cook your own food — that would be chaos. Instead, you tell the waiter what you want. The waiter goes to the kitchen, gets your food, and brings it back.
An API is the waiter.
When an app needs something — like “what’s the weather today?” or “show me my friend’s photos” — it doesn’t dig through some other company’s computers directly. It sends a polite request to an API, which fetches exactly what was asked for and sends it back. Clean, fast, no mess.
A Real Example
When you open a weather app on your phone, that app doesn’t actually know what the weather is. It asks a weather service (like OpenWeatherMap) through an API: “Hey, what’s the weather in London right now?”
The API comes back: “16°C, cloudy, 60% chance of rain.”
Your app shows you that information — without ever touching the weather company’s actual servers or database.
Why Does This Matter?
Without APIs, every app would have to build everything from scratch. Want to add a map to your website? Build Google Maps yourself. Want to accept payments? Build a banking system. That’s impossible.
APIs let apps share capabilities with each other, so a tiny startup can add payments (Stripe), maps (Google), logins (Facebook), and messaging (Twilio) in a weekend.
One Thing to Remember
An API is a messenger between two programs — it takes a request, does the work, and brings back the answer. Apps talk to each other through APIs all day, every day, without you ever noticing.
See Also
- Encryption Encryption explained: how your messages and passwords stay secret even when strangers can see them.
- Git Why do millions of programmers obsess over a tool that saves old versions of their work? Because without it, one bad day can delete months of effort.
- Graphql Why do apps ask for exactly the data they need — and why that's a bigger deal than it sounds?