What is an API?
APIs explained without jargon: how two programs exchange data, why JSON shows up everywhere, and a tiny example you can reason about.
Syllabus
Online course
Prefer a guided cohort with live sessions and feedback? Join the paid online course for this topic.
Ask to join online coursePaid enrolment · fee confirmed before you start
What you will learn
What people mean by “API”, why apps use them, and how a simple request/response looks.
Restaurant analogy (then drop it)
You don’t walk into the kitchen. You give the waiter an order and get food back. An API is that menu and hand-off between programs: a clear way to ask for something and get a structured answer.
A concrete picture
A mobile app needs the latest order status. It does not open the database itself. It calls an API endpoint. The server checks permissions, reads the data, and returns JSON the app can display.
Words you will hear
- Endpoint — a specific URL that does one job
- Request — what you send (method, path, maybe a body)
- Response — status code plus data (often JSON)
- JSON — a common text format for structured data
Try this
In your browser, open DevTools → Network, use a site you know, and find an XHR/fetch call. Look at the request URL and the response body. That is an API call in the wild.