Tech stack · Explainer

What is an API?
A restaurant analogy

An API, or application programming interface, is a set of rules that lets one piece of software ask another for data or actions. Think of a restaurant: you (the app) order from a menu (the API documentation), the waiter (the API) carries your request to the kitchen (the server) and brings back your food (the response). Apps use APIs for payments, maps, login and more.

By , FounderUpdated 3 min read

Share

Quick answer: What is an API in simple terms?

  1. API — application programming interface.
  2. Analogy — a waiter between you and the kitchen.
  3. Examples — payments, maps, login, weather, AI models.
  4. REST — the most common style for web APIs.
  5. Security — keys, tokens, rate limits.

Key takeaways

  • APIs let apps reuse capabilities instead of building everything.
  • Documentation is the API's menu — read it first.
  • Keep API keys secret; never ship them in app code.
  • Webhooks let services notify you when something happens.
  • Good APIs are consistent, versioned and well documented.

You open a food app, tap "Pay with UPI", see your order on a map, and get a message when it's out for delivery. Behind that smooth moment, a dozen separate systems are talking to each other. The thing that lets them talk is the API2.

What is an API in simple terms? At a glance: API; Analogy; Examples; REST; Security.
At a glance: What is an API in simple terms?

The restaurant analogy

Diagram of 5 steps for the restaurant analogy: 1. You (the app); 2. The menu (API documentation); 3. The waiter (the API); 4. The kitchen (the server); 5. The waiter returns.
The restaurant analogy
  1. You (the app) are hungry for data — say, today's weather.
  2. The menu (API documentation) lists what you can order and how to ask.
  3. The waiter (the API) takes your order to the kitchen in a format the kitchen understands.
  4. The kitchen (the server) prepares what you asked for.
  5. The waiter returns with your dish (the response) — or an apology (an error).

You never enter the kitchen. You don't need to know how it works. You just need the menu and the waiter.

APIs inside the apps you use

Everyday APIs in apps
What you seeAPI behind it
"Pay with UPI"Payment gateway API
A map with your delivery riderMaps and location APIs
"Sign in with Google"Identity API
"Payment successful" messageA webhook from the payment gateway3
An AI assistant inside an appA model provider's API

A request, up close

A request, up close: Request; Response; Methods.
A request, up close

Request

GET /orders/123 — "show me order 123", with a key or token proving who's asking.

Response

200 OK plus JSON data — or 404 Not Found if it doesn't exist.

Methods

GET reads, POST creates, PUT/PATCH updates, DELETE removes.

MDN's introduction to web APIs is a good next step for the technical detail1.

Security basics

Checklist: Security basics — Keep API keys and secrets on your server, never in app code; Use HTTPS for every request; Give each key the minimum permissions it needs; Verify webhook signatures before trusting them; Rate-limit your own APIs to prevent abuse.
Security basics
  • Keep API keys and secrets on your server, never in app code
  • Use HTTPS for every request
  • Give each key the minimum permissions it needs
  • Verify webhook signatures before trusting them
  • Rate-limit your own APIs to prevent abuse

APIs are also how AI assistants use tools — see what is MCP.

Key terms, defined

API — application programming interface. Endpoint — a specific URL an API responds to. REST — a common web API style. JSON — a text format for data. Webhook — a callback sent when an event happens. API key — a secret identifying the caller.

Frequently asked questions

What is the full form of API?

Application Programming Interface.

What is a REST API?

A common style of web API that uses standard HTTP methods — GET, POST, PUT, DELETE — on URLs representing resources, usually exchanging JSON.

What is an API key?

A secret identifier that tells an API who is calling. Keep keys on your server, not in mobile or web app code.

What is the difference between an API and a webhook?

With an API, your app asks for information. With a webhook, the other service calls your app automatically when something happens, such as a payment succeeding.

Do non-developers need to understand APIs?

A basic understanding helps founders, PMs and designers estimate effort, evaluate tools and talk with engineers.

Is UPI an API?

UPI is a payment system run by NPCI; payment apps and gateways connect to it through interfaces built on its specifications, which in practice work like APIs.

Sources

  1. MDN Web Docs — Introduction to web APIs
  2. AWS — What is an API?
  3. Razorpay Docs — Webhooks
  4. Checked October 23, 2026. Figures that change — fees, salaries, prices — are reviewed every six months; if something is out of date, tell us.
Pass it on

Know someone who'd enjoy this?

Send it to them — one tap, no sign-up. Good ideas travel best between friends.

Keep exploring

Where to go from here

Join free

Get the ideas, not the noise.

Sign up with Google and we’ll send you short UX psychology tips by email — why people tap, stall and leave, and what to do about it. Unsubscribe anytime. Prefer something to keep? Get the free Laws of UX guide as a PDF.

Get the free Laws of UX PDFFree · no spam · unsubscribe anytime
Stack chosen?

Now make sure users get to value fast.

A behavioral UX audit of your app or SaaS product: why users hesitate, stall and leave, and a prioritized fix list. Fixed price, 2–4 weeks.

Free certification

Turn what you know into a credential.

Free, test-based UX, UI and product certifications. Answer real product scenarios, graded on our server, and earn a founder-signed certificate anyone can verify and you can add to LinkedIn.

  • Credential ID
  • QR verification
  • LinkedIn-ready
Free PDF · 74 pages · 2 editions

The Laws of UX, in one field guide

60 research-backed principles in 6 categories — what each one means, why it works on the human brain and how to use it on your own screens. Written by Sushant Singh, founder of Science of Apps, who has scaled consumer apps to lacs of users and spent 10+ years leading product across startups and digital businesses in the US, EU & India.

Pick your edition
Free. No card, no paywall — just your email.
Free PDF · 74 pages

Get Laws of UX by email

Choose your edition

You’ll also get occasional UX psychology tips. Unsubscribe anytime. Privacy policy

Free PDF · 90 pages · 2 editions

100+ Subscription Paywalls, decoded

110 real paywalls from top apps, taken apart, rated out of 5 and decoded with the Laws of UX — plus the frameworks, copy and checklists to ship your own. By Sushant Singh, founder of Science of Apps.

  • 110 paywalls rated
  • 34 Laws of UX
  • 12 frameworks

Which paywall scored 4.8 out of 5, and which scored 2.6? It’s all inside.

Pick your edition
Free. No card, no paywall — just your email.
Free PDF · 90 pages

Get 100+ Paywalls, Decoded by email

Choose your edition

You’ll also get occasional UX psychology tips. Unsubscribe anytime. Privacy policy