Application Programming Interfaces connect services on internet and allow network data … [+] communication.

getty

APIs are application programming interfaces. They are pieces of software that act as a bridge between one application and another application, piece of hardware or database of information, for example.

Until fairly recently, most people could comfortably ignore APIs and leave it as a subject for developers and tech enthusiasts. But APIs have been brought into the spotlight.

When Reddit and Twitter/X started to charge developers for use of their platform APIs, most third-party apps for those platforms disappeared overnight. Such apps rely entirely on these APIs and were suddenly made financially non-viable. APIs matter, and the software you use daily likely is hugely reliant on them.

If you want to understand how the app ecosystem works, you should learn a little more about APIs.

What are Application Programming Interfaces (APIs)?

APIs are one of the fundamental building block types of apps, be they on a phone, a computer or a website. They allow access to other apps, services, or sets of data, generally made by a completely different entity.

For example, let’s take a look at one of the more popular mobile weather apps, Weather 14 Days by Meteored. It takes its weather modelling from the European Centre for Medium-Range Weather Forecasts, and will use APIs to pull weather data in from that body, and onto its app interface. Similarly, any social media app will use APIs to pull in data that becomes your feed.

MORE FROMFORBES ADVISOR

Do you ever login to websites or apps using your Apple
AAPL
or Google account? That relies on APIs too.

The common factor is APIs provide app and software developers a certain degree of standardisation when dealing with, most notably, giant platforms and systems that don’t merely exist in isolation. APIs are a bulwark against chaos in software development.

The Significance of APIs in Modern Software Development

APIs were devised in the 1950s but grew into the form we think of them today in the early 2000s.

As discussed in a Forbes history of APIs article, APIs came into their own in that era as a way for nascent online retail giants to spread their tendrils outside of their own online spaces. Amazon
AMZN
and eBay were key proponents, as they continue to be today.

Amazon CEO Jeff Bezos reportedly mandated the use of APIs across development teams back in 2002. It changed the way the company made its software and services, with the aim of forcing developers to “expose their data and functionality through service interfaces,” as API Integration Architect Matthias Biehl wrote in a Medium post. History so far has proved this a smart strategy.

Amazon.com CEO Jeff Bezos in a warehouse.

getty

APIs took on an almost whole new meaning in 2007 and 2008 with the arrival of the iPhone and Android smartphones. Apps for these platforms lean on APIs for a dazzling array of interactions, and not just across software. If an app wants to use the camera or turn on the phone flashlight, that’s an API. Need to enable an in-app purchase? That requires an API too.

Apple has more than 250,000 APIs in its software development kit. These are the reason a certain degree of consistency between iPhone apps in terms of interface and user experience is possible.

It also allows for websites and apps to effectively become relatively quick-to-make frameworks whose content is automatically populated. Those who grew up in the earlier years of the popularization of the internet may have dim memories of making websites written in pure HTML whose content had to be updated purely manually. APIs, among other factors, left that squarely in the past.

Types of APIs

There are four key API categories to know about: private, partner, public and composite. These categories determine how the APIs are used, not what they actually do. Public APIs, which are also called Open APIs, are released to developers freely for them to use. These are employed when whatever the API grants access to is intended to be spread far and wide, without cost to the developer using that API.

Partner APIs are used where the entity releasing that API retains more control over their access, often charging a fee for the privilege. These APIs have become newsworthy recently, as Twitter/X and Reddit started demanding fees for their use, leading to most third-party apps for those social networks shutting down.

Such Partner APIs were common before this, though. For example, travel specialists like TripAdvisor and Skyscanner (and many others) maintain APIs that collate data such as flight database for all the key commercial airlines, but they are only available to approved partners.

Photo illustration of a Skyscanner logo seen displayed on a smartphone.

SOPA Images/LightRocket via Getty Images

Next up we have Private APIs, where the intended user of the API is typically the same company, team or entity. Such APIs may be used to connect the front-end of a company’s software interface with the backend that does all of the real work.

Composite API” is a category that runs along these others, as it packages up several API actions or requests into a single API call, making it more efficient for tasks where a whole bunch of the same actions are typically required.

Stepping back a little, there are also two key broad categories that define how APIs are made, REST and SOAP. SOAP stands for Simple Object Access Protocol, and is a fairly rigid style of API design that uses XML. REST stands for Representational State Transfer, is more open in how it is coded, and is the more common type of API. You’ll often see them described as RESTful APIs too.

Amazon’s AWS advises “REST is a better choice when you build public APIs” but concludes “SOAP may be better suited for high data integrity requirements.” These are not hard and fast conclusions, though, and the best route will depend on the project and your particular experience with coding.

These aren’t the only two types of API coding either. GraphQL is another example. It allows for greater specificity in the data it retrieves, in turn reducing the number of trips to the server required. However, it is typically less performant than REST and comes with a steep learning curve for the developer.

API Best Practices

You can find countless resources for API tips online. Some are laid out like the 10 commandments. Elsewhere you’ll find developers talking about the worst APIs they have ever encountered, and what aspects you should never replicate in your own. Here are some of those pieces of collected wisdom.

Use proper error codes so that if something goes wrong, there’s some guide as to what may be to blame.
Use API Versioning, which is where changes to the API are properly documented, to make troubleshooting easier and to clearly signal changes to that API’s users.
Provide sample responses in your API documentation so the user has a solid idea if it is behaving as expected or not.
Use consistent naming conventions. And when naming resources, keep those names intuitive where possible.

Further advice rests on the type of API being made. However, you may glean some more useful information from the official advice from Microsoft
MSFT
, Amazon and Stack Overflow.

Bottom Line

APIs are what makes stuff happen in modern software. They are like the controls in a car, and they keep apps together like the tendons and ligaments in your body.

They provide the definitions and limitations of what an app or other piece of software does, and can do.

Take that vague wording as proof of quite how wide their use is, as every time you pull out your phone or open up a web page, you’ll be interfacing with APIs.