The rules behind a weather app’s forecast
When a weather app needs a forecast, it sends a structured request to another program, often a service running on a remote computer. An application programming interface, or API, defines the request that service will accept and the shape of the reply it will send back. For example, the rules might specify how to ask for a forecast at a particular location and how the returned temperatures and conditions are labeled.
That shared format is what lets independently built programs work together. The app’s developers can design the screen and the forecast service’s developers can manage their own data and systems, without either side needing to understand the other’s internal workings.
A contract, not a peek behind the scenes
An API is more like a strict ordering window than an open door. The app has to use the service’s accepted terms and provide the information the request requires. In return, it can rely on a response organized according to the agreed rules. If the service changes those rules without warning, the app may no longer know how to interpret the reply; compatible changes help keep the two programs working together.
The same arrangement underlies much of ordinary software: a program can request a payment, map, or login service without building that capability itself. The practical consequence is that one part of a digital product can be replaced or improved behind the scenes while the app’s user-facing experience stays the same—as long as the API contract still holds.






