Most commonly, when we think of an API, we think of a web API such as REST API or GraphQL.
However anytime any program or application communicates with another program or application, it is using some kind of API. It can be command line parameters, function calls, or network requests or hardware APIs.
- It is a set of rules and protocols that allow different software applications to communicate with each other.
- In contrast to user interface, API is meant for program to program or computer to computer communication.
- There are many forms of APIs, such as web APIs, library APIs, and operating system APIs. Some APIs are specific to a particular programming language, some are specific to a particular application.