What are APIs?

So, what exactly is an API?

You can find out easily that API stands for "application programming interface." But that doesn't tell you much.

Is it an app? Is it a type of app? Is it in my phone? Is it watching me when I sleep? How come everytime I ask an engineer about it the explanation doesn't make any sense?

These are all valid questions but the answer is surprisingly simple:

An API is a set of rules for computers to communicate with each other.

Yes, it really is that simple and that vague.

The term API has been around for decades but the idea behind it is still basic: somewhere, out there, a computer holds information that another computer makes a request for. This is the technology that provides the backbone for apps (mobile, desktop, web) and the information exchanged between them.

Think about the way you interact with technology. You can use your phone to request data, send data, update data, and, even, delete data. The technology you use for these requests has to be able to interpret your commands and share them with another computer. Then, that computer has to process your request and send a response.

It all happens so quickly and so often that you take it for granted.

Today, when we use the term API, we're typically talking about a web API that makes a request for resources and expects a response in return.