An API is a software intermediary that allows two or more application talk with each other.
In hotel, Waiter is an API which helps to communicate between Customer and Kitchen.
API Type in terms of Release Policies
Private - It can be used within the organization.
Partner - It can be used within the Business Partners.
Public - It can be used any third party Developers.
If you create an application in any language and we want to add Ggggle Map in your application. Google not allows you directly to access Google Map Code, it provide Google Map API to expose that service.
Our application contact with Google Map through Google Map API.
Every API having one Documentation which provides services for you i.e. How to use this API, How to communicate with thic API etc.
Consider you have a website of shoping, and you want to display the product of other shoping site like Flipcart, JioMart, Snapdeal and Amazon. All that four shoping site having their API, which expose the product, price and product details.
We can communicate with that application using API, and show product details in our website as shown bellow.