APIs — how programs talk to each other
When the Instagram app on your phone wants to load your feed, it doesn’t ask in plain English. It asks in a specific, agreed-upon format. The server answers in a specific, agreed-upon format. That agreement is the API.
An API (Application Programming Interface) is a contract between two programs: ask me this specific way, and I promise to answer this specific way.
If “frontend and backend” is the split, and “client and server” is the conversation, then the API is the language they speak.
The thing that trips people up
An API isn’t a thing you can point at. It’s not a file, not a server, not a program. It’s an agreement — the set of questions one program can ask another, and the shape of the answers it’ll get back.
That’s why people say things like “we built an API” or “that service exposes an API.” What they mean: “here’s the menu of questions you can ask us, and the format we’ll answer in.”
If a restaurant is the server, the API is the menu. You can’t order anything that isn’t on the menu. Everything on the menu, you can order, and you know exactly what’ll show up.
What an API call looks like
Here’s a simplified version of what your phone is doing in the background, every second you use an app:
Request: GET https://api.instagram.com/feed?user=you
Response: { "posts": [ { "id": 1, "image": "...", "likes": 42 }, ... ] }
The request says “get me the feed for this user.” The response comes back as JSON — a format that’s just text shaped like nested lists and labels. Your phone reads the JSON, turns it into the pretty scrolling feed you see.
You don’t need to write JSON yourself yet. Just recognize the shape — curly braces, quotes, colons. You’ll see it constantly when reading code with Claude.
Why APIs are everywhere
Once one program can ask another program for things, you can build big software out of small pieces. A real app you use might be:
- Your app’s own API for things like login and posting.
- Stripe’s API for charging your card.
- Google Maps’ API for showing a map.
- OpenAI’s API for an AI feature.
- Twilio’s API for sending an SMS.
Five different companies, five different APIs, one screen on your phone. Each one is a contract: “ask me this way, get this back.” Nobody writes all of that from scratch — they wire the APIs together.
The Claude API is exactly this shape. When you use claude.ai or Claude Code, the app you’re using is a client of Anthropic’s Claude API. Same pattern as everything else.
”Endpoint” — the word you’ll hear
An endpoint is a single specific question the API can answer. A big API has many endpoints:
GET /feed— get the feed.POST /like— like a post.GET /user/42— get details for user 42.DELETE /post/99— delete post 99.
Each one is a different door into the same building. When Claude says “this app calls the /users/me endpoint when you log in,” now you know what that sentence means.
What’s next
APIs let programs ask each other questions. But a lot of those questions are really “what do you remember about X?” — and to remember things, software needs somewhere to put them. That’s a database.