Easiest Way To Understand APIs
Simply Explained What Are APIs?
When I first learned about APIs, it was a while back. I don’t know if you have had the same problem as I did, but I found it hard to understand what they are, how they work, and most importantly, what they actually do and why we need them.

I asked around a lot. I am not shy about asking for explanations. But the most common answer I got was something like:
They are used to perform certain tasks or retrieve specific data.
Hmmmm, okay!
That didn’t make sense!
Well, it did, but I still needed more than that, and maybe an example from real life was needed to make it easier for me to understand. Then, of course, I felt that the issue is with me until I remembered a well-known quote:
If you can’t explain it simply, you don’t understand it well enough. Albert Einstein
So, I found a non-IT-related explanation that helped me understand, and I wanted to share it with you.
When going to a restaurant where you order food. To do that, you interact with the waiter. You can order food and drinks, ask questions about the menu, request the bill, and do many more things.
In this case, the waiter at a restaurant shields you from all the complicated stuff happening behind the scenes. You don’t need to worry about stoves, ovens, dishes, managing food supply, drinks, and more. The waiter acts as the interface between you and all the services the restaurant provides.

In this example, the waiter can be seen as the API of the restaurant, and now we understand why they are useful and important.
API, stand for Application Programmable Interface, and it is a way for different programs to work together in various ways.
There are many types of APIs and reasons why they are used, and we will mention some of them in this article.
APIs can be used to get access to data from third parties. In the example above, the waiter can provide you information on the status of your order, without you having to go to the kitchen yourself. So in a way, you have access to data through the waiter (API).

Aside from that, APIs can also be used to hide complexity and perform tasks. Again from the example above, you do not need to know how to prepare a fish or a roll of sushi, you just order one!
Another thing that APIs can be used for is to extend functionality. In iOS, applications can show a widget in Notification Center. To do that, the app notifies the system through an API that it has a widget available. And if the user chooses to add it to their Notification Center, the system then will contact the app to ask about how it should display the widget.
Another case would be that APIs can also be used for security or let say they act as a gatekeepers. On a mobile device, the system only has a handful of APIs that can be used to get your location. And because it is centralized in the system, it is really easy for iOS or Android to notify you when and app is using your location and asks you for permissions to allow the app to access your location.
It is not the app that is being nice and asking you permissions first! It is the system that does it for them.
So, every time your phone asks you for the permissions, you know that an app is using an API of the system.
Now, to explain the API using technical language:
An API, or Application Programming Interface, is a set of commands and tools that allows different applications to communicate, interact and work together, making it easier to build and connect complex systems.
A perfect example of API use is the iPhone or Android weather app on your phone. It shows the weather around the world, even though Google or Apple have not placed temperature sensors all over the globe. Instead, these apps use the API of a third-party to get weather predictions or show the current temperature around the world.

As you can see in the above examples, APIs are like bridges that connect different software, making it easier for them to work together. They are behind many everyday apps, like the weather app on your phone, a food receipt app, or a booking app, helping them to get information from all over the world. APIs are one of the main keys that is making our technology and devices smart and connected.
