What is an API? And Why Should I Care?

August 15, 2016

In the same way that user interfaces allow us to interact with an application, Application Programming Interfaces (API) allow applications to interact with applications.

**
What is an API?**

How do API’s work?

This is best illustrated by example. If you have ever witnessed a Twitter bot randomly like or retweet your tweet, you have seen an API in action. Twitter offers an API so that other applications (bots included) can send and retrieving information to and from Twitter.

Example Twitter Bot

An example of an application that retrieves information from the Twitters API is this sentiment visualizer. The application makes a “call” to Twitter’s API to retrieve some tweets (structured as JSON). It then processes this data and visualizes the tweets. Alternatively, some apps, like Buffer, send information to Twitter’s API to post Tweets on a Twitter user’s behalf.

Why do API’s exist?

Applications use API’s for many reasons. One of the most important reasons is scale. Consider searching for a flight on skyscanner.net. Skyscanner can present flight options from a wide variety of carriers because it can access those carriers systems programmatically. In the past, travel agents would have to call carriers for price information one-by-one. Now, Skyscanner can retrieve current pricing data in an instant. Without API’s, it would be impossible for each carrier to enter a real-time auction.

API at Scale

API’s also provide applications with new ways to monetize their service. Weather Underground offers a website to users but also provides a monetized API so that other applications can user their weather data at scale.

So why should I care?

The phrase, “X is an API for Y” is becoming increasingly common. We see this as the businesses begins to shift their thinking to more digital-centric models. The term can be used both figuratively (“Uber is an API for transportation”), and literally (“Cloudsight is an API for image recognition”).

Having a sense about how API’s work enables more creative thinking about how different services can be combined. This insight provides an opportunity to create more interesting and more valuable applications. API’s can also be used to solve common problems. For example, if there is a problem that involves repetitive computation, classification or information retrieval, it is likely that someone has created an API to solve it. An example of this type of task would be CloudSight’s API for image recognition.

Finally, understanding how API’s work enables business people to envision how problems can be decomposed into replicable solutions with clearly defined inputs and outputs.

How can I explore an API?