Library › Developer Basics
🔌 Developer Basics
What Is an API? Explained With Moving Pictures
Every time you check the weather, pay with your phone or tap "Sign in with Google", apps are quietly talking to each other through APIs. API stands for Application Programming Interface, which sounds scary but is a simple idea. By the end of this guide you'll understand it, and you'll even make a real API call yourself.
1. An API is a waiter
In a restaurant you don't walk into the kitchen and cook. You tell the waiter what you want, the waiter tells the kitchen, and brings your food back. You don't need to know how the kitchen works. You just need to know how to order.
An API is the waiter between two pieces of software:
- The menu is the API's documentation: the list of things you're allowed to ask for.
- Your order is a request.
- The dish that comes back is a response.
2. What a request and a response look like
Most APIs on the web talk using the same language as websites: HTTP. Watch one round trip:
A request usually has:
- A method: the action.
GETreads data,POSTcreates something,PUTorPATCHupdates it, andDELETEremoves it. - An address (URL): which data you want, for example
/forecast?city=delhi. - Headers: extra details, often an API key that proves who is asking (like a membership card).
A response comes back with:
- A status code: a number that says how it went.
200means OK,404means not found,401means you're not allowed, and500means the server had a problem. - The data, usually written in JSON: simple labels and values like
"temp_c": 24that any programming language can read.
3. Try it: make a real API call
This box calls a real, free weather API called Open-Meteo. Pick a city and press the button. You'll see the exact request that was sent, the raw JSON that came back, and what an app would show you.
Request
Press "Send request"
Response (JSON)
…
Weather data by Open-Meteo.com (free, no key needed). Only the city's location is sent.
That's exactly what weather apps do, just with nicer pictures. The app sends a request, gets JSON back, and turns the numbers into a friendly screen.
4. APIs are everywhere
Big apps are built by combining many APIs, some their own and some from other companies. Take a cab-booking app:
This is why apps can be built so quickly today. A small team doesn't need to build its own maps, payment system or SMS network. It just calls the APIs of companies that already do it well.
Other APIs you use every day without noticing:
- "Sign in with Google": a website asks Google's API to confirm who you are, without ever seeing your password.
- Flight and hotel comparison sites: they ask many airlines' and hotels' APIs for prices at once.
- UPI payments: your payment app talks to your bank through the UPI system's APIs.
- AI chatbots inside other apps: many apps send your question to an AI company's API and show you the reply.
5. Keys, limits and versions
- API keys: many APIs need a secret key with each request, so the provider knows who's calling and can bill or block them. Treat keys like passwords.
- Rate limits: to stay fast for everyone, APIs often limit how many requests you can send per minute.
- Versions: addresses often include
/v1/or/v2/, so a company can improve its API without breaking the apps already using the old one.
Most web APIs follow a style called REST, which is what you just saw: addresses for things, plus GET, POST, PUT and DELETE. A newer style, GraphQL, lets the app ask for exactly the fields it wants in one go. We'll compare them in a future guide.
Key takeaways
- An API is a set of rules that lets one program ask another for data or actions, like a waiter between you and the kitchen.
- A request has a method (GET, POST, PUT, DELETE), an address and headers.
- A response has a status code (200, 404, 401, 500) and data, usually in JSON.
- Modern apps are built by combining many APIs: maps, payments, logins, messages.
- API keys identify the caller, and should be kept secret.
Quiz: test yourself
1. In the restaurant analogy, what is the API?
The waiter: it carries requests to the kitchen (server) and brings responses back.
2. Which method would an app use to read data?
GET.
3. What does status code 404 mean?
Not found: the thing you asked for doesn't exist at that address.
4. What format do most web APIs use for their data?
JSON: simple labels and values that any language can read.
5. Why should you keep an API key secret?
Because anyone with it can use the API as you, using up your limits or running up your bill.
Two new visual guides every week
Plus animated tech explainers on YouTube and Facebook.
More from the Library

Why CORS Errors Happen
The 'blocked by CORS policy' error explained with moving pictures: what an origin is, why browsers block, preflight requests and the server fixes that work.
Read with pictures →
How DNS Works
How does typing a name like resinfo.in find the right computer? Watch a DNS lookup travel from your browser to the root, .in and name servers, then try a live lookup yourself.
Read with pictures →
Monolithic vs Microservices
One big app or many small ones? See how monoliths and microservices deploy, scale and fail, with running diagrams, real company stories and a quick decision helper.
Read with pictures →