What is an API?

An appli­ca­tion pro­gram­ming inter­face (API) is a source code based spec­i­fi­ca­tion intended to be used as an inter­face by soft­ware com­po­nents to com­mu­ni­cate with each other.

An API can be:

  • language-dependent, mean­ing it is only avail­able by using the syn­tax and ele­ments of a par­tic­u­lar lan­guage, which makes the API more con­ve­nient to use.
  • language-independent, writ­ten so that it can be called from sev­eral pro­gram­ming lan­guages. This is a desir­able fea­ture for a service-oriented API that is not bound to a spe­cific process or sys­tem and may be pro­vided as remote pro­ce­dure calls or web ser­vices. For exam­ple, a web­site that allows users to review local restau­rants is able to layer their reviews over maps taken from Google Maps, because Google Maps has an API that facil­i­tates this func­tion­al­ity. Google Maps’ API con­trols what infor­ma­tion a third-party site can use and how they can use it.

The term API may be used to refer to a com­plete inter­face, a sin­gle func­tion, or even a set of APIs pro­vided by an orga­ni­za­tion. Thus, the scope of mean­ing is usu­ally deter­mined by the con­text of usage.

What are APIs Good For?

APIs facil­i­tate com­mu­ni­ca­tion allow­ing dif­fer­ent appli­ca­tions to com­mu­ni­cate effec­tively with each other. So these are really well suited for extend­ing a plat­form and for mashups. We have already seen Twit­ter as an exam­ple of how APIs are use­ful in extend­ing a plat­form. When you com­bine data or func­tion­al­ity from more than one appli­ca­tion to cre­ate another appli­ca­tion, you have essen­tially cre­ated a mashup.

Such mashups are extremely pop­u­lar on the Inter­net these days. The Inter­net thrives on com­mu­ni­ca­tion so it is an ideal place to take advan­tage of APIs. It is a com­mon prac­tice to expose part of your func­tion­al­ity or data as an API to oth­ers on the Web. They can then tap into what you offer, com­bine it with what they (or some­one else) offers and then pro­vide improved and added func­tion­al­ity to their users.

Sources: