What is an API and what are they used for?

Published on 2021-08-01

There are many different type of APIs and they have numerous uses…but what are they and how are they used? Do I need to understand them? This, and more, is answered in our Dummies Guide to APIs.

APIs explained simply with examples

An API (Application Programming Interface) is a way to connect two computers or computer programs together, allowing information to be sent back and forth. AEvery time you use an application on your phone to browse social media like Facebook or Instagram, checking the weather, or getting an update on the latest stock prices, you’re probably using an API without realising it.

How are APIs used?

When using an application on your phone, or browsing a website, you’ll likely be connecting to an API. First, a request is sent from the application or website via the API. This request is then received, interpreted, and any necessary actions are performed on the API provider’s server. Then the data is sent back to the application or website. The application or website will then process that data and present it to you in a readable format.

You may be familiar with the process of booking flights or hotels online or via an app. What you might not be as familar with is the fact that behind the scenes you’re interacting with an API. This could be anything from getting a list of countries or cities, locating the nearest destination airport, available flights for your chosen travel dates, airline providers, your choice of cabin class, seat selection and even payment processing - usually happening within seconds via an API.

Why are APIs important?

APIs are important to many applications and websites; to be honest, many would be unable to function without them. There is an API from nearly everything you do online. Ordering online and processing payments, viewing maps and getting directions, connecting with friends on social media, instant messaging, streaming series on Netflix - the internet is interactive and APIs help facilitate this.

APIs even make it easier for developers to build complex sites and applications by providing additional value. Many companies these days package up their APIs as products-in-themselves, reducing the need to build comprehensive and often complex architectures which saves on time and effort so products can go straight to market.

Are APIs secure?

Most APIs are secure, only ever exposing the data necessary to process a request. If the API connects via HTTPS (Hypertext Transfer Protocol Secure) then the data will be encrypted ensuring that all data is kept private. However, not all APIs are the same, and some may not have the same protections as others. An API provider’s approach to security will depend on what kind of data is being transferred.

The API Economy

To many businesses, including major companies like Google, eBay, Amazon and Expedia, APIs have become so vaulable that they are now providing APIs to other companies, generating for them a new stream of revenue. For some of these companies it has now become a core source of revenue.

The use of APIs have grown exponentially, from a relatively unknown technology to the core of nearly everything we do online.