Skip to content

What is an API? Definition, how it works and examples

An API, or application programming interface, is a mechanism that lets two pieces of software communicate. It defines the rules by which one application can request, send or modify information in another, without needing to know how that other application works inside.

In one sentence

An API is an intermediary that lets two applications exchange data or trigger actions.

Key points

  • An API lets different systems communicate without knowing each other.
  • It states precisely which data and which actions are reachable from outside.
  • It can be public, restricted to partners, or strictly internal.
  • On the web it usually runs over HTTP and exchanges data as JSON.

Term at a glance

API
Application Programming Interface
French term
Interface de programmation applicative
Domain
Web development
Category
Software architecture
Level
Beginner to intermediate

What exactly does "API" mean?

The word interface means a point of contact: where two systems meet. An API is therefore the contact point a piece of software deliberately exposes so other programs can plug into it. It is not the software itself, but the contract describing what may be asked of it.

That contract states three things: the available operations, the shape of the data expected, and the shape of the replies returned. As long as the contract holds, the provider can rewrite its software entirely without users noticing. That decoupling is what makes an API valuable.

The problem it solves is an old one: without an API, making two systems talk requires each to know the other's internals. The smallest change on one side breaks the other. An API replaces that brittle dependency with a stable, documented boundary.

How does an API work?

  1. 01

    An application makes a request

    The calling program sends a request to a specific address on the API, stating the operation it wants and the information required.

  2. 02

    The API checks authorisation

    It verifies who is calling and what they may do: a key, a token or a certificate determines their access.

  3. 03

    The request is processed

    The system carries out the operation: a database read, a computation, a write, or triggering a process.

  4. 04

    A reply is returned

    The API returns the result in a structured format, with a code saying whether the operation succeeded or why it failed.

A concrete API example

A customer books an appointment on your website. On confirmation, the site queries your calendar software's API to check availability, then hands it the appointment to record. The calendar confirms, and the site shows the customer their booking. The two pieces of software come from different vendors and were never designed together: the API is what makes the exchange possible.

What is an API used for?

Connecting your tools

Moving information automatically between your website, your CRM and your accounting, instead of typing it in three times.

Opening a service to partners

Letting a distributor or a customer check your stock or place an order from their own system.

Centralising scattered data

Pulling information from several sources into one dashboard, with no manual file exports.

Reusing an existing service

Adding payment, mapping, email delivery or translation without rebuilding those pieces.

Advantages and limits of an API

  • Systems evolve separately without breaking each other
  • Exchanges become automatic, traceable and repeatable
  • Access is controlled finely, operation by operation
  • One interface serves several client applications
  • It adds a dependency: if the provider goes down, your feature goes down
  • It must be versioned, or a change breaks every caller
  • It widens the exposed surface and demands serious authentication
  • It introduces network latency that direct access would not have

What is the difference between an API and a webhook?

APIWebhook
TriggerThe calling application asks when it needs toAn event fires the send automatically
DirectionYou query the serviceThe service notifies you
Typical caseRequesting today's order listBeing told the moment an order is placed
FreshnessDepends how often you askImmediate

Why does an API matter to a business?

An API turns isolated software into a system that works together. In practice: data entered once, re-keying that disappears, transcription errors avoided, and the ability to swap one tool without rebuilding everything. It also makes a company integrable: a partner or customer who can plug into your system becomes much harder to lose.

Frequently asked

Is an API a piece of software?

No. It is an interface exposed by software. The software holds the logic and the data; the API only describes what can be asked of it from outside, and in what form.

What is the difference between an API and a database?

A database stores the information. An API controls who can reach it and how. Exposing a database directly would let anyone read and change everything; an API opens only the operations you intended.

What is a REST API?

It is a widespread style of web API, built on the verbs of the HTTP protocol and on addresses that name resources. Its popularity comes from its simplicity: any tool that can make a web request can use it.

Is an API secure?

It is if it was designed to be. Authentication, rate limiting, validation of incoming data and logging are all essential. A poorly protected API is a direct door into your data.

Can you use an API without knowing how to program?

Partly, yes. Automation tools can connect services by API without writing code. Once the logic gets complicated or volumes grow, development becomes the better route.

Related terms

Sources and references

Want your tools to talk to each other instead of re-typing the same data? We map your systems and tell you what can be integrated, and at what cost.

Discuss your integrations
Glossary