What Is a Web API and Why Do We Need Them?

Denim Development > Architecture  > What Is a Web API and Why Do We Need Them?

What Is a Web API and Why Do We Need Them?

Our online ecosystem of websites, web applications and mobile apps is thriving. And with the unprecedented growths comes the increased need for cooperation and connectivity. The most common and well-known mechanism for facilitating this inter-connectivity is what is called a Web API.

You may have heard the word acronym “API” before, particularly if you’re involved in technology in your profession. So, what is an API? and how does one work? Read on to find out…

A simple explanation of an API

API stands for Application Programming Interface, but before your eyes glaze over and I lose you, let me explain what one is in plain English. And API is a gateway that is exposed by one online system, to another online system. It is essentially a channel between two connected systems, that allows data and instructions to be transacted at any given time.

To simplify the explanation further, we will use an analogy. The context will be purchasing a drink at a bar…

Dave walks into a bar and asks the bartender for a beer. The bartender looks at Dave, who is 22 years of age, and asks him for ID. Dave promptly presents his ID, and receives an approving nod from the bartender. Dave then hands over cash for his drink and in turn receives his beer.

This transaction can be used to describe how an API works. So, lets break it down.

Dave and the bartender are two separate entities, they are communicating between each other using a pre-determined and agreed communication standard – that being a combination of the English language, an ID card and currency/beer.

English language is a means of communication that they both understand. In the context of a Web APIs, communication must be facilitated using a pre-determined format. The most common formats today are either “JSON” or “XML”.

The ID card is used to validate that Dave is allowed to transact with the bartender. Although this is not mandatory in APIs, it’s common that APIs have in place an authentication mechanism so that it is only accessible to a select number of systems. If not, then it will be a public API.

And lastly, the currency being handed to the bartender and the beer being returned constitutes the transaction being made. The whole reason for the API to exist is to transact data from one system to another. The data that is shared will often be in the formats mentioned earlier, and can be used for many different purposes, which we will cover next.

What can APIs do?

Put simply, APIs connect one online system to another. They are used to bridge the divide between two online systems, which previously had no knowledge of each other.

Once these systems are connected, they will be able to share information and initiate actions without any necessary human interaction. This provides a significant advantage to business owners as staffing costs are cut and cost savings are made.

With this in mind, what practical functionality can APIs make available to these connected systems? Here’s a few examples:

  1. Online payments are made possible by APIs. This is how PayPal, Google, Stripe and many more payment gateways are able to operate.
  2. Social media integrations such as posting an update from one platform to another is made possible using APIs.
  3. Chatbots are able to perform useful actions such as booking you an Uber or ordering some food by leveraging APIs.
  4. Aggregated booking services such as SkyScanner, Expedia and HotelsCombined are able to aggregate booking options because of APIs.
  5. Stock and weather report data is generally made available via publicly available APIs.

These are just a few common examples of what APIs allow us to do. A few others include document signing, email/SMS/push notifications, identity verification, online banking, data analytics and CRM integration.

However, more and more creative uses for APIs are being identified each day, and given the use of online technology expected to continue its profound growth, so will the need for APIs.

In conclusion

The increased use of APIs has come hand-in-hand with the growth of a more connected and open online ecosystem. Day-to-day use of APIs is increasing exponentially, and if you were to build a web or mobile application today, it’s highly likely you will need to integrate it with at least one API.

Knowing how and why APIs are so important is fundamental to being part of the online community. Also knowing the benefits of setting up and exposing an API in your own product or service will also be helpful in identifying potential business opportunities in the future. If you can charge your own customers to use your service, can you also charge other platforms to use it as well?

Need help setting up or integrating with an API? We can help, get in touch with us today.

Daniel Boterhoven

Developer and Founder @DenimDevAU. I create #apps for the web and mobile.

No Comments

Sorry, the comment form is closed at this time.