top of page
Writer's pictureNishu Singh

Basics of  API for Beginners


What is an API?



An API, which stands for Application Programming Interface, is a set of rules or protocols that enable different software or applications to communicate with each other and transfer data. It acts as an intermediary layer that processes data transfers between systems.


How does API work?

The working principle of an API is commonly expressed through the request-response communication between a client and a server. The client is any front-end application that a user interacts with. The server is in charge of backend logic and database operations. In this scenario, an API works as a middle layer between the client and the server, making it possible to send data requests and responses.


The common examples of APIs are:

a) Travel booking:

 A travel booking API is a set of rules and protocols that allows different software systems to communicate and interact with each other to facilitate the booking of travel-related services such as flights, hotels, car rentals, and more. These APIs are typically provided by travel service providers, like airlines, hotel chains, and online travel agencies, to enable third-party developers to access and integrate their services into their own applications, websites, or platforms.


b) Google map:

 The Google Map API allows several geographic aptitudes to users within seconds. It is easy to locate places like relative distance from the current location.


c) PayPal:

PayPal is one of the widely used examples of APIs which allows users to connect personal financial information to their PayPal accounts.


d) YouTube:

YouTube offers an API for any developers wanting to interact with the videos on their platform. The most popular use case is video integration. YouTube API allows us to embed a video straight on your platform. For example, a news website could use the YouTube API to embed videos related to a particular news story, or a fitness app could use the API to add workout videos to its library. The YouTube API allows developers to customize the video player’s size, playback quality, and other settings to match their application’s design and functionality.


What are the classification of APIs?

Basically, there are two classifications of APIs. These are:

A) By use case B) By Protocols


A) By use case:

1) Open or Public APIs: Public APIs are publicly available to developers and other users with minimal restriction. They may require registration, an API Key, or OAuth.

2) Internal or Private APIs: APIs used within a company/organization to communicate information between internal apps. Internal APIs are hidden from external users and only exposed by internal systems only.

3) Partner APIs: APIs designed specifically for third-party developers/partners and are more limited in access. Since partner APIs are only made available to certain parties, they tend to have tighter and stricter rules around authorization, authentication, and security.

4) Composite APIs: Composite APIs are a design approach to batch API requests sequentially into a single API call.


B) By protocols:

1) REST API: A widely used architecture for building web services using HTTP methods like GET, POST, PUT, and DELETE format to interact with data resources. REST APIs typically return data in JSON or XML format.

Some examples include social media sites like Twitter, Facebook use REST APIs to integrate with third-party applications and allow posting updates.

2) SOAP API: A messaging protocol used to exchange structured data between web services. SOAP APIs use the XML format for data exchange, and they typically require more bandwidth and processing power than REST APIs. SOAP APIs support more advanced features like transaction, security, and reliability.

3) GraphQL API: A query language for APIs that was developed by Facebook. GraphQL APIs allow developers to retrieve only the data they need, using a single query. This can result in more efficient data retrieval and reduced network traffic.

4) Webhook API: A way to send real-time data from one application to another. Webhook APIs use a simple HTTP POST request to send data to a URL specified by the recipient application. The recipient application can then take action on the data in real-time. Webhook APIs are often used for event-driven applications, such as chatbots or notification systems.



Happy Learning!

Thank You!

87 views

Recent Posts

See All
bottom of page