An application programming interface
) is a set of functions, procedures, methods
that an operating system
provides to support requests made by computer programs
- Language-dependent APIs are available only in a particular programming language. They utilize the syntax and elements of the programming language to make the API convenient to use in this particular context.
- Language-independent APIs are written in a way that means they can be called from several programming languages. This is a desired feature for a service-style API which is not bound to a particular process or system and is available as a remote procedure call.
API versus ABI
An API is typically defined at a higher level (i.e., in terms of a programming language
that can be compiled
when an application is built, rather than an explicit low level description of how data is laid out in memory). For example, the Linux Standard Base
is an ABI
(Application Binary Interface), while POSIX
is an API.
Distinction between specification and its implementation
The software that provides the functionality described by an API is said to be an implementation
of the API. The API itself is abstract
, in that it specifies an interface and the behavior of the identifiers specified in that interface; it does not specify how the behavior may be implemented.
Scope of the term in communications
The API acronym is often used in documentation, discussions or other communications in reference to all of the programming interfaces in the set, a single function in the set and sometimes multiple APIs provided by an organization. Thus the scope is usually determined by the person, entity or document that communicates the information.
There are two general kinds of API publishing policies that are often encountered:
- Some companies protect information on their APIs from the general public. For example, Sony used to make its official PlayStation 2 API available only to licensed PlayStation developers. This enabled Sony to control who wrote PlayStation 2 games. Such control can have quality control benefits and potential license revenue.
- Some companies make their APIs freely available. 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 platform.
Below are listed some well-known APIs.
Language bindings and interface generators
Below are listed some interface generator tools.