Skip to content

What’s An API? How does it work?

API

What is an API? In some ways, it’s not as complicated as you think but in other ways probably more complex than you might imagine. An API is an “application program interface” like a set of routines, protocols, and tools for building software applications. It directs software components on how to interact with one another. An API may be for a web-based system, operating system, database system, computer hardware, or software library.

Here’s a great analogy that was written by MuleSoft. “Imagine you’re sitting at a table in a restaurant with a menu of choices to order from. The kitchen is the part of the “system” that will prepare your order. What is missing is the critical link to communicate your order to the kitchen and deliver your food back to your table. That’s where the waiter or API comes in. The waiter is the messenger – or API – that takes your request or order and tells the kitchen – the system – what to do. Then the waiter delivers the response back to you; in this case, it is the food.”

So specifically… how can they help your website? The following list contains several examples of popular APIs that add a lot of valuable functionality and interactivity to a web page:

  1. Twitter offers two APIs. The REST API allows developers to access core Twitter data and the Search API provides methods for developers to interact with Twitter Search and trends data.
  2. Google‘s APIs lets developers integrate YouTube videos and functionality into websites or applications.
  3. Google Maps APIs lets developers embed Google Maps on webpages. The Google Maps API is responsive and will work on mobile devices and desktop browsers.
  4. The Flickr API is used by developers to access the Flick photo sharing community data.
  5. Amazon‘s Product Advertising API gives developers access to Amazon’s product selection and discovery functionality to advertise Amazon products to monetize a website.
  6. FedEx or USPS API returns the current shipping prices required to ship products purchased through an online shopping cart system.

If you’ve ever visited a website and received a message in your browser that the site is asking for your location, that website is attempting to use the geolocation API. APIs like this instruct the browser to access GPS or nearby Wi-Fi networks to find your current physical location.

If you’ve ever wanted to capture photos or video from an iPhone’s camera, you wouldn’t have to write your own camera interface. You would simply use the camera API to embed the iPhone’s built-in camera in your app. If APIs like this didn’t exist already, app developers would have to create their own camera software and interpret the camera hardware’s inputs themselves. But Apple’s developers have done the work so that the developers can use the camera API to embed a camera, and then get on with building their app. Best of all, when a developer improves their API, all the apps that rely on it will get the same improvements automatically.

This simplicity and ease of use offered to developers who take advantage of APIs apply to every platform. For example, if you want to create a dialog box on Windows, there’s an API for that. If you want to support fingerprint authentication on an app for Android there’s an API for that, too. APIs allow developers to make greater strides when building unique content or applications because they don’t have to spend a lot of time reinventing the wheel over and over but use the appropriate API to accomplish previously defined functionalities.

If you’d like help installing and integrating an API into your website, contact us. We’d be happy to lend a hand!