API (Application Programming Interface)

API (Application Programming Interface)

API :     A set of functions and procedures that allow the creation of applications which access the features or data of an operating system, application, or other service.

                                                                (Or)

In simple words, an api acts as intermediate between two software programs ,which allows them to communicate with each other and gaining the  data from one program .

The purpose of API is, it makes easier for developer to use certain technology while building application

Types/API's are used in:

  • Libraries and frameworks :  API describes the actual behavior and libraries does the actual implementation  of set of rules. API use ,can vary depending on the type of programming language involved.                               A framework can be based on several libraries implementing several APIs, the access to the behavior built into the framework is converted by extending its content with new classes plugged into the framework itself.
  • Operating System : API can specify the interface between an application and the operating system. for example, specifies a set of common APIs that aims to enable an application written for a POSIX conformant operating system to be compiled for another POSIX conformant operating system.

       Microsoft has built compatible API, (windows api(win32)) where older                   application  version may run on newer version of windows.

  • Remote API : It allows to operate remote resources through protocol. Remote API are useful in maintaining the object abstraction  in object-oriented programming. for example :  Java remote method invocation API uses the Java Remote Method Protocol to allow invocation of functions that operate remotely, but appear local to the developer
  • Web API :  The interactions happen between an enterprise and applications that use its assets.  Web API is a framework for building HTTP services that can be consumed by a broad range of clients including browsers, mobiles, iphone and tablets.It is an application programming interface (API) for either a web server or a web browser.

Those that provide and use APIs are considered as being members of a business ecosystem.The main policies for releasing an API are:

  • Private: The API is for internal company use only.
  • Partner: Only specific business partners can use the API. For example, car service companies such as Uber and Lyft allow approved third party developers to directly order rides from within their apps. This allows the companies to exercise quality control by curating which apps have access to the API, and provides them with an additional revenue stream.
  • Public: The API is available for use by the public. For example, Microsoft makes the Microsoft Windows API public, and Apple releases its APIs Carbon and Cocoa, so that software can be written for their platforms.

Examples:

some popular API examples are:-

 

  • Google Map API : The Google Maps API allow for the embedding of Google Maps onto web pages of outside developers, using a simple JavaScript interface or a Flash interface
  • Youtube API : The YouTube API, allows developers to access video statistics and YouTube channels' data via two types of calls, REST and XML-RPC. Google describe the YouTube API Resources as 'APIs and Tools that let you bring the YouTube experience to your webpage, application or device.
  • Flickr API :  The Flickr API can be used to retrieve photos from the Flickr photo sharing service using a variety of feeds - public photos and videos, favorites, friends, group.
  • Amazon Product Advertising API: Amazon's Product Advertising API gives developers access to Amazon's product selection and discovery functionality to advertise Amazon products to monetize a website.

 

And other are listed as below:

 

Pros of APIs

Understanding the benefits of API production allows you to coordinate with system owners and other stakeholders to modernize the agency’s systems and unlock the sizable potential. Here are just some of these opportunities.

Efficiency

Providing API access allows for content to be created once and automatically published or made available to many channels.

Wider Reach

People who do not come to your website can get agency information or services from apps or other websites that they regularly visit.

 

Automation

APIs allow machines to handle the workload, which would otherwise require the manual work of a human.

Apps

Whether the goal is to support agency-created apps or third-party apps, the first step is enabling API access to the components that would go into a mobile app, thus providing flexibility in delivering information and services.

Partnerships

This can fuel innovation because any citizen with a good idea can create the next killer app for your communities.

 

Personalization

The users of your website, businesses and non-profits benefit from the ability to personalize sessions with the information and services that are most useful to them.

Mashups

Mashups allow the public to better understand your information in the context of other sources of information.

Future-Ready

As needs change, APIs help to support unanticipated future uses.for example, using a service that accesses a backend system to power a new product.

 

Cons of APIs:

  • Cost.

    Providing an API is expensive in terms of development time, ongoing maintenance, providing API documentation on your website and providing support to users of your API.

 

  • Security exposure

    Adding an API adds another attack surface to your website.

 

Using API's will benefit our apps,websites etc in many ways . so learn to use it ,make some awesome things  .Happy Coding.

good one thank you for sharing

Like
Reply
Rakesh Kumar Gupta

Senior Data Scientist / MLOPS / Machine Learning Developer

7y

good

To view or add a comment, sign in

Insights from the community

Others also viewed

Explore topics