What Is An API?

Recently I was asked to give a talk to a group of non technical folks. They wanted to understand what a REST API is. But since a REST API is merely one type of an API, I also had to delve into the concept of what an API is. It is therefore my aim to present in simple layman terms, what an API is and why you should care about it.

So, the first thing you need to know is:

API = Application Programming Interface.

Now if someone asks you, “Hey, do you know what an API is?” you can answer, “Yeah! I know that! It’s an acronym for Application Programming Interface!”.

So, what is an Application Programming Interface? What does it do? Many people use the term API like it’s the most common word in the dictionary, and, DUH.. They expect you to just know what it stands for and what it does.

So, let’s get into the meat of it.

According to Wikipedia’s definition: An application programming interface (API) is a set of routines, protocols, and tools for building software and applications.

So try and think of it like this: A long time ago, about 1300 years ago, right around the time a lot of civilizations were just beginning, everyone spoke different languages. This presented problem, particularly for trade. If one country wanted to trade goods with another, they would have to learn the other country’s very different language. And then if they wanted to trade with another country after that, they would have to learn a second language, again, very different to their own. As you can imagine, with hundreds of countries, this was not a very scalable model.

The people that were affected the most by this particular issue were the ancient Venetians. They would trade with everybody and were therefore the ones that ultimately provided the solution.

To solve this problem, the Venetians made all of the other countries learn their language alone, and by doing so, made their language the lingua franca. So, once the rest of the world learned the Venetian language, they were able to easily trade with any other country.

I feel that this brief history lesson is very appropriate for understanding what an Application Programming Interface is.

Today, more than ever, we have so many different applications. Thanks to Steve Jobs and Bill Gates, it’s hard to meet someone that does not either own a computer or at least use one daily for work. So just think about that computer. How many programs do you have on it? Even a simple calculator is a program. The way you check your email or facebook, that is called a web browser. Also a program. In fact, anything you click on or interact with on your computer, that is a program.

Let’s take a really simple example of how an Application Programming Interface could be used.

Have you ever downloaded a file? A word file? Pdf? Well, when you download the file, you know how sometimes the browser will ask you if you want to open it up directly within Microsoft Word or Adobe Acrobat? If you hit yes, it does it all automatically for you. You never had to actually open up those applications, the browser did it all automatically for you.

How did it do that, you may ask? Well, it used an Application Programming Interface!

An Application Programming Interface is really just a means for programs to communicate and talk to each other. In this example, it was a means for the browser to tell Microsoft Word, “Hey there, I have a file for you to display to the user, here you go!” And then Microsoft Word said, “Ok, thanks. User, here it is!”.

Now, just like with people and countries that have different languages, different applications can also have different Application Programming Interfaces. Which is why there are organizations and bodies out there that are working hard to creating lingua francas so that all applications can converse universally. You may have heard such buzz words like REST APIs and SOAP APIs. These are attempts to create a linga franca for programs to communicate with.

In my next post, I will go into what a REST API is and how you can understand it’s use in today’s world.

Leave a Comment