What is an API?

What is an API?

Real-Life Example:

You are hungry and need something to eat,

You could go to Store, buy the required grocery and cook it yourself but as you see, you have to do a lot of things to accomplish it,

The second option is that you can get it from the restaurant, Professional chefs will already have all the resources, but the chef doesn't want you to access all his stuff due to security and safety purposes,

That is where an intermediate is needed to provide allowed services from one place to another, that intermediate or a that serving guy in another word is an API that serves data from one place to another without letting us get into a place where the chef is making all his kinds of things.

API stands for application programming interface, it is a software intermediary that allows two applications to talk to each other.

One common application of API is Signing up on different sites with already created Gmail or Facebook, your data is already saved in one place and the app you use takes data from Gmail/Facebook as an API. APIs are needed to bring applications together in order to perform a designed build around sharing data and executing pre-defined processes,

5 Examples of APIs We Use in Our Everyday Lives:

  1. Weather Snippets
  2. Log in Using XYZ ( Gmail, Facebook etc )
  3. Pay with PayPal
  4. Twitter Bots
  5. Travel Booking