What is an API?



Most of us nowadays have a Facebook & Instagram account. And we do have the ability to share a post initially posted on Instagram to Facebook without any difficulty in just one click. Have you ever wondered how Facebook is able to automatically display a photo you posted on Instagram? How does this data travel from Instagram to Facebook?



Or you might have come across applications that uses Google maps in their application to achieve certain tasks.

Well That's were an API comes into play.

Think about an interface. What is an interface? Let's take a Graphical User Interface (GUI). For what is it used for? It's for the user to interact with the application.

API or rather an Application Programming Interface is also similar to a GUI, except for the fact that is not used by a human as a normal interface rather it's used by a program. Which means Humans don't interact with an API directly unless he/she is a developer trying to integrate it to an application.

So, What is an API in terms of simple, technical words?

API is an interface or rather a software intermediary used by program to communicate with an application.

A simple example I've come across about API is that of a scenario at a Restaurant.

You go into a nice restaurant, take a seat at a table. The waiter comes to you and hands you over the menu. You make your order to the waiter. The waiter then goes to the kitchen, tells the staff in the kitchen about your request and when the food is ready the waiter himself comes back to you with a delicious meal and serves it to you.

What do you think the job of the waiter is? He's a messenger between you and kitchen staff. An API can be compared to the waiter. It's simply a messenger that takes requests and tells the system what to you want and returns back with a response to you.

Well if you go into depth there are alot more about API. Here I've tried to give a small glimpse about what an API actually is.

And remember APIs are everywhere. 😃


Sources:

Comments

  1. This comment has been removed by the author.

    ReplyDelete

Post a Comment