What is an API?
An application programming interface (API) is a source code based specification intended to be used as an interface by software components to communicate with each other.
An API can be:
- language-dependent, meaning it is only available by using the syntax and elements of a particular language, which makes the API more convenient to use.
- language-independent, written so that it can be called from several programming languages. This is a desirable feature for a service-oriented API that is not bound to a specific process or system and may be provided as remote procedure calls or web services. For example, a website that allows users to review local restaurants is able to layer their reviews over maps taken from Google Maps, because Google Maps has an API that facilitates this functionality. Google Maps’ API controls what information a third-party site can use and how they can use it.
The term API may be used to refer to a complete interface, a single function, or even a set of APIs provided by an organization. Thus, the scope of meaning is usually determined by the context of usage.
What are APIs Good For?
APIs facilitate communication allowing different applications to communicate effectively with each other. So these are really well suited for extending a platform and for mashups. We have already seen Twitter as an example of how APIs are useful in extending a platform. When you combine data or functionality from more than one application to create another application, you have essentially created a mashup.
Such mashups are extremely popular on the Internet these days. The Internet thrives on communication so it is an ideal place to take advantage of APIs. It is a common practice to expose part of your functionality or data as an API to others on the Web. They can then tap into what you offer, combine it with what they (or someone else) offers and then provide improved and added functionality to their users.