How I understand the concept of API

Muhammad Ghazy
1 min readAug 13, 2023

--

Why did the JavaScript developer go to the doctor?

Because he had JSON!

Alright, enough of that bad jokes. But here’s the simple explanation.

image from blog.back4app.com

Imagine you’re at a restaurant. You, the customer, want to order a meal, but you don’t cook the meal yourself. Instead, you communicate your order to the kitchen using a menu and through a waiter.

In this analogy:

  • You are like the user or software wanting a specific service or data.
  • The menu is like the documentation of an API, which tells you what requests you can make.
  • The waiter is the API, the intermediary that takes your request to the kitchen (the system) and then brings back what you asked for.
  • The kitchen represents the system or database, doing the work behind the scenes and preparing the data or service you requested.

So, an API (Application Programming Interface) is essentially a set of rules and tools that allows different software applications to communicate with each other. Just like the waiter helps you get your meal without needing to know how to cook it, an API lets software developers access certain features or data from a service without needing to understand its entire codebase.

--

--