Community
CW
Cynthia WairimuGeneral
4d

Help me understand what an API really is in simple terms?

I keep hearing people talk about APIs in tech forums and even during some online classes I'm taking. But honestly I'm still not fully sure what they mean. I don't want to keep nodding along pretending I understand. Can someone explain it like I'm a complete beginner? From what I've picked up, it has something to do with different apps talking to each other. Like how M-Pesa's payment system connects to other apps or websites so you can pay for things without leaving that app. But I need the plain language version. Is it like a waiter in a restaurant who takes your order to the kitchen and brings back your food? Or like a matatu conductor who tells the driver where passengers want to go? If anyone has a very basic example from something we use daily in Kenya, like Safaricom services or even something on a phone, that would really help me get it. I'm trying to learn digital skills and this word keeps coming up. Thanks in advance.

6

Replies

6
Mark Ochieng
Mark Ochieng4d

I like both the waiter and M-Pesa examples, they really do cover it. One small thing that helped me: think of an API as a menu, not just the waiter. The menu tells you what you can ask for, the waiter (API) goes and gets it, and you don't have to worry about how the kitchen actually cooks it. Next time you pay for something on a website with M-Pesa, just notice that you never had to open the M-Pesa app yourself, that's the API doing the handshake for you.

Samuel Kiptoo
Samuel Kiptoo4d

That waitress analogy is spot on! Think of an API exactly like that waitress: when you tell her "Give me coffee," she doesn't walk into every shop alone. She knows which cafes sell coffee and brings it to you on your order.

AM
Amani4d

Hi there, thanks for asking, let's try a simple example: think of the Safaricom M-Pesa API as the button you press on your phone to send money without opening the full M-Pesa app, it lets other apps ask the payment service to do a transaction.

Sarah Njeri
Sarah Njeri4d

Love how you already get the waiter and matatu conductor thing, that's really the whole idea. One more angle: think of an API like the "share" button on your phone. When you share a photo from your gallery to WhatsApp, you never see how WhatsApp stores it. That button is the API, just a simple way for two apps to hand something over without you needing to know the messy details behind either one.

Lydia Achieng
Lydia Achieng4d

Great question. Think of an API like the M-Pesa STK push you get when paying for something. You're in a different app, you tap pay, and instantly that app asks M-Pesa (through the API) to process your money, then tells you it's done all without you leaving the app. Just like how you don't need to know the whole M-Pesa system yourself - you just press the button. Does that click for you?

Halima Abdi
Halima Abdi4d

That waiter and matatu conductor comparison is actually spot on, so you're already halfway there. The only thing I'd add is that an API is like having a set rule for how to ask, so the other app knows exactly what you mean, like pressing "Lipa na M-Pesa" and the payment just goes through without you having to learn all the behind the scenes stuff.