1. Guides
  2. An introduction to APIs
  3. Introduction

Chapter 1: API introduction

By Bryan Cooksey • Updated January 19, 2024

APIs (application programming interfaces) are a big part of the web—a part that's only getting bigger. A 2021 F5 study projected that the number of active APIs would grow from under 200 million in 2018 to upwards of 1.7 billion by 2030. Meanwhile, the latest State of APIs report found that nearly 63% of developers relied on APIs more in 2022 than they had the previous year, and nearly 70% said they expected to rely on them even more in 2023. And on the executive side, over half the CEOs surveyed by Postman's most recent State of the API Report anticipated increasing their organizations' investments in APIs in the next year.

Table of contents

What is an API?

An API is a set of rules (interface) that two separate systems or programs—one on a publishing side and one on an accessing side—agree to follow. The company publishing the API then implements their side by writing a program and putting it on a server. In practice, lumping the interface in with the implementation is an easier way to think about it.


With so many companies investing in APIs to do things like share data with third-party apps, enable logins using third-party profiles, integrate payment processors, and support service access across multiple devices, possessing a working understanding of APIs becomes increasingly relevant to careers in the tech industry. Through this course, we hope to give you that knowledge by building up from the very basics. In this chapter, we start by looking at some fundamental concepts around APIs. We define what an API is and where it lives, and then give a high-level picture of how one is used.

Servers

When talking about APIs, a lot of the conversation focuses on abstract concepts. To anchor ourselves, let's start with something physical: the server. A server is nothing more than a big computer. It has all the same parts as the laptop or desktop you use for work; it's just faster and more powerful. Typically, servers don't have a monitor, keyboard, or mouse, which makes them look unapproachable. The reality is that IT folks connect to them remotely—think remote desktop-style—to work on them.


Servers are used for all sorts of things. Some store data; others send email. The kind people interact with the most are web servers. These are the servers that give you a webpage when you visit a website. To better understand how that works, here's a simple analogy:


In the same way that a program like Solitaire waits for you to click on a card to do something, a web server runs a program that waits for a person to ask it for a webpage.


There's really nothing magical or spectacular about it. A software developer writes a program, copies it to a server, and the server runs the program continuously. APIs provide an interface between these servers and the systems tasked with accessing the data in those servers.

How do APIs work?

APIs work by using predetermined rules and protocols to communicate user requests between two separate systems.


Websites are designed to cater to people's strengths. Humans have an incredible ability to take visual information, combine it with our experiences to derive meaning, and then act on that meaning. It's why you can look at a form on a website and know that the little box with the phrase "First Name" above it means you are supposed to type in the word you use to informally identify yourself.


Yet, what happens when you face a very time-intensive task, like copying the contact info for a thousand customers from one site to another? You would love to delegate this work to a computer so it can be done quickly and accurately. Unfortunately, the characteristics that make websites optimal for humans make them difficult for computers to use.


The solution is an API. An API is the tool that makes a website's data digestible for a computer. Through it, a computer can view and edit data, just like a person can by loading pages and submitting forms.

API solution

Making data easier to work with is good because it means people can write software to automate tedious and labor-intensive tasks. What might take a human hours to accomplish can take a computer seconds through an API.

How an API is used

When two systems (websites, desktops, smartphones) link up through an API, we say they are "integrated." In an integration, you have two sides, each with a special name. One side we have already talked about: the server. This is the side that actually provides the API. It helps to remember that the API is simply another program running on the server. It may be part of the same program that handles web traffic, or it can be a completely separate one. In either case, it is sitting, waiting for others to ask it for data.


The other side is the "client." This is a separate program that knows what data is available through the API and can manipulate it, typically at the request of a user. A great example is a smartphone app that syncs with a website. When you push the refresh button in your app, it talks to a server via an API and fetches the newest info.


The same principle applies to websites that are integrated. When one site pulls in data from the other, the site providing the data is acting as the server, and the site fetching the data is the client.

Chapter 1 recap

This chapter focused on providing some foundational terminology and a mental model of what an API is and how it is used.

The key terms we learned were:

  • Server: A powerful computer that runs an API
  • API: The "hidden" portion of a website that is meant for computer consumption
  • Client: A program that exchanges data with a server through an API

Next

In the next chapter, we dive into the mechanics of how a client talks with an API.


Published in April 2014; last updated January 19, 2024.

Next chapter:

Chapter 2: Protocols

Automation that moves your work forward

Try Zapier free for 14 days or contact Sales.

Sign up for free