DEV Community

Cover image for What is API ?
Vraj Desai for Hack This Fall

Posted on • Updated on

What is API ?

Have you ever wondered how things work in a backend? Did you know how you are able to book tickets online?

I will give answers of all this questions in this blog with detailed explaination in an easy way.

First let's understand What is API?

API stands for Application Programming Interface which acts as interface between two applications (Client and server). Now, it seems so much technical let's understand it by simple real life example.

Let's consider that we are sitting in a restaurant for dinner. So, first to order a food we see what's available on menu. Then we ask waiter that the item is available or not. If item is available waiter will take our order and ask chef which is present in a kitchen to prepare food for us. After preparing food chef will give our order to waiter and then waiter will give it back to us. So, this is how actually an API works. In terms of API, we can say that we as application or user which sends request, Waiter as API which takes our request and send it to chef and chef or kitchen as backend or server which takes action according to our request and send it back to api i.e. waiter. This is how actually things work in backend.

Now, let's understand API with some technical example. Suppose we have to book an Air ticket from any third party websites like goibibo, makemytrip, etc. Lets consider Goibibo here. First we have to select date, time, and location from goibibo's website. Then they show us available flights with respect to airline. Support we have selected Air India then goibibo will send our request to Air India's API with proper authentication which Air India has provided to goibibo. After recieving request goibibo will take appropriate actions and then send it back to goibibo and then we can see the status of our booking that whether it is confirmed or not.

I think now you understood how things work in backend with the help of API.

If you are interested in building API's and have some amazing idea to solve real life problem then participate in HackThisFall 2.0 Global level Hackathon which helds from 22nd October to 24th October (48 Hours). The theme of this hackathon is innovate for good, so if you have any innovative idea then please bring it to HackThisFall 2.0. To participate in it kindly register at https://hackthisfall.devpost.com/ and don't forget to use my referral code HTFHE084. Already around 1k+ hackers are participated in this hackathon.

Top comments (0)