What is an API?

Intro series: these posts are intended for newcomers who don’t have a background in digital technology, to help understand common jargon. I’ll try to cut through the noise and get to the core ideas and build intuition rather than being precise.

An API is something tech-related. You may have heard from your more-software-oriented friends or colleagues about an API, but the conversation will quickly devolve into the technical morasses.

As the internet will tell you, the acronym API stands for “Application Programming Interface”, and it has something to do with communicating:

  • Wikipedia: “a way for two or more computer programs or components to communicate with each other”

  • Red Hat: “a set of definitions and protocols for building and integrating application software”

  • Gartner: “an interface that provides programmatic access to service functionality and data within an application or a database”

Clear as mud.

How about something a little more concrete? An API is a menu: it defines what you can order and how. 

If you show up to your local Taco Bell and ask for a Crunchwrap Supreme®, they’ll understand what you want, take your payment, and give you the food. You can make reasonable customizations, like adding beans, or removing the lettuce. This is the promise of the menu. 

But you can’t ask for a “comestible wrap product… grilled to resist unfolding” - even if that's what Taco Bell called it in 2007 when they tried to file the patent. You can’t ask for the fictional Grandito, even though you know all the ingredients are behind the counter. You need to speak the language of the menu.

The menu represents the Taco Bell ordering API: it defines what you can get, and how you should ask for it. Coming back to the Wikipedia definition: “a way for two or more computer programs or components to communicate with each other” - or in other words, “the Taco Bell menu”, which defines how you can ask the cashier for the food you want (and other details, like its price and customizability). 

And while a human restaurant employee might be smart and patient enough to try creating your off-menu vision, software is usually extremely inflexible: you’ll just get an error message back denying your creative genius.

So, an API is a menu - and that influences the way you design and use them.

Previous
Previous

The ideal API is not RESTful, gRPC, or GraphQL