Portmint Lighthouse

What an API Is

Let's start with the word, because it sounds scarier than it is. API stands for Application Programming Interface. That's a mouthful, so set it aside. Here's the plain idea:

An API is the agreed way one app asks another app for something.

That's the whole thing. Two pieces of software, built by different people in different places, somehow cooperate. The API is the set of rules that lets them do it without ever meeting.

A quick word check: an "app" here just means any piece of software — your weather app, a website, a phone — anything that can ask or be asked.

The restaurant analogy

Picture a restaurant. You sit down hungry. You do not march into the kitchen, find the chef, and start rummaging through the fridge. That's chaos — and you'd be shown the door.

Instead, there's a menu and a waiter. The menu tells you exactly what you're allowed to ask for. You give your order to the waiter. The waiter carries it to the kitchen. The kitchen cooks privately, in its own way. Then a finished plate comes back to your table.

You got fed, and you never had to learn how the kitchen works. That polite middle layer — menu plus waiter — is the API.

In our story:

  • You are an app that wants something (say, today's weather).
  • The kitchen is another app that has it (a weather service).
  • The menu and waiter are the API: the list of things you may ask for, and the channel for asking.

Why apps bother with this

You might wonder why apps don't just reach straight into each other. Three calm reasons.

It keeps secrets safe. The kitchen doesn't let strangers near the fridge. A weather service doesn't let your app wander through its private computers. You may only ask the questions the menu allows — nothing more.

It hides the messy parts. The chef can switch suppliers, rearrange the kitchen, or buy a new oven. As long as the menu reads the same, you never notice. The API lets each side change its inner workings without breaking the other.

It lets one kitchen serve thousands. A single weather service can answer millions of apps a day, because everyone orders the same polite way. No special treatment, no chaos.

You already rely on these

You don't see APIs, but you lean on them all day. When a shopping app shows a shipping estimate, it quietly asked a delivery company's API. When a website offers "log in with Google," it's asking Google's API. When your phone draws a map, it asked a map service's API. When a news page shows the day's stock prices, those came through an API too.

Each time, one app placed an order with another and got a plate back. Quiet, invisible, everywhere. 🔦

Your turn

Look at the last three apps you opened today. For each one, ask: did this app probably get some of its information from somewhere else? Weather, prices, maps, sign-ins, sports scores, traffic — those almost always arrive from another service through an API.

You don't need to be right. You're just training your eye to spot the waiters carrying orders back and forth.

Next, in The Menu — Endpoints, we'll pick up that menu and read it line by line — because before you can place an order, you have to know what's on offer.

Stuck or curious?

Ask Pip about this lesson — tap the porthole bottom-right.