APIs: how software programs talk to each other
What an API is, what it does in everyday life (payment, maps, weather, AI) and how it connects websites, applications and services. With a simple analogy.
You use APIs every day without realising it: whenever a site displays a map, accepts a payment, or offers an AI response, software programs have talked to each other behind the scenes. Here is the concept, without the jargon.
The restaurant analogy
Picture a restaurant:
- You (the customer) do not walk into the kitchen.
- You go through the waiter: you place your order, they pass it on, they bring back the dish.
- The kitchen prepares it, without you knowing how.
An API (Application Programming Interface) is that waiter: a go-between that takes a request, passes it to the right software, and brings back the response. You do not need to know how the kitchen works.
What it actually does
Rather than rebuilding everything, a site calls the API of a specialist:
- Maps → Google Maps / OpenStreetMap API.
- Payment → Stripe / PayPal API.
- Weather, exchange rates, transport → APIs from data providers.
- AI → APIs from Claude, OpenAI… (the site sends a text, receives a response).
This is the principle of the reusable building block: you assemble services instead of reinventing the wheel.
How it works (in brief)
- A program sends a request to an address (an API URL), optionally with parameters.
- The API processes it and returns a response, most often in JSON format (structured, lightweight text).
- The program uses that data (displays it, saves it…).
All of it in a fraction of a second, with no web page: it is a conversation between machines.
The API key
Many APIs require an API key: a secret code that identifies the caller. It makes it possible to know who is calling, to count usage and to bill or limit it. Golden rule: an API key must never be put in public code or on a visible page — it is a secret.
Why it is central today
APIs are the glue of the modern web: they connect static sites, Node.js applications, databases and AI. The famous Jamstack approach rests entirely on them: a fast front end that fetches its data through APIs.
Understanding APIs means understanding how everything connects.
Test your knowledge
An API lets…
API = application programming interface: it is the 'common language' through which two software programs talk to each other.
When a site displays a map or a payment, it often uses…
Rather than rebuilding everything, you call the API of a specialist (Google Maps, Stripe…).
The most common data format exchanged by web APIs is…
JSON is a lightweight text format, easy for programs to produce and read.
An 'API key' is used to…
The key authenticates the caller and makes it possible to count and limit usage. It must be kept secret.