The contract behind a software request

An application programming interface, or API, is a defined set of rules for how one program can ask another for information or an action. The rules specify what a request must contain and what kind of answer to expect. That agreement lets the programs work together even if they were built separately and use different internal designs.

For a forecast, a weather service might require a location and a request for current conditions or a prediction. Its server processes the request and returns structured data—information arranged in predictable fields, such as temperature and conditions. The app reads those fields and turns them into a screen a person can understand.

Why the boundary matters

The API separates what a service offers from how it produces the result. A weather app does not need to know which instruments gathered the measurements, how the provider stores them, or how its forecasting system works. It only needs the agreed request and response. The provider can change its internal systems without forcing every app to rebuild, as long as it preserves the interface its clients rely on.

That boundary also limits what a program can ask the service to do. An API may expose forecasts but not the provider’s underlying databases or every internal operation. Access rules can determine which requests are allowed, while usage limits help protect a service from being overwhelmed.

A small agreement with large reach

One service can support many different apps, websites, or devices through the same interface. Each client can present the returned information in its own way, while the service handles the specialized work behind the scenes. The practical result is modular software: a change to one part need not require rebuilding every other part, provided their shared contract still holds.