What exactly is an API?

What exactly is an API?

Understand with real-life examples!

What is API?

API stands for Application Programming Interface which acts as interface between two applications (Client and server). Now this defination seems much technical, so let us try to understand this concept with some real life examples.

A non-techie example of API:

let's consider that we are sitting in a restaurant, so first thing we do there is order a food which is available in the menu. Then we ask the waiter if the item is available or not. If item is available waiter will take our order and ask the chef to prepare food for us. After preparing food chef will give our order to waiter and then waiter will give it back to us. So, this is how actually an API works. In terms of API, we can say that we as application/user sends request, Waiter as API takes our request and send it to chef and chef or kitchen as backend or server which takes action according to our request and send it back to API i.e. the waiter. This is how actually things work in backend, with the help of API.

Real-world examples:

Airline ticket booking system:

Now, let us try to understand API with some technical example, Suppose we have book an airline ticket, many of us make use of third party applications like ixigo, makemytrip, goibibo, yatra etc etc.. for booking tickets. Have you ever wondered how all these applications communicate to different airline servers to get accurate information about seat availability? Let us consider ixigo here, for booking a flight ticket in ixigo, you have to select date, time and location, then it shows us available flights with respect to different airlines. Suppose we have selected SpiceJet then ixigo will send our request to SpiceJet's API with proper authentication which SpiceJet has provided to ixigo. After receiving the request SpiceJet's server will take appropriate actions and then send it back to ixigo and then we can see the status of our booking that whether it is confirmed or not.

In short, API is an interface which tries to expose some part of information from application/server which can be used by 3rd party applications.

Login/Register with Google/Facebook credentials

Nowadays, many websites offer the option to login/register through Facebook, google, etc if you have an existing account on these websites. An example of this is LinkedIn, where users can create an account through Facebook with just one tap.

LinkedIn uses the Facebook API to verify the user’s identity, as well as access valuable user information such as gender, age, mutual friends, and photos to build their profile.

Fingerprint Authentication

Most banking apps now enable a user to log in with their fingerprint on fingerprint-enabled phones. Do the banks need to develop their own fingerprint scanning technology? No! An API allows the banking application to interact with the phone’s built-in fingerprint scanning technology.

Conclusion

API’s connect the world like never before. They remove previous barriers with just a few taps or clicks and can easily be integrated. Just think of them as waiters going back and forth between delivering data and creating interconnectivity.

Thank you for taking your time to read.