An application programming interface (API) is an interface or communication protocol between different parts of a computer program intended to simplify the implementation and maintenance of software. An API may be for a web-based system, operating system, database system, computer hardware, or software library.
– According to Wikipedia
API documentation normally details syntax and context for each element of the API. It may include software design guide (also called the developer guide) with complete conceptual material and context, guiding the API user’s thinking during application design and coding.
How do APIs work?
APIs let your product or service communicate with other products and services without having to know how they’re implemented. This can simplify app development, saving time and money. When you’re designing new tools and products—or managing existing ones—APIs give you flexibility; simplify design, administration, and use; and provide opportunities for innovation.
An ideal API
An ideal API reference guide will be complete, accurate, clear, well-structured, well organized and easy to navigate.
A complete API reference will describe the syntax and function of every element of the API in detail, even if the description of an element is obvious. The reference needs to describe every publicly exported object, class, function, method, property, parameter, data type, and so on. If it is a web-based API, every resource, method, endpoint, request or response needs to be documented.
APIs make life easier for programmers
For instance, you want to develop an app for an iPhone. Apple’s iOS operating system provides a large number of APIs — as every other operating system does today — to make this easier on you.
If you want to embed a web browser to show one or more web pages, you will not need to program your own web browser from scratch just for your application. You can use the WKWebView API to embed a WebKit (Safari) browser object in your application.