14 min remaining

You may not know what an API does. You may not know what it stands for. But everyday APIs are working behind the scenes to provide you richer digital experiences. The movie ticket you bought online, blogger’s recipe you shared on Facebook, and cheap flight you booked on Expedia are all thanks to APIs.

By helping to deliver seamlessly integrated user experiences from one device to the next, APIs present a wealth of business opportunities. Before discussing how APIs could advance your business, let’s take a closer look at what APIs are and why they’re proliferating so quickly.

What are APIs?

An API, short for “application programming interface,” is a software-to-software interface. Meaning, it provides a secure and standardized way for applications to work with each other and deliver the information or functionality requested without any user intervention.

That’s great news for end users (and third-party developers, but we’ll get to them in a minute). Because APIs do all the heavy lifting in the background, digital experiences remain virtually effortless.

Free Workbook: How to Plan a Successful Website Redesign

Time for an example. Say you want to see the latest box-office hit. Your first step might be searching where and when it’s playing on an online ticketing site like Fandango. After typing in your zip code and selecting a date, you click “go” and, voilà, a list of showtimes at nearby theaters appears within seconds. Here’s what it looks like to the end user.

Screenshot of what Fandango users see because of APIs

Source

Although you stay on Fandango’s site the whole time, there are multiple applications at work to make your search possible. When you click “go,” the site uses APIs to request access to each theater’s database. Those APIs then retrieve the requested information so that Fandango’s site displays the most relevant results for you.

As expectations for such effortless user experiences grow, companies are increasingly looking to APIs to deliver more value to consumers in less time. By leveraging APIs to access another company’s data, piece of code, software, or services, you can extend the functionality of your own product while saving time and money. This is essential not only for meeting and anticipating the increasingly sophisticated needs of consumers but also for staying agile in the marketplace.

If the server (the application providing the resource) can do what the client (the requesting application) asked, then the API will bring back the resource needed or a status code that roughly translates into mission accomplished! If the server can’t do what the client asked — maybe the client requested a resource that doesn’t exist or that it doesn’t have permission to access — then the API will return with an error message.

Controlling access to the server in this way is crucial. Rather than give you all of a program’s information or code, an API provides you only with data that has been made available to external users.

Still confused? Let’s try an analogy. How APIs work is often compared to ordering food at a restaurant, in which you, the diner, represent the client, the waiter represents the API, and the chef represents the server. You look over the menu, pick the meal you want, and place your order with the waiter. The waiter brings your request to the chef. The chef executes on it. Then, the waiter brings you your meal and you enjoy it all the better for not having had to make it yourself.

Visual depiction of API and restaurant analogy

Source

But let’s say too many guests show up at the restaurant and there’s not enough space to accommodate them. Let’s say this keeps happening as the restaurant grows in popularity. What then? That’s where API keys come in.

What is an API key?

An API key is a unique identifier used to authenticate calls to an API. The key is made up of a string of letters and numbers that identify the client (remember this is the application or site making the request). The key can grant or deny that request based on the client’s access permissions, and track the number of requests made for usage and billing purposes.

While not as secure as authentication tokens, this method has some advantages over basic authentication, which only requires a username and password.

By restricting access only to those with keys, a company can control the number of calls made to its API and ensure that only a specific, trusted group of clients can access its server’s resources.

Continuing our example above, think of an API key like a reservation and the API as an exclusive restaurant. By enforcing that patrons must have a reservation to eat at the restaurant, you can keep the number at capacity so that the kitchen can adequately and efficiently serve every guest. Similarly, by allowing only clients with an API key to access and use your resources made available via the API, you help ensure your software is used safely and can handle the number of requests coming in.

What are APIs used for?

A better question might be what are APIs not used for. Want to embed Instagram photos on your e-commerce app? There’s an API for that. Want to provide instant access to thousands of hotels on your travel blog? There’s an API for that. Want to integrate a Yoda translator on your Star Wars fan fiction site? If you can believe it, there’s an API for it.

These examples hit upon some of the most common reasons businesses use APIs. Most clients using APIs want the server to carry out basic functions. These requests may be written as URLs so that the communication between client and server is dictated by the rules of Hyper-Text Transfer Protocol (HTTP). The four most basic requests of a server are:

  • GET: To retrieve a resource
  • POST: To create a new resource
  • PUT: To edit or update an existing resource
  • DELETE: To delete a resource

There is a vast wealth of APIs available today. Some for operating systems, others for websites, and so on, but to fully appreciate their potential in the digital economy, let’s take a closer look at how APIs are classified by who they are shared with and why.

These names are intuitive so we’ll just briefly touch on each type below.

Private APIs

Private APIs are only made available to the workforce to boost productivity and transparency. In other words, developers working for the company can use these APIs as needed but third-party developers can’t. In fact, because these APIs aren't documented in a publicly released software development kit (think, starter kit for creating software applications on a specific platform) or at all in some cases, they are often completely hidden from the public. Many companies do eventually go public with their private APIs.

Partner APIs

Partner APIs are shared externally but only with those who have a business relationship with the company providing the API. The logic of partner APIs, similar to that of public APIs, is rooted in the idea of “if you scratch my back, I’ll scratch yours.” Think of the traffic app Waze, for example, which uses APIs to exchange data with municipalities and other partners about road closures, accidents, construction delays, potholes, and working vehicles, such as snowplows and garbage trucks. Some businesses favor partner APIs over public ones because they want greater control over who has access to the resources they are exposing and a greater say in how those resources get used. For example, Pinterest has adopted a submission-based approach to providing access to new data services via its API, requiring partners to submit a request detailing how they would like to use the API and what underlying data it would grant them before being granted access.

Public APIs

Public APIs are available for external consumption and, as a result, are often much more restricted in the assets they share than private or partner APIs. While some are free, others require a subscription fee to use, which is often tiered based on usage. There are countless advantages to making APIs public, but we’ll focus on two major ones for now. By sharing APIs beyond organizational boundaries, companies learn lessons about support, documentation, and authentication schemes that improve the adoption of its APIs and also encourage third parties to create apps, add-ons, or integrations with the APIs that not only make their products more valuable but also make the APIs more valuable.

Benefits of APIs

Now that we know that businesses can use APIs to securely request and share content, services, and functionalities with both internal and external audiences, you might be thinking why would a company pay another for access to resources that it could create on its own? Why would that company agree to share its assets, particularly with competitors? Or why would it put in all the work of making an API just so its own workforce could use it?

All good questions. Before we dive into the answers, let’s split up the benefits of APIs into two groups: API consumers and API providers.

Benefits to API consumers

You may use APIs to request access to another server’s resources or you may use your own APIs to automate certain tasks. Either way, you fall under the mantle of API consumers. These consumers benefit from using each type of API in several ways.

Productivity

Many companies consume their own APIs. In fact, of the billions of API calls made, around two-thirds of those calls are companies making calls to their own APIs. Why? Using APIs internally enables the workforce to streamline operations, foster collaboration, and strengthen transparency across the company. Amazon founder and CEO, Jeff Bezos, understood the vast potential of internal APIs back in 2002 when he sent an email instructing every team to communicate through APIs moving forward. Following what has been coined “The Bezos Mandate,” developers built or turned their well-developed software components into APIs, establishing consistent and well-managed ways of exchanging data and capabilities across the company as a result.

User Satisfaction

Companies want to provide the best experience for their users. Rarely can one product satisfy and anticipate every need and expectation. That is why they use APIs to extend the functionality of their products. For example, OpenTable uses the Maps JavaScript API to embed an interactive map on its site, making it possible for users to get directions from their homes to nearby restaurants in just a few clicks. If you’re not familiar with the site, check out this screenshot showing an overview of a steakhouse in Indiana.

Screenshot of OpenTable using Maps JavaScript API

Source

Innovation

By allowing developers — whether third-party or internal members of your workforce — to reuse software components, APIs empower them to focus on developing new solutions rather than repeat work that’s already been done. Let’s revisit the example above. Without the Google Maps API, developers at OpenTable would have to dedicate their time and resources to drawing their own map and providing real-time map data to include this feature on its site. Worse still, no matter how much time they put in, it would be nearly impossible to make it as detailed or reliable as Google’s existing solution. So, instead of wasting their time trying to reinvent the wheel, APIs enable developers to focus on creating new tools and functionality that deliver more value to their users.

Benefits to API Providers

Now that you’re convinced of the benefits of using APIs, let’s turn our attention to why you might want to create and then share one with partners or the general public.

Simply put, becoming an API provider unlocks business opportunities and other benefits that build upon those of simply consuming APIs. Let’s look into each one below.

Revenue

The easy answer is money. Google, Yelp, Facebook, and thousands of other companies make their APIs public and monetize them so that they become additional lines of revenue. In fact, at some companies, APIs are the major source of revenue. According to a recent report by MuleSoft Inc., 35 percent of today’s technology leaders generated more than a quarter of their organizations’ revenue as a direct result of APIs.

Scale

By sharing what you do really well with the broadest possible audience, a network of users beyond your employees and customers—including third-party developers and consumers—will become reliant on the data and functionality provided by your APIs. Ultimately, this will improve the usage and adoption of your main platform. In other words, APIs not only expand your customer base, they generate new market opportunities in the digital economy. Amazon Web Services (AWS) is among the most notable examples. This platform, which essentially allows any company or developer to run its applications on top of Amazon’s technology infrastructure platform via APIs, is used by millions of customers around the world and is credited with transforming Amazon from an online bookstore to a global digital giant.

Innovation

Yes, I’m listing this again but with a twist. Above, we discussed how API consumers benefit from using third-party solutions that allow them to focus their time and resources on making their own products better rather than reinventing the wheel. More often than not, however, the relationship between API consumers and providers is much more give-and-take. You may recall that in the early days of Twitter, its user interface was a little clunky. Then TweetDeck, an independent app at the time, came along and built a better user interface on top of the Twitter platform using its public API so that all users could have better Twitter experiences. That’s called a win-win-win, my friends.

How to Use an API

So you’re excited and ready to try your luck with APIs. Now what? It will probably make the most sense for your company to begin by using an API rather than investing time and resources into creating its own right away. Let’s walk through the basics of how you’d get started using an API.

Selecting an API

First things first, you’ll want to find an API that’s right for your business. You might already have your eye on an API, particularly if you’re interested in one of the big wigs like the Facebook API. Or you might have to search by cost — you may want to start with a free API before wading into paid APIs, for example — or by category or any number of other filters. You can type your keywords right into a search engine or browse API marketplaces like Rapid API’s Marketplace.

Once you have an API selected, get your reading glasses on. It’s time to look through the API documentation.

Reviewing the API Documentation

API Documentation is essentially an instruction manual about how to effectively use and integrate with an API. In addition to providing all the information required to work with the API, like whether or not you need an API key, it also usually includes examples and tutorials. Its importance shouldn’t be underestimated: a company might have the greatest API, but no one will use it if they don’t know how to.

Writing a Request

Next up, you’ll need to write your request. The easiest method is to use Postman or another HTTP client online that has tools to help you structure your requests. You’ll still need to understand and get some information from the API’s documentation, but you won’t need much coding knowledge to be successful.

You could also go the DIY route and build a URL by tweaking the examples in existing API documentation to get your desired output. This might sound scary, but you do not have to be a developer to do it. To prove it, let’s look at an easy example from TechnologyAdvice.com.

Say you want to request the weather for a particular city using the Open Weather Map API. Leafing through the documentation, you find this example URL: api.openweathermap.org/data/2.5/weather?q={city name}. Sweet! Now all you need to do is copy and paste this URL into the browser, fill in the name of the city you want to know about, and include your API key. If you want to know the weather in Nashville, your URL would look like this: api.openweathermap.org/data/2.5/weather?q=Nashville,TN&APIID={numberslettersnumbersletters}.

At this stage, online tutorials can really come to the rescue. For example, this YouTube video explains how to use an API to pull location data from Google Maps and then use those coordinates to find nearby photos on Instagram.

This video, like many resources that try to address developers and non-developers alike, focuses on a specific type of API that is considered easier to use than others. These APIs are called REST APIs.

In a typical REST API, a resource will have two URL patterns assigned to it: a plural (to refer to all the resources) and a singular (to specify a single resource). These are also referred to as endpoints. Can you guess why? Because they go at the end of the URL.

Each endpoint is also assigned a list of actions the client can request of the server. So, a plural endpoint may be for listing or creating resources, and the singular endpoint may be for retrieving, updating, and canceling a specific resource. The client would have to include the correct HTTP verb (GET, POST, PUT, DELETE) in its request to tell the server what action to take.

The client and server can use different data formats to pass this information back and forth. JSON, an acronym for JavaScript Object Notation, is a beloved data format used for REST APIs because it’s considered lightweight and human-readable.

WordPress has a REST API that enables developers to create, read, and update WordPress content remotely by carrying JSON objects back and forth between clients and servers. In other words, by allowing developers to easily structure the way they want to get data into and out of a server, they can spend less time accessing the data they need and more time creating better user experiences.

REST vs. SOAP

REST is usually put head-to-head with Simple Object Access Protocol (SOAP), another way to build applications that work over HTTP. REST is considered a simpler alternative to SOAP because it requires writing less code to complete tasks and follows a less rigid structure and logic than SOAP. Another reason people love REST: it provides plenty of conventions but leaves many decisions up to the person designing the API.

Here’s a simple test if you’re deciding between REST and SOAP for your API: if you want flexibility, go with REST. If you want standardization, go with SOAP.

API Examples

Without searching an API marketplace, or even knowing much about APIs, you’ve probably heard of a few. Below we’ll look more closely at four examples so you can understand what information and functionality is available through them.

Twitter APIs

Twitter has a whole platform offering APIs that allow you to dig through Twitter’s massive archive. You can find old Tweets, embed Tweets and timelines within your website or app, programmatically create and manage ad campaigns, filter and stream Tweets in real time, deliver personalized customer service through direct messages, subscribe to the real-time activities of more than 15 accounts via webhooks, and more. There’s also a ton of technical resources and tools available to help you harness the full potential of its global communication network.

Instagram APIs

Instagram’s platform offers a range of APIs to help your business with content publishing, metrics and analysis, and more. Developers plug into this platform to build apps and services that target three groups: individuals looking to share their own content with third-party apps; brands and advertisers needing to understand and manage their audience and media rights; and broadcasters and publishers wanting to discover content and get digital rights to media or share it with proper attribution.

YouTube APIs

Let’s walk through just a few reasons you might want to use one of the many YouTube APIs available: to play videos directly in your app; to let users search content, upload videos, and create and manage playlists; to gain insight into how users are interacting with your videos and channel; to schedule live broadcasts; and much more. You’ll need to request an API key to unlock its potential.

HubSpot APIs

HubSpot’s platform appeals to businesses with three main needs: those looking to build an app and put it in front of thousands of potential users, those looking to create a custom integration between their app and HubSpot’s application, and those looking to build or extend the functionality of their website. Gathering data from different transactional software, storing contacts, and engaging with third-party tools and custom apps in one CRM are just a few ways that HubSpot APIs can help your business.

The Future of the Digital Economy

There are many business advantages to both consuming and providing an API, but let’s keep it simple. The main reason? To connect your application to the rest of the software world. These connections can empower all types of organizations, from start-ups to government agencies, to create new business models that spur more innovation and ideas in today’s digital economy. In this way, APIs are not only changing the way companies do business. They’re changing the way companies think about business.

Blog - Website Redesign Workbook Guide [List-Based]

 website redesign

Originally published Sep 27, 2019 7:00:00 AM, updated October 09 2019

Topics:

Application Programming Interface (API)