10 Reasons to Use APIs, by Rick Leinecker

Application programming interfaces (APIs) have been around almost as long as software development. But there has been an explosion in APIs that stand ready to provide your applications with rich and deep functionality. They serve as building blocks for full applications, and allow you to quickly create software that would have taken years in the past.

This article spotlights the reasons you should use APIs. Not every software engineer looks for an API because they are often more comfortable rolling their own. But in todayís API-rich environment, using ready-made APIs makes sense in many instances. Ten compelling reasons to use APIs are presented here, and can serve as a roadmap for your API application consumption.

Faster Time To Project Completion

At times developers face what seems like an impossible deadline. Suppose you are tasked with writing a web application which finds the perfect shrubbery for any location in the United States. Of course, your application will have to factor in rainfall, sunlight, average temperatures, soil compositions, and altitude. If you had to find the data, aggregate it, and provide an easy way to query and retrieve items, the task would be daunting and take time.

Google searches and resources such as ProgrammableWeb.com give you a way to find an API for almost every purpose, including one that has the information that your application needs. For instance, the Landscape Computing API has the matching functionality. In order to use an API, there are two main steps: reading the documentation and studying the examples. This gives you the key to using an API so that your application can consume it, and utilize the functionality. As a result of selecting the Landscape Computing API, you can show that Drasina plants thrive in South Florida, while Pink Muhly thrives in Arizona. APIs help get applications complete quickly.

For developers, the fact that APIs get you to project completion more quickly gives you an edge as an employee or contactor. For employers, the time saved is both money and competitive advantage in the market. It is a win-win for everyone.

Increased Robustness

Most APIs have been thoroughly tested and represent a level of robustness that is difficult to achieve through the normal testing cycles. Publicly available APIs for the most part provide functionality that generates few errors, and gracefully handles them when they arise. If you think about the testing that you must do for a normal software development process, it can require large amounts of resources. It includes regression testing, test reporting, test personnel, testing infrastructure, and time. These all add up to cost and time in order to insure code robustness.

Most APIs have been in use for years. In addition, if any defects slipped past the initial testing, they have probably been discovered and fixed along the way. This is one of the benefits of having a large number of users for an APIómany users provide a large-scale testing environment in which defects are quickly identified, and hopefully quickly fixed.

Using an API allows your application to inherit the robustness of the API. It saves you the cost and time of testing new code. In short, your application goes out of the gate with a much higher level of robustness than otherwise possible.

Application Standardization

In todayís software environment, it is common for an application to reside on several platforms. These include desktop for Windows and Macintosh, Android and iOS phones, Android and iOS tablets, and web applications. The goal for a family of application platforms is for them to adhere to a standard. This may not necessarily be a user interface (UI) standard since, for example, Windows and Macintosh have very different UIs and their users expect to experience indigenous UIs for each platform. APIs provide a functional consistency between platforms which can then be decorated with the appropriate UI.

In other words, APIs help to standardize the functionality of an application that spans multiple platforms. In this way, users can easily go from platform to platform. In addition, the application documentation is simplified since each version of the application operates in the same manner. This brings down costs and increases user satisfaction. Documentation creation and training is less expensive because the platforms follow a consistent paradigm. User satisfaction increases since users who go from platform to platform are more comfortable.

Using APIs gives software developers a great way to provide consistency with a small investment of time. That is because APIs are normally accessed the same way from various platforms, and return the consistent data.

Abstraction Layers

An abstraction layer is a way of hiding the implementation details of a process. This is a fundamental computer science principle. The reason that abstraction layers are important is because they allow developers to focus on business logic rather than the details of performing support tasks. APIs provide just such an abstraction layer since they hide implementation details. Instead of focusing on a lower-level task, software developers can develop higher-level application logic. This also means that there is an inherent level of separation that keeps the program module boundaries well-defined.

For example, if you are working on a program to automatically trade stocks, you might have to spend weeks or months collecting data, formatting it for use, and generating the appropriate data sets. Instead, you can select from one of hundreds of stock APIs that publish stock data, including price, history, and information. Using one of these APIs abstracts the data and its formatting so that your program can focus on how to automatically trade stocks based on the data that comes in from the API.

Using APIs helps to adhere to the abstraction principle that pervades computer science, APIs are a solid idea. They allow applications to abstract much of the data that APIs provide, and much of the functionality that APIs provide.

Legacy Projects

There are times when you inherit legacy projects that use at least one API. This can scare many developers, especially when they either donít typically use APIs, or if they are not familiar with what is being used in the legacy project. The one advantage is that the decision has already been made long ago which APIs to use. Now it is the job of the maintaining developer to learn the API by reading the documentation, studying examples, and studying its use in the current codebase. This can sometimes be more daunting than starting from scratch because the legacy code has to be unraveled.

There are benefits to inheriting applications that are already using APIs. First, someone else did the research to find the best match for the application outcome and an API. Second, the original developers designed how an API would best be used, and with any luck they did a commendable job.

The disadvantage is that the original developers may have chosen the wrong API and implemented it poorly. When this happens, your work is at least doubled. But it is manageable if you learn the API and study the legacy code. Unfortunately, in rare cases, you are better off selecting another better suited API and refactoring the application.

Advanced Communications

Many applications need to send out text/SMS messages. If you have ever explored doing this at a low level, you realize that each carrier has a slightly different way that their interface works. A generalized SMS API will save you months of work since it will already talk to the different carriers with the appropriate protocols while providing you with a single interface method. You can send SMS messages with one or two lines of code, regardless of the destination carrier.

Many communication APIs send out what are now more obscure communications such as faxes. While most applications donít need to send out faxes, it is very difficult to add this feature if you do need the functionality. For these cases, there are communication APIs that do send out faxes, and here again with very few lines of actual code.

There are even audio conferencing and video conferencing APIs that allow you to add audio and video conferencing to you application. Either of these are a valuable part of software types such as collaboration programs. And once again, this can be done with just several lines of code, usually adding significant value to your software.


A great number of web sites and mobile applications use advertising as a monetization vehicle. Most of the ads are managed by any one of hundreds of advertising APIs. The advertising APIs have gotten very sophisticated over the years, tracking user habits and trends. This allows the advertising APIs to specifically target users with chosen ads that match their dispositions. In this way, they advertising companies can charge more because they are providing targeted customers to the advertising companies. This also translates to higher revenue for the adverting web and mobile applications.

The advertising APIs are easy to use. In general, after signing up for an account, developers are provided with code stubs that interact with the API for a specific application. So there is really no code that developers need to write, a simple copy and paste is usually all that is necessary.

On the backend, the ad impressions and click-through are tracked so that you will get paid accordingly. There are APIs that you can access to build your own reporting application, or you can simply use the web-based applications that are provided.

Advertising for your web and mobile applications could not be easier with the advertising APIs. They are simple to use, and can return enormous profits.

Application Interoperability

Suppose you have an idea for the greatest game in the world. You determine, though, that it must be a multiplayer game in order to provide maximum returns. But the thought of getting a dedicated server, creating the socket code, debugging and benchmarking a system, and the going live are immensely daunting. This is where the multiplayer game APIs can provide a solution with which you can make your dream come true. There are a number of multiplayer game APIs, each of which has different functional and pricing models. It seems, though, that there is a solution for just about everyoneís needs.

Some of the multiplayer APIs are best for turn-based games such as hearts and spades. That is because their latency is slower than other APIs. But for turn-based games, it does not matter since an extra 200 milliseconds for a network transaction wonít be noticed by players.

For real-time interaction such as with first person shooter games, other APIs have fast response time. These tend to cost more than the slower APIs, but will still save cost over having to develop your own server infrastructure.

There are other types of application interoperability besides games that these APIs can be used for. But in any case, they will save you time and money, and should be seriously considered.

Financial Transactions

Many web sites and applications get to the point where financial transactions are necessary. This can be when the web site or application needs to charge a user for a service or some goods. Doing your own financial transactions is a recipe for disaster. When you develop your own system, you become responsible if anything goes wrong and records are hacked. It also is almost a full-time job to develop and maintain a financial transaction infrastructure.

The financial APIs that are available make the process manageable. They securely take order information, arbitrate the transaction, provide result feedback, and update your accounts. It is one-stop shopping for financial transactions without the headache and hassle. There is a fee that is taken in return for the service, but it is small in comparison to what it would cost to do it without the APIs.

The financial transaction APIs will take the headache out of eCommerce transactions. They are easy to use and highly recommended.

Location Services

Many applications of today make use of GPS and then mapping data. Examples of this are stores such as Starbucks or McDonalds who offer apps that let potential customers find the nearest store. Other uses might be apps for hikers or rock climbers where they need to find or stay close to a known trail.

The location services are a combination of a deviceís GPS system and a mapping API such as Google maps. Of course, there are hundreds of different map APIs, each of which offer different types of features and functions.

Adding location services to an app can increase its value to users. And when this is the case, using the location and mapping APIs is a slam dunk since they are so easy to implement.