An API, or application programming interface, is a set of rules that lets one piece of software ask another for data or actions.
A restaurant analogy
You are the app, the kitchen is the server and the waiter is the API that carries your order and returns food.
How an API call works
An app sends a request to a URL with details, and the server replies with data, often in JSON.
Quick reference
| Term | Meaning | Example |
|---|---|---|
| Request | Ask for data | GET weather |
| Response | Returned data | JSON |
| Key | Access code | Secret token |
| Endpoint | URL of function | /users |
Common uses
Weather widgets, payment buttons and maps all use APIs.
Keys and limits
Many APIs require a key and limit how often you can call them.
Frequently asked questions
Is an API a program?
It is an interface.
Are APIs free?
Some are.
What is REST?
A common style of API.
Do I need to code to use one?
Often yes.