Which kind of API is the right one for your next project?
We use the term ‘web API’ to mean any kind of API exposed over the network, typically using HTTP. Not all APIs are the same, however. Each type of web API delivers different benefits to your business and your customers.
Let’s examine the five types of web APIs and how each one takes a different approach to successfully meet the needs of your API consumers.
Utility APIs are the simplest to consume, as they focus on taking in request parameters and delivering a result. Some examples include:
- USPS Postal Code and Postal Address Verification – send a postal code or postal address and verify it exists, while correcting any errors in the process
- OpenWeatherMap API – send a location and receive the current weather forecast
- Open Exchange Rates – obtain the foreign exchange rates
Utility APIs are meant to be quick and easy to consume. Some may require a free or paid subscription; however, developers see the API’s value quickly. Companies willing to open their API to public developers may choose to offer utility APIs, as they can be released much faster than more a more complex API.
Software-as-a-Service (SaaS) APIs allow customers to access their hosted data. Customers may choose to use the SaaS through the existing user interface, through the API, or a combination of both. While not all SaaS providers open their product with an API, those that do typically find that customer retention is increased as the API deeply integrates the customer with the provider. SaaS API examples include:
- Github – REST and GraphQL APIs allow developers to automate nearly every feature available from the web interface. Github also offers webhooks that can perform a callback into a customer’s own API to notify when new code is pushed, helping to automate the continuous delivery pipeline without needing to install Github locally.
- Freshbooks, Basecamp – Examples of SaaS providers that are typically used through the user interface, while allowing developers to access the data directly via the API. I have used these and similar APIs to automate many of my back office tasks.
- Stripe, Sendgrid – SaaS providers that target developers directly by offering APIs as a subscription product.
If you have a SaaS offering, you may be able to reduce customer churn by offering an API that helps your customers integrate your product into their daily workflow.
While SaaS products are designed to be consumed directly, platform APIs extend the reach of a SaaS provider by bringing together multiple parties. By reaching beyond the typical provider-consumer relationship found in SaaS, platforms often provide increased value through innovation and a greater overall network. Examples include:
- Salesforce Platform and Heroku PaaS – The Salesforce platform is one of the original Platform APIs, offering direct access to the many features available on the Salesforce and Force.com platforms. Heroku, owned by Salesforce, is a Platform-as-a-Service that enables developers to easily deploy their applications, as well as tap into a third-party add-on marketplace. Heroku’s marketplace has helped to grow several API products (in fact, Tyk’s launching a one-click integration with Heroku).
- API2Cart, Shopify – Automates the storefront and sales channel for ecommerce APIs through built-in and third-party solutions.
- Fitbit – Not only allows consumers to access their own data, but allows third-party solutions to build upon the data when shared by the consumer.
Generally speaking, platform APIs can be tricky to grow successfully given that they need to connect two or more markets together (e.g. developers and third-party tool providers in the case of Heroku). Use caution when building a platform API before you have all sides of the market at hand.
Unlike utility or SaaS APIs, partner APIs are restricted to a smaller set of development partners. By limiting an API to partners, companies can tightly control who and how an API is used. Often, these partner APIs require a more rigorous onboarding process than an API targeting public developers or customers. Some partner APIs offer sandboxes for experimenting with the API in limited form, prior to going into production with a more formal agreement. Some examples of partner APIs include:
- Sabre – Sabre, who powers many airlines, offers travel information and booking capabilities through their partner program
- Capital One – Since March 2016, Capital One has offered APIs that provide credit offers, savings accounts, bank grade two-factor authentication, and other capabilities. Developers can sign-up for a sandbox account to try out the APIs
Some partner APIs are only offered to existing partners and excluded from public viewing. Some organizations are interested in offering an API, but are hesitant to opening it up to public developers. In this case, partner API programs are the best opportunity for organizations to extend their digital assets while still maintaining tighter control of who uses them.
Hidden behind the firewall of many companies are private APIs that power day-to-day operations. These private APIs may range from APIs that power mobile apps, to internal APIs used by development staff. Private APIs can be divided into three categories:
- Capability APIs that deliver specific functionality to help the organization conduct business day-to-day. Examples include: managing inventory, booking hotel rooms, or account management.
- Infrastructure APIs ensure systems continue to function by automating tasks such as the code deployment pipeline, data center resource provisioning, and data gathering and alerting from sensors
- Integration APIs bridge the gap between existing systems (e.g. mobile-to-backend) and commercial of the shelf (COTS) solutions. These APIs may also act as an orchestration layer between internal systems and SaaS/platform providers
It is sometimes estimated that there are 10x more private APIs than public APIs. From my experience, it is considerably more as many organizations prefer to start with private APIs before opening them up to partners and public developers. If you are in enterprise IT, your company most likely has private APIs and quite possibly a formal API program to manage them.
What colour is your API parachute?
Each of the types of APIs available offer different strengths and weaknesses. Some simply solve a simple problem in a simple way. Others extend the reach of existing applications through automation. Still others offer the capabilities of organisations to internal and partner developers.
Before you launch your next API, consider how your API will be used and what kinds of problems it needs to solve. This will help you better address the needs of your API consumers.