What is an API - The concept of API explained

In this article, we will talk about "What is an API ?" also known as Application Programming Interface. This is a very common term & very useful term, but there is a problem with our society or our computer society. We give 0 F to whether people understand that subject or not. We just wanted to be technically correct.

If you look up the API definition on any platform like Wikipedia or a blog. They are technically correct that's one part but they are not so understandable. So in this article, we are going to make sure that you understand an API, and what is an API and after reading this article you never ever watch any video on API or blog. Because you will be understanding each and every bit of API.

Let's talk about what is API. Now go ahead open up your favourite search engine and try to look up what is an API. Let me help you and try to read what is written on your very favourite Wikipedia - "It is a set of functions and procedures that allows creating of application which accesses the feature or data of an operating system application of other services."
Again a bumbo-Jumbo, which means We don't get what is API. Now the problem is this definition is perfectly correct and the people who are using the API will be saying that "Hey! is a perfect definition and perfect point To understand". Now here is the problem, the people who are already using the API don't need to understand "what is API ?" because they know about it. But for the people who don't understand API I need to target those people. We need to make sure that they understand.

API is very simple, something which is helping you to have seamless connectivity, you don't feel that you are getting connected with so much of the thing that API is actually helping.

Examples of API

Now remember the example this one only always, that when you try to book an airline ticket or maybe railway ticket you book it from various websites. Let's just say you want to fly from Delhi to Jaipur or Jaipur to Mumbai and you choose your favourite Indigo Airlines. But how many times do you actually book from Indigo Airlines? You rarely do that. You use other services like makemytrip.com or maybe goibibo.com or any other services. So how is that possible that your booked from the third-party website but still you are getting a seat on the same plane? The answer is API.

Here is one more technical example. You might have seen login with Google or login with a Facebook feature on many websites or apps. This makes the authentication system easy to handle for the developers because Google and Facebook had already verified their users. We just use the cooked-up code and use them directly. We don't care how things work.
On the other hand to avoid the misuse of this kind of feature google and Facebook asks for an API key so that they can track you. If someone is found misusing the API, they can also block him.
Now there is no such extreme mumbo-Jumbo with the API. It's the simplest thing in the world but yet the definition has made it so Complex here.


Now on a summary note, I would say that yes API is just code written by someone else I don't really bother that how it is being written, why it is being written or what the circumstances would have been why these people have written this code. All I care about is that this is someone else code, that he is legally giving me permission to use that code and I can use that in my application.

For example login with Google or login, Facebook are the most common example of using the API of Facebook and Google. You might have seen other things as well, like for example if I want to just use or make a simple mobile app or weather application. I am not Tony Stark, I am not gonna put any satellite into space that is going to calculate the whole complexity of things that are going on there and will give me the date, where will it rain? or where will it, not rain?

But what I can do is that some people have done that already and I can use their APIs. Some of the APIs are free and some of them are not. Like sign-in Google is a free tier that you can use. But if you want to use the Google database and want to fix everything on there like a live database that we call a library loading database, some of the parts are free for the Firebase and we'll talk about the Firebase in some other articles. But if your user base is growing you have to pay them as well so that is why the maintenance cost sometimes is there a little bit.

So now you understand that API is a code written by someone else and you can use that code in your application and that is it.

Now sometimes in that application, you have to use an API key as well so that the misuse of that code or that feature is not there.
Ok so I hope you understood what is API and from now onwards you will never ever look at what is API rather you will be looking at the things that how I can use the API which would be much more important. So basics all clear up and maybe in some of the articles I will try to make sure that you understand how APIs are being used as well.

Recent Articles

Changing Database from SQLite to MySQL - Django

One of the main benefit to use django for web development is that it comes with an inbuilt database/filesystem i.e SQLITE. Managing database and files is super easy in django. But there are some drawbacks of using SQLITE...

  - 2023-07-12
How to download a file in django

Sometimes we have to serve a file which may be a large file from our project directory. Suppose you want to transfer a file from your project directory to your friend or to some other person/server/platform....

  - 2023-07-12
How to change base url or domain in sitemap - Django

A sitemap is the first important SEO step which elaborates a website's content to search engines. It provides information to search engines about the available content on our site, which helps them to crawl webpages for indexing....

  - 2023-07-12
How to Make a Website

After reading this article you will never ever search for web development guide neither on Google nor on YouTube....

  - 2023-07-12
What is Javascript - Features and usages

I'm kind of a person who always likes to get started by installing the things & writing some code. I love that but this time JavaScript requires a little bit of the theoretical basic so that we can understand what things we are learning, how hard and powerful it is and where they can be applied....

  - 2023-07-12
Top 5 Interview Questions : Tips for HR round

In this article we are talking about the most famous HR questions and the mind-set to answer those HR questions....

  - 2023-07-12
How to get job in IT - Perfect resume guide

In today's article I want to talk about how to prepare the best resume to get a job in IT. Yes, everybody wants to have a job and in order to get a job you have to apply for it and when you apply for that, the resume is one good thing that you always submit....

  - 2023-07-12