Tech & AI

APIs Explained: How Software Talks to Software

APIs Explained: How Software Talks to Software

What an API actually is, how a request and response work, and why almost every app you use depends on them.

Every time you check the weather in an app, pay online, or log in with a Google account, at least one API is doing the work behind the scenes. The idea is simpler than the acronym suggests.

The restaurant analogy

You do not walk into a restaurant kitchen and cook. You tell the waiter what you want, the kitchen prepares it, and the waiter brings it back. You never see the kitchen.

An API โ€” an application programming interface โ€” is the waiter. It is a defined way to ask another system for something, without knowing or touching how that system works internally.

Request and response

Most modern APIs are web APIs, and they follow the same pattern as browsing a website:

  • Your program sends a request to a URL.
  • The server processes it and sends back a response.
  • The response contains a status code, headers and usually a body.

A typical request looks like this:

GET https://api.example.com/books/42
Authorization: Bearer YOUR_TOKEN

And the response:

{ "id": 42, "title": "Deep Work", "author": "Cal Newport" }

The verbs

HTTP APIs use a small set of methods, and each carries a meaning:

MethodMeaningExample
GETRead somethingFetch a list of books
POSTCreate somethingAdd a new book
PUT / PATCHUpdate somethingChange a title
DELETERemove somethingDelete a book

Keeping to these meanings makes an API predictable, which is the entire point.

Status codes

The three-digit code tells you what happened before you read the body:

  • 2xx โ€” success. 200 OK, 201 Created.
  • 4xx โ€” your request was wrong. 401 unauthorised, 403 forbidden, 404 not found, 429 rate limited.
  • 5xx โ€” the server failed. 500 internal error.

When debugging, the status code is the first thing to read.

Authentication

Most APIs need to know who is asking. The common approaches:

  • API keys โ€” a simple secret string. Easy, but hard to scope and easy to leak.
  • Tokens (OAuth) โ€” the standard for letting a user grant limited access without sharing a password. This is what "log in with Google" uses.

Rules that matter: never put keys in front-end code or public repositories, and treat a key like a password.

Rate limits and pagination

Two constraints you will meet immediately:

  • Rate limits cap how many requests you may make per minute or day. Exceeding them returns 429. Respect the limit and back off.
  • Pagination splits large results into pages. Expect parameters like ?page=2 or ?limit=100&offset=200.

Practical advice

  • Read the documentation first. Half of all API frustration is guessing parameter names.
  • Test with a simple tool before writing code โ€” send one request and inspect the raw response.
  • Handle failure properly. Networks drop and APIs go down. Retry briefly, then fail gracefully.
  • Cache what rarely changes. It reduces cost and avoids hitting limits.
  • Do not assume the shape of the data. Fields get renamed and added.

The bottom line

An API is a contract: a defined way to ask for data or actions, with defined answers. Once you see requests, responses, verbs and status codes as one pattern, the rest is documentation.

Related articles

Practical Prompt Engineering for AI Tools

Practical Prompt Engineering for AI Tools

Better prompts are less about magic words and more about clear thinking. Here are the habits that reliably get more useful answers from AI tools.

๐Ÿ“ Tech & AI ๐Ÿ—“ September 30, 2026 โฑ 8 min read
Using AI in Your Daily Work Without Losing Your Edge

Using AI in Your Daily Work Without Losing Your Edge

AI assistants can save real hours each week โ€” if you use them for the right tasks. A practical guide to weaving them into everyday work.

๐Ÿ“ Tech & AI ๐Ÿ—“ October 1, 2026 โฑ 8 min read
Cybersecurity Basics: Protecting Your Accounts and Devices

Cybersecurity Basics: Protecting Your Accounts and Devices

Most breaches do not start with brilliant hackers. They start with a reused password, an ignored update, or a link that should not have been clicked. Here is how to close those gaps.

๐Ÿ“ Tech & AI ๐Ÿ—“ October 2, 2026 โฑ 8 min read

Suggested summaries

Tech & AI Homo Deus book cover

Homo Deus

Yuval Noah Harari ยท 2016
โ˜…โ˜…โ˜…โ˜…โฏจ 4.5

Harari looks past famine, plague and war to ask what humanity will chase next: immortality, engineered happiness and god-like power over life itself.

Tech & AI
Tech & AI Life 3.0 book cover

Life 3.0

Max Tegmark ยท 2017
โ˜…โ˜…โ˜…โ˜…โฏจ 4.5

Max Tegmark maps the choices ahead for artificial intelligence โ€” utopia, catastrophe or something in between โ€” and why values matter as much as code.

Tech & AI
Tech & AI The Pragmatic Programmer book cover

The Pragmatic Programmer

Andrew Hunt ยท 1999
โ˜…โ˜…โ˜…โ˜…โ˜… 5

Hunt and Thomas distil decades of hard-won craft into practical habits: stay curious, keep code honest, automate the boring parts, and own your work.

Tech & AI