Jump to: navigation, search

A web API is an application programming interface (API) for either a web server or a web browser. It is a web development concept, usually limited to a web application's client-side (including any web frameworks being used), and thus usually does not include web server or browser implementation details such as SAPIs or web browser engine APIs unless publicly accessible by a remote web application.

APIs available on both the client side and the server side makes Web programming easier allowing programmers to build web application on top of a high-level interface.

Server side

A server-side web API is a programmatic interface consisting of one or more publicly exposed endpoints to a defined request–response message system, typically expressed in JSON or XML, which is exposed via the web—most commonly by means of an HTTP-based web server. Mashups are web applications which combine the use of multiple server-side web APIs.[1][2][3] Webhooks are server-side web APIs that take as input an Uniform Resource Identifier (URI) that is designed to be used like a remote named pipe or a type of callback such that the server acts as a client to dereference the provided URI and trigger an event on another server which handles this event thus providing a type of peer-to-peer IPC. There are some PHP microframeworks such as Lumen to build a REST API.


Endpoints are important aspects of interacting with server-side web APIs, as they specify where resources lie that can be accessed by third party software. Usually the access is via a URI to which HTTP requests are posed, and from which the response is thus expected.

Endpoints need to be static, otherwise the correct functioning of software that interacts with it cannot be guaranteed. If the location of a resource changes (and with it the endpoint) then previously written software will break, as the required resource can no longer be found at the same place. As API providers still want to update their web APIs, many have introduced a versioning system in the URI that points to an endpoint, for example the Clarifai API: The endpoint for the tagging functionality within the web API has the following URI: "https://api.clarifai.com/v1/tag/". The "/v1/" part of the URI specifies access to the first version of the web API. If clarifai decides to update to version two, they can do this while still maintaining support for third party software that uses the first version.[4]

Resource vs. service

Although "web API" is sometimes considered a synonym for web service, many Web 2.0 web applications have moved away from SOAP-based web services towards collections of RESTful web resources.[5] These RESTful web APIs are accessible via standard HTTP methods by a variety of HTTP clients including browsers and mobile devices. They have advantages over web services in that they tend to be less resource intensive (and thus usually run faster) if they use JSON as message exchange format because in that case they do not need to perform XML-to-programming language data conversions as required by a SOAP-based service APIs.[6][7]

Signs of these industry changes can be seen by:[7]

  • Yahoo provides REST for all their services
  • Amazon and eBay provide both REST and SOAP
  • Google used to only provide SOAP, but deprecated these resources, in favour of REST in 2006

This move from web services to web APIs is analogous to the Semantic Web movement towards the Resource Description Framework.[8]


Server-side web APIs are interfaces for the outside world to interact with the business logic. For many companies this internal business logic and the intellectual property associated with it are what distinguishes them from other companies, and potentially what gives them a competitive edge. They do not want this information to be exposed. However, in order to provide a web API of high quality, there needs to be a sufficient level of documentation. One API provider that not only provides documentation, but also links to it in its error messages is Twilio.[9]

However, there are now directories of popular documented server-side web APIs.[10]

Growth and impact

The number of available web APIs has grown consistently over the past years, as businesses realize the growth opportunities associated with running an open platform, that any developer can interact with. ProgrammableWeb tracks 9000 Web APIs that were available in 2013, up from 105 in 2005.[11]

Web APIs have become ubiquitous. There are few major software applications/services that do not offer some form of web API. One of the most common forms of interacting with these web APIs is via embedding external resources, such as tweets, Facebook comments, YouTube videos, vines, etc. In fact there are very successful companies, such as Disqus, whose main service is to provide embedable tools, such as a feature-rich comment system.[12] Any website of the TOP 100 Alexa Internet ranked websites uses APIs and/or provides its own APIs, which is a very distinct indicator for the prodigious scale and impact of web APIs as a whole.[13]

As the number of available web APIs has grown, open source tools have been developed to provide more sophisticated search and discovery. APIs.json provides a machine-readable description of an API and its operations, and the related project APIs.io offers a searchable public listing of APIs based on the APIs.json metadata format.[14][15]



There are a lot of companies and organizations, which heavily rely on their API infrastructure to serve their core business clients. In 2014 Netflix received around 5 billion API requests, most of them within their private API.[16]


Many governments collect a lot of data, and some governments are now opening up access to this data. The interfaces through which this data is typically made accessible are web APIs. Web APIs allow for data, such as "budget, public works, crime, legal, and other agency data"[17] to be accessed by any developer in a convenient manner.

The United States are one of the pioneers in opening up government data for anybody and everybody to use. On its website, data.gov, the following is stated: "Since his first full day in office, President Obama has prioritized making government more open and accountable and has taken substantial steps to increase citizen participation, collaboration, and transparency in government. Data.gov, the central site for U.S. Government data, is an important part of the Administration’s overall effort to open government."[18]

Client side

A client-side web API is a programmatic interface to extend functionality within a web browser or other HTTP client. Originally these were most commonly in the form of native plug-in browser extensions however most newer ones target standardized JavaScript bindings.

The Mozilla Foundation created their WebAPI specification which is designed to help replace native mobile applications with HTML5 applications.[19][20]

Google created their Native Client architecture which is designed to help replace insecure native plug-ins with secure native sandboxed extensions and applications. They have also made this portable by employing a modified LLVM AOT compiler.

See also


  1. ^ "What is mash-up? - Definition from WhatIs.com". WhatIs.com. Retrieved 2015-11-04. 
  2. ^ "Mashup Dashboard". ProgrammableWeb.com. 2009. 
  3. ^ "An Online Platform for Web APIs and Service Mashups". IEEE Internet Computing. 12 (5). Sep–Oct 2008. doi:10.1109/MIC.2008.92. 
  4. ^ "Clarifai API: Large Scale Visual Recognition". developer.clarifai.com. Retrieved 2015-11-04. 
  5. ^ Benslimane, D.; Dustdar, S.; Sheth, A. (2008). "Services Mashups: The New Generation of Web Applications". IEEE Internet Computing. 10 (5): 13–15. doi:10.1109/MIC.2008.110. 
  6. ^ "Difference between Web API and Web Service?". programmers.stackexchange.com. Retrieved 2015-11-03. 
  7. ^ a b "REST vs SOAP, the difference between soap and rest : spf13.com". spf13 is Steve Francia. 2010-01-15. Retrieved 2015-11-02. 
  8. ^ "Open APIs and the Semantic Web 2011". 2011-06-07. 
  9. ^ Mulloy, Brian. Web API Design - Crafting Interfaces that Developers Love (PDF). apigee. p. 11. 
  10. ^ "API Directory". ProgrammableWeb. Retrieved 2015-11-03. 
  11. ^ "9,000 APIs: Mobile Gets Serious". ProgrammableWeb. Retrieved 2015-11-03. 
  12. ^ "Disqus – The Web's Community of Communities". Disqus. Retrieved 2015-11-04. 
  13. ^ "Alexa Top 500 Global Sites". www.alexa.com. Retrieved 2015-11-04. 
  14. ^ "APIs.json". apisjson.org. Retrieved 2016-03-14. 
  15. ^ "APIs.io - the API search engine". apis.io. Retrieved 2016-03-14. So make it clearly understandable & share your knowledge.
  16. ^ "Top 10 Lessons Learned from the Netflix API - OSCON 2014, Slide 73". 2014-07-24. 
  17. ^ "Tech Trends 2015, API economy". Deloitte University Press. Retrieved 2015-11-03. 
  18. ^ "Open Government - Data.gov". Data.gov. Retrieved 2015-11-03. 
  19. ^ WebMonkey News
  20. ^ Mozilla WebAPI Wiki

Further reading