What is an API? API for beginners
Tags: programming, webdev
Published: 2021-07-03 16:14:20

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. 

{% youtube NHVQiDDZ5TA %}

## What will be covered in this Blog

```python
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](https://en.wikipedia.org/wiki/Computer) or between [computer programs](https://en.wikipedia.org/wiki/Computer_program). It is a type of software [interface](https://en.wikipedia.org/wiki/Interface_(computing)), offering a service to other pieces of [software](https://en.wikipedia.org/wiki/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.

![1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625320465148/U62U7ZQdf.png)

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?

![Screenshot_1.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625320615665/e2n8vhuPy.png)

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. 

![Screenshot_3.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625320635703/YLyOw-qDg.png)

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. 

![Screenshot_2.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625320628707/jRmCsG5Q4.png)

## 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. 

![Screenshot_4.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1625320652141/S6huz5zuO.png)

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](https://www.youtube.com/watch?v=jAOkWehMF6E) of the same and **don't forget to subscribe to my Channel**. I would love to connect with you at [Twitter](https://twitter.com/ayushi7rawat) | [LinkedIn](https://www.linkedin.com/in/ayushi7rawat/).

You should definitely check out my other Blogs:

- [Python 3.9: All You need to know](https://ayushirawat.com/python-39-all-you-need-to-know)
- [GitHub CLI 1.0: All you need to know](https://ayushirawat.com/github-cli-10-all-you-need-to-know)
- [How to make your own Google Chrome Extension](https://ayushirawat.com/how-to-make-your-own-google-chrome-extension-1)
- [Run Javascript from Python](https://ayushirawat.com/run-javascript-from-python)
- [Automate WhatsApp using Python](https://ayushirawat.com/automate-whatsapp-using-python)
- [Automate Cowin Vaccine slots Availability using Python](https://ayushirawat.com/automate-cowin-vaccine-slots-availablity-using-python)
- [What is Competitive Programming](https://ayushirawat.com/what-is-competitive-programming-or-beginners-guide)

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