DEV Community

loading...
Cover image for What is an API? API for beginners

What is an API? API for beginners

Ayushi Rawat
A Software Developer and a YouTuber who likes to write Technical Blogs and contribute to Open Source.
・4 min read

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?
Enter fullscreen mode Exit fullscreen mode

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.

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

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

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

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

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!!

Discussion (6)

Collapse
tatiana profile image
EYEPISSGLITTER • TATIANA • DJCropTopTot

This was really helpful! Thanks for sharing such great examples!

Collapse
tobiashewel profile image
Tobias H

This is such a great post. I've just begun playing around with API's, and this helped clear things up for me. Thank you for the great examples

Collapse
umarsoft profile image
Umar-Soft

Really i get this article very helpful and i subscribe for further informative articles. Thanks

Collapse
am_ifty profile image
AM IFTY

Really helpful for beginners!!

Collapse
vcown profile image
Vanessa Wright

Thank you for writing this! I will continue reading your Blog.

Some comments have been hidden by the post's author - find out more