Have you ever been in a hotel or a resturant? You must have! There you must have taken the advantages of the services offered by a waiter. A waiter is someone who takes your order, forward the order to the hotel kitchen and than serves back you the requested food item. Well, an API is much similar to that.
Application program interface (API) is a set of routines, protocols, and tools for building software applications. An API specifies how software components should interact.
There are many different types of APIs for operating systems, applications and websites. When you visit a website now-a-days you must have seen, that they have multiple sign up options like: Sign up with Facebook, Google, LinkedIn etc. Well this is the most common use of API these days. Here is a list of some commonly used APIs:
When we said before, that API is like a waiter, we meant that it doesn't let you to know, how the method or the procedure functions, by which the requested dish is prepared. It only brings you the prepared dish irrespective of the technique used to prepare it. Similarly, say you requested some user data through a social API. So, the API requests the web service(say Facebook) on your behalf and make the appropriate request to the Facebook server and returns back the result to you.
Some advantages of API are as follows: