DEV Community

YuvrajHinger
YuvrajHinger

Posted on

Concept of API For Beginners

What is API?

You might have heard this word in web development but still, most beginners cannot understand what is API.

in this article, I will explain what is API in a very simple way so let's get started & understand what is API.
well API is an acronym for the application programming interface.

General Definition:

An application programming interface is a set of functions, procedures, methods, or classes used by computer programs to request services from the operating systems, software libraries, or any other services provider running on the computer.

Now actually this definition is overwhelming, we need to find a way to understand what is API using a simple definition, so let's put this definition in very simple words.

Definition

The application programming interface is a software intermediary that allows two applications to talk to each other. Like when you use an app like Facebook, send an instant message, you are using an API.

if you take this definition to understand API then it is hard to understand for most beginners then what is the best way to understand API.

well, don't worry let’s understand API using a simple example. let's say you want to book an airline ticket online and you want to find the best website to book tickets and you choose your favorite one.

now did you notice you can book the same airline ticket from many websites just like Make Mytrip, Goibibo, and so on? then how this website did that the answer is using API.
using API they share the same functionality procedure and methods, they use the same classes and methods to know to a reserved seat on the airplane.

They have access to the airplane API to know booking information and book ticket for us.

now let us take another example of API, now let's say you're creating an application and you want the Google login feature to appear in the application then what will you do, you can use Google API.

using API key you can access the Google API and create a login system for your application. The API key is for security to create a secure session Google provides an API key.

You might also read this one All about SSH Key with Symmetrical & Asymmetrical encryption.

API keys are used to track and control how the API is being used. for example, to prevent malicious use or abuse of API. using API key you can do a different kind of operation, like finding the existing user on Google, Log in to the Google account, and so on.
so basically using API you can use functionality provided by the API services, these services share the code with us so we can run it.

Top comments (0)