What Are API Calls?, Part 1

Aug 24, 2015

In almost every application project, the topic of APIs will inevitably come up. A lot of the times, clients with less familiarity in current technology than us dorks are afraid to ask, “What is an API?” If that’s you, you’ve stumbled upon the right article. So stick around because the fun is just getting started. If you are highly technical and already know what an API is, this probably isn’t the article for you. So AP BYE!

Let’s dive in! API stands for “application programming interface”, and it’s a way for two systems to communicate to each other.

Imagine, for instance, that there are two humans who both speak different native languages. One of them speaks Spanish and the other speaks Chamicuro (Yes, I understand Chamicuro is a bad example of another language as most Chamicuro speakers have shifted to speaking Spanish–let’s ignore that fact).

Anyhow, understandably, the Spanish and Chamicuro speakers are having a difficult time communicating. After reading each other’s documentation (wouldn’t it be neat if people came with documentation!), they discover an important commonality: they both speak Aguano. Now, they are able to communicate effectively! And while I understand there is currently some controversy over Aguana and Chamicuro being the same language. For the sake of understanding APIs, it’ll do the trick.

Now let’s dive a little deeper! Imagine our Spanish-speaking friend is actually an aesthetically-pleasing iOS application which displays the weather and our Chamicuro friend is The Weather Channel’s website who has made its weather data accessible through an API. The weather channel has an API “endpoint” where the iOS application sends a request for information, such as the current weather data. Then, the iOS application receives a response from The Weather Channel which includes the current weather conditions. Now the iOS application can neatly display your local forecast! Neat.

APIs, in my code already?

APIs aren’t simply limited to two separate systems which want to communicate. Nearly all applications have APIs already built-in! For example, PHP, the programming language which powers Facebook, speaks to a database like MySQL through a set of API calls. This is another example of an API.

Think about the endless applications of systems communicating. Consider the idea cars in the future may have a standard language to speak with other cars (unless a larger system controls the cars through an API, which may happen too). Or, your refrigerator might send an API call to LG’s servers, which in turn send you back an email notifying you your refrigerators not running and instructions how to schedule service. Even more, maybe your almost empty coffee mug is equipped with a sensor which sends an API call to your coffee maker when it’s empty letting it know it’s time to brew more! As you can see, the applications are endless.

So, now you know what an API call is. Stay tuned for ‘Part 2: What does an API call look like?’. In the mean time… API calls, make one today!

RECENT POSTS

The Evolution of Buy Now, Pay Later in eCommerce: Part 1

The Evolution of Buy Now, Pay Later in eCommerce: Part 1

If you’ve shopped online recently, you’ve probably noticed an increase in financing options being offered at checkout. An increasingly popular option, “Buy Now, Pay Later” (BNPL) services offer instant short-term loans at point-of-sale (POS), often without interest or...

The State of Mobile Apps in the Cruise Industry

The State of Mobile Apps in the Cruise Industry

Since 2018, Sourcetoad has been very interested in the world of cruise mobile applications and their features. We’re interested partly because we want to be better software engineers, and partly so that we can better inform our clients. This interest drove us to begin...