What is an API, Simply Explained
Connectivity is something amazing. Right now, we are used to use our computers or phones to buy, post, watch, etc. We can do lots of things actually. We are connected to the world and to each other.
But, how does it actually work?
How do we get our data moving from a place to the other?
How is it possible to place an order, know the weather, or track a package?
The thing is, behind all of theses actions there's is something working under the hood, our real hero: the API: Application Programming Interface and it makes every interaction possible.
Ok, so... What is an API ?
To put is simple, an API is the messenger, that tells the system what you want to do and then returns a response .
Imagine you are in a restaurant sitting at your table: the kitchen would be the system, processing your orders; you can't go there yourself, you need a waiter, a messenger to take your request to the system (the kitchen), and then bring back its response (your food) .
Great, so let's see a real API example
I think that, at some point, most of you have used a forecast app, something like this:
but... how does it work? How does this app know all this information?
Well, it's actually pretty simple: it doesn't.
What it actually does is to connect with the real MVP here: the weather API.
This API is the interface that, like your waiter in the previous example, can be asked by this app to get information from the weather system over the internet about temperature, climate or humidity (your order). It also takes the system response to the request (your food) , and delivers it back to the weather application, which then shows it to you.
So what now ?
Now you can see that it is APIs that makes us possible to know about the weather.
The same concept applies to every interaction between applications , data and devices. They all have APIs making it possible for computers to operate them, which ultimately creates connectivity.
So whenever you think of an API , just think of your waiter running back and forth between applications with requests, and getting back responses.
Subscribe to get your daily round-up of top tech stories!