freecoding.school100% FREE · NO SIGNUP
Endpoint BayISSUE #1 of 45

what is an api · the contract

RestaVSThe 401 Bandit
Resta saysAn API is a contract: a defined way for one program to request something from another.

An Application Programming Interface defines what you can ask for and what you'll get back — the agreed-upon "menu" between software systems. A weather app doesn't measure temperature; it calls a weather API. The contract (endpoints, inputs, outputs) lets teams build against each other without knowing each other's internals.

Power-ups you unlock

The 401 Bandit attacks — common mistakes

Boss battleDescribe a real app you use and name the API call it likely makes.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>request:  GET /weather?city=NYC
response: { "temp": 21, "unit": "C" }
the contract, not the thermometer.</pre></body></html>
▶ Open the interactive comic issue
Why Apis · Machines Talking To Machines ›