What is an API? API for beginners

Hello reader! In this blog post, we will learn about API in plain English.

You can refer to my YouTube video Tutorial to see a working tutorial for better understanding and a step-by-step guide of the same.

What will be covered in this Blog

1.  What is an API?
2.  What is API endpoint?
3.  What are API functionalities?

Let's get started!

What is an API?

API stands for Application Programming Interface. The Wikipedia definition reads:

An API is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software.

In layman's terms, API is a messenger. Let's understand this with a very famous non-programming example.

Say, you visit a restaurant, the waiter presents you with the menu card. You decide what you want to eat. It could be pizza, pasta or fries. The waiter takes down your order and then shares it with the chef. Once your food is ready, he delivers the meal right to you.

This is a very simple process. You do not have to worry about how the food will be prepared or any other thing that takes place inside the kitchen for that matter. Here, the waiter acts as an API. He is the link that establishes connectivity between you and the kitchen.

There are different types of APIs, which we will see in the next blog.

Now. let's look at a real-world example. Whenever you create a new account on an application, you get an option to signup with Facebook or Google. Ever wondered how that works?

Well, Facebook and Google already have your inputs, so instead of performing the tedious task of capturing every user's information and verifying the credentials, the app accesses their database through the API to verify your credentials.

Another very famous example is a weather app. If you want to build one, you cannot physically go and capture the readings from all over the world. Instead, you can use a third-party API to fetch the weather details.

What is API endpoint?:

API sets the rules for communication. You do not know what happens at the backend or how it happens, you just interact with the API interface and get the job done.

In the case of the restaurant example, you do not know the food recipe or anything that goes inside the kitchen, you interact with the waiter and he establishes the connection between you and the kitchen so, in this scenario, the waiter is your API endpoint.

Well, this also opens doors to security theft. So for this very reason API uses API keys to add a protection layer. An API key is used for identification and authorization which is nothing but a security code, used to keep a track of the users. Being said that, not every API has a key.

In order to communicate with systems, there are certain protocols to be followed when using an API endpoint. APIs also have documentation for the same.

API functionalities:

  1. Establishes a connection between computer systems and enables data accessibility.
  2. Allows monitoring users and their activity.
  3. Increased security.
  4. Hide complexity by eliminating the 'How' factor.

That's it. And with that, it's a wrap! I hope you found the article useful and now you can start building some projects with API!

I create content about Career, Blogging, Programming, and Productivity, If this is something that interests you, please share the article with your friends and connections. You can also subscribe to my newsletter to get updates every time I write something!

Thank you for reading, If you have reached so far, please like the article, It will encourage me to write more such articles. Do share your valuable suggestions, I appreciate your honest feedback!

I would strongly recommend you to Check out the YouTube video of the same and don't forget to subscribe to my Channel. I would love to connect with you at Twitter | LinkedIn.

You should definitely check out my other Blogs:

See you in my next Blog article, Take care!!

23