Intro to APIs

Over the holidays, I built a mini Rails app using OMDb, a movie database, to find a summary, IMDb rating, and genres for a movie based on its title. Choosing an API for this project took a lot more work than I had expected. I had no idea how many APIs were out there and the variety of purposes they can serve. So I decided to look into what exactly an API is and how they came about.

First, what is an API?

An API (Application Program Interface) is code written for use by other applications, so that functionality and information can be reused or reinterpreted. The Google Maps API, for example, has been used to build applications such as a Zombie Outbreak Simulator and PlaneFinder, an app that shows realtime air traffic.

APIs provide information in a simplified format, such as JSON (JavaScript Object Notation), defined by W3Schools as, “a syntax for storing and exchanging data.”

“Unlike Web applications themselves, APIs are built for computer consumption rather than direct user interaction.” -Meg Cater,  A Brief History of API-Based Web Applications

And how did APIs come about?

In some ways, it seems counterintuitive for a company to give away their product for others to use. First, I’ll say: not all companies are “giving away” their product; there are plenty of APIs with monthly fees.

In regards to free APIs though, I’ve identified three forces (there are probably more) that push companies to offer them. One, the ethics of open data that has been embraced by tech companies probably more than any other major industry. Two, unofficial APIs often pop up when official ones don’t exist. And three, the API itself is now seen as a valuable asset that makes a product like GoogleMaps the web’s default map provider.

Some of the earliest APIs to launch were Salesforce and eBay, both in 2000 (though this Quora post indicates that the topic is up for debate). Flickr, Twitter, Amazon, Facebook, and Google soon followed.

“The Google Maps API launched was just shy of 6 months after the release of Google Maps as an application, and was in direct response to the number of rogue applications developed that were hacking the application.” –History of APIs, apievangelist.com

APIs are becoming more widespread and essential to web applications, which more than ever integrate multiple technologies. In 2009, the US government launched the website, data.gov, a major push toward open government data.

Social media APIs, such as Twitter, are some of the best known, but APIs are becoming more ubiquitous across all types of applications. Right now there are around 16,541 APIs listed in the directory Programmable Web.

For a further introduction to APIs, I recommend checking out the five-part blog series on Programmable Web entitled, What are APIs and How do They Work?. Programmable Web is also a great source for discovering APIs through their API directory.

Resources

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s