Web Basics Intermediate

What Is an API?

An API is the way one app asks another app for information.

Download the poster

Apps need to talk to each other all the time. A weather app needs weather. A map app needs maps. They get that information through an API.

API stands for Application Programming Interface. That is a big name for a simple idea: a set of rules that lets one app ask another app for something.

Think of a restaurant. You (one app) tell the waiter your order. The waiter takes it to the kitchen (another app), which makes the food and sends it back. The API is the waiter, carrying requests and responses.

So a weather app sends a request like, "What is the weather in my town?" The weather service sends back a response with the answer.

The answer usually comes back in a tidy text format called JSON, which apps find easy to read.

Because of APIs, apps can share superpowers, and you get weather, maps, and messages all in one place.

What to remember

  • An API lets apps talk to each other.
  • One app asks (the request), another answers (the response).
  • It is like ordering at a restaurant: you ask, the kitchen makes it.
  • A common style is REST, and answers often come back as JSON.

Words to know

API
Application Programming Interface, the rules apps use to talk.
Request
The message one app sends to ask for data or a service.
Response
The reply the other app sends back.
JSON
A simple, tidy text format that apps use to share data.

For grown-ups

An API defines how software components communicate. Web APIs typically follow REST conventions over HTTP and exchange JSON. Think of it as a contract: a client sends a request to a defined endpoint, and the service returns structured data, without either side needing to know how the other is built inside.

Want the full story? These go deeper: