Web and APIs
What Is an API?
Also called: Application Programming Interface
An API (application programming interface) is a defined way for one piece of software to request data or actions from another.
Definition
An API is a contract between two pieces of software. One side offers a set of operations, such as "get the weather for a city", and documents exactly how to ask for them and what comes back. The other side uses those operations without needing to know how they are built.
The term covers web APIs that answer HTTP requests, the functions a library exposes to your code, and the calls an operating system offers to programs.
How it works
With a web API, the client sends a request to a URL called an endpoint, often with parameters and an API key. The server checks the request, does the work and returns a response, usually JSON, with a status code such as 200 (success) or 404 (not found).