The short version
When you check the weather on your phone, the app doesn't know the forecast itself. It sends a request to a weather service, gets data back, and shows it to you. That request-and-response exchange happens through an API, an Application Programming Interface.
APIs are everywhere. Every time you log in with Google, pay with Stripe, or ask an AI a question, an API is handling the conversation between systems.
How it works
Most APIs on the web use HTTP, the same protocol your browser uses. The basics:
- Endpoints are specific URLs that do specific things. Like
/api/weather?city=london. - Methods tell the service what you want to do.
GETto read data,POSTto send data,PUTto update,DELETEto remove. - Request is what you send: the URL, any data, and credentials that prove you're allowed to ask.
- Response is what you get back: usually JSON (structured text data) with a status code like
200(success) or404(not found).
GET https://api.weather.com/current?city=london
→ { "temp": 14, "conditions": "cloudy", "wind": "12mph" }
The classic analogy: an API is like a waiter in a restaurant. You (the app) tell the waiter (the API) what you want. The waiter takes your order to the kitchen (the server), and brings back your food (the data). You never go into the kitchen yourself.
Why it matters
Every integration, every AI tool, every automation you use is built on APIs. When someone says "we'll connect these two systems," they mean via an API.
If you've ever connected Zapier to Slack, or asked Claude to search the web, that's APIs at work. Understanding what's happening means you can fix things when they break, or build something new by wiring APIs together yourself.