What is an API?
If you've ever used a weather app, ordered food online, or logged in with your Google account, you've already used an API — without even knowing it. Let's break down what an API actually is, in plain and simple words.
API = A Messenger Between Two Apps
API stands for Application Programming Interface. Think of it as a waiter in a restaurant.
You (the customer) don't go into the kitchen yourself.
You tell the waiter what you want.
The waiter takes your order to the kitchen, gets the food, and brings it back to you.
In technology, the API is that "waiter" — it takes a request from one app, sends it to another system, and brings back the response.
A Real Example
Let's say you're using a weather app on your phone:
You open the app and search "Chennai weather."
The app sends a request to a weather API (like a request to the "kitchen").
The API fetches the latest weather data from a server.
The API sends that data back to your app.
You see the temperature and forecast on your screen.
You never see this happening — but it happens in seconds, every time you check the weather.
Why APIs Matter
APIs let different apps and services "talk" to each other without needing to know how the other one works internally. This is why:
Websites can show Google Maps without building their own map system
Apps can let you "Login with Google" without storing your Google password
Online stores can accept payments through Razorpay/PayPal without building their own payment system
A Simple Code Example
Here's what calling a real API looks like in JavaScript:
js
fetch("https://api.weather.com/chennai")
.then(response => response.json())
.then(data => console.log(data.temperature));
This code sends a request to a weather API and prints the temperature it gets back — just like the waiter bringing your food.
Conclusion
APIs are everywhere in the apps we use daily, working silently in the background. Once you understand that an API is simply a messenger connecting two systems, a lot of modern technology starts to make more sense.
Top comments (0)