The Increasing Importance of APIs in Web Development
Web APIs have experienced an exponential increase in popularity and usage in the past few years. These days, they're an important tool for web developers; however, they are also even becoming an effective marketing tool for many types of businesses. This article covers Web API statistics, their benefits, and a list of some of the most useful APIs currently available.
What is an API?
All of the Charts in this post are powered by the Google Charts API!
An API, or "Application Program Interface", is a set of routines and protocols that provide building blocks for computer programmers and web developers to build software applications. In the past, APIs were largely associated with computer operating systems and desktop applications. In recent years though, we have seen the emergence of Web APIs (Web Services).
Web API (Web Service)
Web APIs allow developers to build web pages and web based applications (known as "mashups") using data from multiple online sources. Although there are Web APIs available for many different types of industries, some of the most popular and widely used ones are in the categories of social networking, mapping, shopping and music.
Increase in Popularity and Usage of Web APIs
- In the Summer of 2005, ProgrammableWeb, one of the largest online API directories and resources, had only thirty-two APIs listed in their directory.
- On March 8th, 2011, they announced that they had reached a major milestone: the 3,000th Web API had been added.
- On October 3rd, 2011, ProgrammableWeb announced another major milestone, their API directory now listed 4,000 Web APIs. The news came only six months after they had reached the 3,000th milestone.
Popular Web APIs
Social media APIs have seen an incredible increase in usage in recent years.
Among the most popular Web APIs are those related to social media. Social media APIs have seen an incredible increase in usage in recent years, which can be directly linked to the rise of the companies Twitter and Facebook.
Google has also recently introduced its own Social Networking Platform Google+, and, in September 2011, they released the Google+ API. The API is currently read-only and only supports public data; however, this may change in the future.
Web API Protocols
Web API Data Formats
- Data can be read without a complex parser for most modern programming languages
- Parsers for JSON exist in nearly every programming language
- JSON parsers are fast, small and not complicated.
- JSON output is much smaller than XML because JSON does not include namespaces, attributes, etc like XML does
Many API providers offer both XML and JSON data formats. However, JSON has become so popular among web developers to the point that some providers offer the JSON data format exclusively.
A few examples of "JSON only" Web APIs include Twitter's Streaming API, the StackExchange API and Foursquare's APIv2. Foursquare states on their API page that one of the reasons the data is only available in JSON format is because "behind the scenes, it allows us to significantly improve performance."
Benefits of Web APIs
Although the target audience for for a web API is usually the web development community, they can also be beneficial to end users as well as the API providers themselves.
- Web Developers: Web APIs allow advanced functionality and features to be integrated into the websites that they create. There is also greater customization and flexibility with Web APIs than standard "copy and paste" widgets.
- End Users: A good Web API can help increase the usefulness of a website and make the site interactive and more enjoyable.
API Providers: A well built API that is widely used by the web development community can be a powerful marketing tool because it can:
- Help build brand loyalty
- Increase interest in the company's products and services
- Increase website traffic
- Provide useful tools to consumers
- Convey company messaging.
List of Useful Web APIs
There are thousands of Web APIs available, so this is not a comprehensive list. In addition, not all APIs are useful or practical for the average Web Developer.
At the time of this writing, all of the APIs in this list are free to use, provided that you follow the API's terms of service. Please note that some of the APIs available at Google, Yahoo!, etc are not free and have fees associated with their usage.
This is not a comprehensive list, but a list of Web APIs that could be useful to most web developers.
The Amazon Product Advertising API allows developers to access and display Amazon's catalog of products in web based applications and web pages. Also, developers can earn income through Amazon's Affiliate Program using the API.
At this time, Bing offers two APIs that can be used to add Bing Search and/or Bing Maps functionality to your website or application.
You can use the Envato Marketplace API to access and display Marketplace data including new files, popular files, item details and much more.
With Google Chart Tools (used to create the graphs in this post), you can create many different sorts of charts to display your data, including (but not limited to):
Google offers a group of Map related APIs that allow you to add maps functionality to your website. There are a variety of map functions and features that you can add to your web pages including:
- Embed a Google Map
- Embed a Google Static Map
- Add Geocoding Functionality
- Add Google Directions Functionality
- Embed Google Earth
- jQuery UI
This is the API for the Google+ Social Networking Platform. It allows you to add Google+ features to your website or application. Currently, this API is read-only, and can only access public data.
Google offers a wide range of tools and APIs that allow you to add advanced functionality to your websites. You can view the complete list here.
Note: APIs offered in Google Code Labs are experimental. Some of these APIs may remain in Google Code Labs permanently, may graduate and receive long term support by Google, or may even be shut down at some point in the future. If you are looking for APIs that Google intends to support for the long term, then it is best to choose APIs that have graduated from Google Code Labs.
The StackExchange API responses are currently only available in JSON format. You can use this API to display questions, answers, comments and more from any of the StackExchange websites.
Twitter provides an API for nearly every feature available on the official Twitter website. The Twitter API can be used to create applications, websites and widgets that interact with Twitter. You can also use the API to display your latest Twitter posts, public Twitter lists, and much more.
YouTube offers several APIs and tools to integrate YouTube functionality into your website including the Data API and Player APIs. The Player APIs are especially useful as they allow you to control the look and feel of YouTube videos displayed on your website.
The YUI Charts API allows you to add combinations of line, column, pie, bar and other types of charts to your web pages. The API uses SVG, HTML Canvas and VML to render the graphical elements of the charts.
API Testing Tools
Google has hundreds of APIs that you can experiment with in their Code Playground. The Apigee Console lets you test a number of different APIs including Twitter, Facebook, LinkedIn, Foursquare, Twilio and more.
Companies like Twitter, Facebook and Google have been fueling the rising popularity of Web APIs. These companies use web APIs to make their products and services more popular and create a loyal fan base. As more and more businesses and web developers discover the potential benefits of Web APIs, the popularity and usage of Web APIs will continue to skyrocket for the long term!
References / Citations
Live Charts Data
- Data collected on October 6th, 2011 from the ProgrammableWeb API Directory.
- 4024 Total APIs listed.