What is an API?

An API is made for applications to interact with a program programmatically. In other words, an API interfaces with another program and the interaction is done with code. The API delivers the outputs to other programs so they can do their own operations with them.

What is an API?
🧠
I'm introducing a new series into the newsletter, inspired by the "explain like I'm five (ELI5)" phenomenon. One of my biggest strengths is explaining tech concepts to laypeople. Upon reading the internet alternatives, I wasn't impressed. So here I am! I would love your feedback.

API is the most interesting technical term for me because hearing it is the easiest way to spot developers at parties (okay, I admit, as a dadx4, I only attend children's birthday parties, but the point still stands). APIs are the most prevalent topic in the software world, whereas it's (rightfully) absent from everyday parlance.

What is this magic thing that obsesses technical folks? Why is it so important? Let's break it down so you can understand how it works and its economic relevance.

In this issue we'll discuss:

  • How Application Programming Interfaces (APIs) are made
  • How your favourite apps use APIs
  • The impact of APIs on the Web

Breaking Down the Acronym: Application Programming Interface

Let's start with the end: interface. An interface refers to how other entities can interact with a computer program. Programs can make millions of operations. Their interfaces represent how they require specific inputs and what type of output to expect.

The most well-known interface is the Graphical User Interface (GUI). These are the buttons, the boxes, the windows, and the menus you see in any app. In a calculator app, the user interface shows you numerical buttons. When you press a series of buttons, this is the input. The calculator then computes the operation ("2+2") and returns the answer (output) on the graphical user interface.

So what's the difference between a GUI and an API? As the GUI supposes, it's made for users (humans) who can interact with the program in a "graphical" manner (a click, a swipe, etc.) API, let's remember, stands for "application programming interface". This means that taking the definition at face value, an API is made for applications to interact with a program programmatically. In other words, an API interfaces with another program and the interaction is done with code.

Think of ChatGPT. Its graphical user interface couldn't be more simple: a textbox. What ChatGPT does, in a nutshell, is to "wrap" the OpenAI API.

The sequence goes like this:

  • The ChatGPT GUI "calls" the OpenAI API, which expects a very simple input: a text prompt.
  • Once the API validates the message, all the language generation happens in OpenAI's servers, which are located in Microsoft's data centers.
  • The Open AI internal servers return the generated text, which is posted back via the API.
  • Your browser executes the GUI code that shows the text to you.

In other words: an API can be seen as similar to any other app you use, except it has been stripped down from its usual visual style. This "stripped down" app delivers the outputs to other programs so they can do their own operations with them.

The OpenAI API only speaks with the ChatGPT GUI in the sequence. What's interesting, of course, is that anyone authorized can talk with the OpenAI API in the same manner, because of the miracle of the web API.


Every App You Use is a Collection of APIs

In reality, there is no such thing as "the" OpenAI API or "the" Twitter API. A functioning software requires hundreds of APIs to coordinate. This is also why you often hear "APIs" in combination with "microservices". It's exactly like legos.

There are also many categories of APIs. The most important one is the web API, which is usually what technical people discuss. A web API, as the name suggests, is an API that is exposed on the public internet.

Let's go back to ChatGPT. When another app claims to use ChatGPT, what they mean is their app uses the OpenAI APIs that underlie ChatGPT. ChatGPT, for better or for worse, is now the marketing name of choice.

In this scenario, the API takes a similar input (a prompt) and delivers the generated text in a structured format that needs to be filtered with code to be usable. The interaction with OpenAI's API is how you get:

  • web search results in a conversational manner from Bing
  • an email app that autocompletes your meeting minutes
  • a recipe generated based on ingredients you put in your shopping basket in Instacart.

Developers do not have to invest hundreds of millions of dollars to build and train artificial intelligence algorithms. All they need to do is to pay OpenAI ($0.002 for 750 words) for access to its GPT-turbo API and they can "bundle" the OpenAI output into their app.

The practice is so prevalent, we don't notice it anymore. Yet, web APIs have had a tremendous impact.


The API Economy is Changing the World

The next time you go to McDonald's website, visit the "find my restaurant" page. The map you see here is from Google Maps. Trivial, right? Under the hood, the McDonald's website has been using the Google Maps API to power its page and "inject" its restaurant location into Google Maps. This way, McDonald's does not have to build its own mapping system! And Google gets paid with user data, which is another story altogether.

Another example of web API's economic potential is how Amazon Prime uses the API of its subsidiary IMDb to show film ratings and actors' biographies. Here, what is interesting is that the IMDb API data is so intricate to Prime's functionality and business differentiation that one could talk about integration.

Integrations are at the core of the API economy. When an application "opens" its web APIs to the world, it can allow any developers to build on top of it. This is how you get all types of extensions, connectors, or outside apps. The savviest businesses will even turn themselves into an ecosystem where people can purchase third-party apps built on the APIs. The best example is an enterprise software company called Salesforce, which is used by sales, marketing and support people to manage customer relationships. Thousands of businesses created apps to improve Salesforce by using its APIs in a way Salesforce did not think of doing.

APIs, therefore, matter because they are essential to speed up development, create unique integrations, and build businesses, which is why it is so popular at parties.


🥊 Latest In Tech

Privacy and Cybersecurity

  • DNA Testing firm DDC suffers a major security breach. The biggest problem with genetic information is that once they are leaked, you cannot rotate them. What's upsetting is the meagre $400,000 fee the company got for failing to act for months after a service provider notified them of unusual network activity. Story

Business of Tech

  • "AI Whisperer" is the new buzzing job in the market... or is it? It was bound to happen. Some companies in San Fransisco hired their first "prompt engineers" who are adept at sending specific inputs to the AI in order to generate quicker iterations. My thoughts are that the AI apps will improve so quickly that prompt engineers will be blips on the radar. Meanwhile, tech-related unemployment is at a historic low of 1.5% with data analytics being the most sought-after skillset (cybersecurity is usually the first, I'm surprised).   Story
  • Mark Zuckerberg finally pivots Meta to AI. Meta announced its roadmap for AR/VR. AR glasses are still 2-5 years away and I'm not convinced people will want to wear them. Meanwhile, I'm more excited by Meta's plans to inject AI into its social media services. It could create an interesting "social companion" to organize your events and auto-generate reels for your trips. Analysts see Zuckerberg's focus on efficiency and AI as a way to bury the "metaverse" branding. Story
  • TikTok parent ByteDance developing a STEM learning tool for kids called GeniusJoy. Cue the propaganda jokes! I'm pessimistic about edtech. School teachers are generally technophobic, primary and secondary education is underfunded, and no tech caught up during the covid lockdowns when they were solely needed. Story

Artificial Intelligence

  • Bing will let you change its chatbot personality. Upon seeing Syndey take a life of its own, Microsoft chose to ride the wave. Bing will be able to get more creative with its answers. I guess we are still in the hype stage for AI-generated chat. But if we have a chatbot combining creative output and ads, people will not get value from it.  Story

❓ Question of the Week

Which technical concept would you like me the explain next?