What Are APIs?
Jan 8, 2023 · 3 min read
API stands for "Application Programming Interface" and is one of the most important pieces of a software service.
"51% of [developers] say that more than half of their organization’s development effort is spent on APIs." - State of the API Report
What is an API?
An API stands for "Application Programming Interface" ... I have always hated hearing that because it never helped me understand what an API is. Let's talk about what an API really is.
An API does two things: It (1) combines code + data and (2) exposes it through a programmable interface. For example, think of a TV remote. If you push a set of buttons on that remote you can open up a channel or app, like Netflix, on your TV. The remote is an interface between you and the TV that is programmable, meaning you can press different buttons on the remote (e.g., program it) to input your desire and it will return your desired response on the TV. That is what an API is — An intermediary between two entities, like you and the TV.
There are three kinds of APIs — Web-based, operating system, and library-based.
Web-based APIs: These are APIs that are accessible over the internet using the HTTP protocol. They are the most common type of APIs and are used to access web-based services such as social media platforms, weather services, and online databases. An example of a web-based API it the Twitter API, which allows developers to access Twitter's data and functionality.
Operating System APIs: These are APIs that are specific to an operating system, such as Windows, Linux, iOS, etc. These APIs allow developers to access the functionality and features of the operating system, like file management, networking, and user interfaces.
Library-based APIs: These are APIs that are based on a specific programming library or framework. They provide a set of functions or classes that can be used by a developer to access specific functionality. Examples of library-based APIs include the Python NumPy library, which provides mathematical and numerical functions, and the TensorFlow API, which allows developers to build machine learning models.
In summary, web-based APIs are accessible over the internet, operating system APIs are specific to an operating system, and library-based APIs are based on a specific programming library or framework.
The following interactive and fun comic strip from Postman is one of the best introductions to APIs that I have ever read. Take a look!
If you found any of my content helpful, please consider donating
using one of the following options — Anything is appreciated!