Lesson 1 · The big idea

What is an API?

An API is a structured way for one piece of software to ask another piece of software for data or to perform an action. It defines what can be requested and how the answer will be returned.

A complete API round trip
💻
Your ComputerMakes the request
🌐
InternetCarries the request and response
📋
APIDefines allowed requests and response structure
RequestGET /companyResponse{ name, domain }
🖥️
Server + DataProcesses the request and gets the result
1. Request outAsk for specific data or an action
2. Response backReceive the requested result in a defined structure
🍽️

Like a waiter

You choose what you want from a menu, the waiter carries your request to the kitchen, the dish is prepared, and the waiter brings it back to you. You can focus on the result without needing to know the details of how the kitchen operates.

📋

A defined menu

An API tells you what you can ask for, what information you need to provide, and what the response will look like.

🔌

A software connector

APIs let websites, apps, databases, and AI systems use capabilities that are provided by other software.

Key idea: an API lets you add a useful capability to a product or workflow without having to build that capability yourself.

Quick check

Which description is closest to what an API does?