SEMrush

API - Application Programming Interface

API - Application programming interface (API) is a set of protocols , routines  and tools for building software applications.
The API specifies how software components should interact and are used when programming graphical user interface (GUI) components.

API in procedural languages
In procedural languages  an API is a set of functions or routines that accomplish a specific task and interact with a specific software component

API in object-oriented languages
An API is a set of classes with an associated list of class methods.
An object API is a description of how objects works in a given object-oriented language .
It is a description of a set of class definitions, with a set of behaviors associated with those classes. API provides the building blocks to develop a program hence making things easy for a programmer. A programmer then puts the blocks together.





An API defines functionalities that are independent of their respective implementations, which allows definitions and implementations to vary without compromising each other.
An API expresses a software component in terms of its operations, inputs, outputs, and underlying types.


Types of APIs
We can see many different types of APIs for operating systems, applications or for websites. For example Windows, has many API sets that are used by system hardware and applications — when you copy and paste text from one application to another, it is the API that allows that to work.


Examples of most popular APIs:
  1. YouTube APIs: YouTube API: Google's APIs enables developers to integrate YouTube videos and functionality into websites or applications. YouTube APIs include the YouTube Analytics API, YouTube Data API, YouTube Live Streaming API, YouTube Player APIs and others.
  2. Facebook
    The Facebook API is a platform for building applications that are that are available to the members of the social network of Facebook. The API allows applications to use the social connections and profile information to make applications more involving, and to publish activities to the news feed and profile pages of Facebook, subject to individual users privacy settings. With the API, users can add social context to their applications by utilizing profile, friend, Page, group, photo, and event data. The API uses RESTful protocol and responses are localized and in XML format.   
  3. LinkedIn
     LinkedIn is the worlds largest business social networking hub. Launched in 2003, LinkedIn has millions of users and is implemented in over 200 countries. One purpose of the site is to allow registered users to maintain a list of contact details of people with whom they have some level of relationship, called Connections. Users can invite anyone (whether a site user or not) to become a connection. LinkedIn actually provides 2 APIs: -The JavaScript API is a rich client library enabling you to build dynamic applications in the web browser. Use OAuth 2 to easily authorize users via the "Sign In with LinkedIn" button, access LinkedIn data with native objects, and interact with Plugins. -The REST API provides a simple, consistent representation of people, companies, jobs, and the interactions and relationships between them. Our query language lets you read data in XML and JSON at the granularity and aggregation that you choose. Use OAuth 1.0a to authorize users and begin making REST API calls using any programming language. 
  4. Google AdSense
     The Google AdSense API is ideal for developers whose users create their own content through blogging, web publishing, forum/wiki/community creation, or any other application where substantial web content is generated. Using the AdSense API, developers can let users sign up for AdSense through their site or program, generate detailed performance reports for users, and choose how the AdSense revenue is shared with our revenue sharing program. Additionally users can create accounts to store publisher website information, then generate ad code snippets and filter out unwanted ads. A previous SOAP version has been deprecated in favor of REST with responses formatted as JSON.