ResourceInformation

Library › Developer Basics

🔌 Developer Basics

What Is an API? Explained With Moving Pictures

Library · 23 November 2026 · 5 min read

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:

IN A RESTAURANTyou never walk into the kitchen: the waiter takes your order🧑You🤵Waiter👩‍🍳Kitchen1 masala dosa1 masala dosacooking…🍽️🍽️IN AN APPyour app never touches the database: the API takes the request📱Weather app🔌API🗄️Server + dataweather in Delhi?weather in Delhi?looking it up…{ temp: 24 }{ temp: 24 }☀️ 24°CSame idea: ask → someone in the middle → answer
Your app asks the API, the API gets the answer from the server, and brings it back. The app never needs to know how the server works inside.
  • 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:

📱App🗄️Server✉️ GET📦 200⚙️working…THE REQUESTMethodGETURL/v1/forecast?city=delhiHeaderAuthorization: key ••••GET = read · POST = create · PUT = update · DELETE = removeTHE RESPONSEStatus200 OK ✓{ "city": "Delhi", "temp_c": 24, "sky": "sunny"}
The request says what to do, where, and who's asking. The response says whether it worked, and carries the data.

A request usually has:

  • A method: the action. GET reads data, POST creates something, PUT or PATCH updates it, and DELETE removes 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. 200 means OK, 404 means not found, 401 means you're not allowed, and 500 means the server had a problem.
  • The data, usually written in JSON: simple labels and values like "temp_c": 24 that 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)

…
📱 What the app shows: …

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:

🗺️ Maps APIfinds the route💳 Payments APItakes the fare🔑 Login API“Sign in with…”💬 SMS APItexts your OTP🚕Cab app
One tap on "Book" can trigger several API calls: maps for the route, a payment service, a login service and an SMS service for your OTP.

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