Web APIs — What and Why?

Introduction

Shehara Grabau
3 min readOct 25, 2020

A Web API or Web Application Programming Interface is a framework which facilitates the provision of services and data to different devices such as laptops, mobile devices etc. A web API can be accessed through HTTP. Simply put, it is an API for the web.

A web API is a web development concept and is limited to the client-side of the web application and details about the webserver or the web browser are not included.

It can be built using technologies such as Java, ASP.net etc. It is an ideal platform to build REST-ful services over the .NET framework. Hence, a web API can be seen as an enhanced form of a web application.

Features of Web APIs

  1. Web APIs work with HTTP verbs: GET, POST, PUT and DELETE. Hence it supports: create, read, update and delete actions
  2. Multiple text formats such as XML, JSON etc. are supported
  3. Supports self-hosting
  4. Non-object-oriented content such as PDFs and images may get accepted and generated
  5. Open-source

Web API Version History

  1. Web API 1.0
    >.NET Framework 4.0
    > ASP.NET MVC 4
    > VS 2010
  2. Web API 2.0
    >.NET Framework 4.5
    > ASP.NET MVC 5
    > VS 2012, 2013

Why Use Web APIs?

In an era where technology is at the tip of our fingers, web-based applications alone are not sufficient to reach everyone on the internet. This is because most internet users are now using mobile devices and tablets to stay connected on the go. To expose data and services to everyone, these services need to be exposed as APIs compatible with every browser. For example, consider how Facebook is made available for the web application as well as the mobile app.

Web APIs can be consumed from anywhere

Web APIs are preferred to use with native applications that do not support SOAP but require web services. Furthermore, performance and fast development of services are enhanced with web APIs.

Another reason to use Web APIs is it enhances the development of lightweight and maintainable web services while supporting any text format (JSON, XML).

According to w3schools.com,

A Web API is a developer’s dream.

> It can extend the functionality of the browser

>It can greatly simplify complex functions

> It can provide easy syntax to complex code

Examples of popular Web APIs

  1. Google Geo-location API (Google Maps)
  2. Google Analytics
  3. YouTube
  4. Facebook Apps and Plugins
  5. LinkedIn
  6. Twitter
The most popular web APIs of all time

Limitations of Web APIs

  1. Latency — Generally this can be seen as the only limitation of web APIs. Latency is caused when there is a larger user base and synchronous calls are made to the API. This makes the processing time increase and the other requests wait in a queue. Another factor that causes latency is when the API is hosted on the other end of the world.

--

--

Shehara Grabau

Inspired by the little things in life, I aspire to be more.