DEV Community

Cover image for What is an API? Explained in plain English
alanmynah
alanmynah

Posted on • Edited on • Originally published at alanmynah.com

What is an API? Explained in plain English

Photo by Kate Townsend on Unsplash

What exactly is an API?

Any aspiring developer, product(project) manager new to the software industry, eventually gets hit with the term API and when questioned about the exact meaning of this acronym, encounters a lot of hand-waving and generic statements. Add all sorts of metaphors about waiters, beers (possibly because it makes people think of IPA), and waiters bringing your unwilling teacher's favourite beverages.

API stands for - Application Programming Interface

Officially, API stands for - Application Programming Interface, but that doesn't clarify anything, does it? Otherwise, you wouldn't be reading this.

Start from UI

Let's start from some solid ground. When you go to any website, you see a collection of buttons, links, dropdowns, text fields, and date pickers. As a whole, it is a way for us, users, to interact with the system.

User Interfaces are for us, users, to interact with systems.

We say it's a User Interface. Netflix has one, when you go to watch a film on your laptop, you use a keyboard and a mouse to interact with the UI. On your TV, it's a clunky remote. And on your phone, you use your fingers to tap on the screen.

Some cars have stereos that get operated with knobs and buttons and more modern versions have touchscreens. All of these are User Interfaces.

UI is a gateway into API

APIs are ways for us, developers, to interact with programs.

Application Programming Interfaces, are for us, developers, to interact with systems.

Users interact with UIs that developers wrote by interacting with APIs that other (or same) developers created.

Developers write programs that expose some interactive points for others to use.

Why create API?

I can sense a question: "Why to create a program to interact with another program that does what I want? Why not have one?"

UIs only care about creating a pretty, intuitive, and safe environment for your users to access the services you provide.

APIs only care about providing access to these services in a secure, consistent, and reasonably fast manner.

Mixing the two is possible, but the industry found that separating concerns is a pretty good idea.

Summary

API is simply a catch-all term for interaction points exposed by one program for developers to use to create their own.

The reason for such monumental confusion is because the term 'API' is oftentimes used proverbially and sometimes as a replacement for words like 'system', 'services', 'backend', or your companies moniker, like 'the beast', 'monster', 'flake', etc.

Hope this clears things up and if you've still got some questions, feel free to get in touch!

Top comments (0)