1. What is an API?
API stands for Application Programming Interface. That sounds complicated — but the idea is simple.
An API is a way for two pieces of software to talk to each other. One piece of software asks for something ("give me today's weather in London"), and the other piece of software responds ("it's 18°C and cloudy").
You use APIs every day without knowing it. When your weather app shows today's forecast, it used a weather API. When you log into a website using Google, that's Google's API. When your food delivery app shows a map, that's the Google Maps API.
A helpful analogy: the restaurant
Imagine you're in a restaurant. You (the customer) want food from the kitchen, but you can't just walk in and cook it yourself. Instead, you tell the waiter what you want, the waiter goes to the kitchen, and comes back with your food.
The API is the waiter. You make a request, the API delivers it to the right place, and brings back the response — without you needing to know how the kitchen works.
The customer — makes a request for something it needs
The waiter — carries the request and brings back the response
The kitchen — processes the request and prepares the data
2. How does an API work?
Every API interaction follows the same pattern: your app sends a request, and the API sends back a response. This happens over the internet using HTTP — the same protocol your browser uses to load web pages.
The request is just a URL — like a web address — with some extra information about what you want. The response is usually data in a format called JSON (we'll cover that below).
api.openweathermap.org/data/2.5/weather?q=London.
The server responds with temperature, humidity, conditions — all as data your
app can display however it likes.
3. Anatomy of an API call
Let's take a real API request apart and see what each piece does. Here's a request to the OpenWeatherMap API for weather in London:
↑ Hover any part to learn what it does
The response — what comes back
The API responds with data in JSON format — a structured way of organising information. Here's what OpenWeatherMap sends back:
"name": "London",
"main": {
"temp": 18.4, // temperature in Celsius
"humidity": 72, // percentage
"feels_like": 17.1
},
"weather": [{
"description": "overcast clouds"
}],
"wind": { "speed": 5.2 }
}
Your app reads this data and displays it however it wants — a weather widget, a map marker, a push notification. The API just provides the raw information; you decide how to show it.
4. Key concepts you'll encounter
API Key
Most APIs require an API key — a unique code that identifies your application. You get one by signing up on the API provider's website. It usually looks like a long string of random letters and numbers.
Endpoint
An endpoint is a specific URL path that does a particular thing.
The same API can have many endpoints: /weather for current conditions,
/forecast for 5 days ahead, /air_pollution for air quality.
Each endpoint is a different "question" you can ask the API.
HTTP Methods
Every API request uses an HTTP method that describes what you're doing:
Rate Limits
APIs limit how many requests you can make in a given time period. A free plan might allow 100 requests per day or 10 per minute. If you exceed the limit, the API returns a 429 Too Many Requests error and you have to wait. Paid plans have higher limits.
JSON
JSON (JavaScript Object Notation) is the standard format
APIs use to send data back. It's text that's structured like a dictionary —
pairs of names and values, organised into objects {}
and lists []. Every programming language can read it.
Status Codes
Every API response includes a number that tells you if it worked:
5. What can I build with APIs?
Almost anything. Here are some examples by category:
Show forecasts, alerts, historical data for any location
Accept credit cards, manage subscriptions, issue refunds
Maps, directions, geocoding addresses, nearby places
Generate text, analyse images, translate languages, detect sentiment
Send emails, SMS, push notifications, make voice calls
Real-time stock prices, exchange rates, crypto prices
"Sign in with Google/GitHub" — let users log in without a password
Post to Twitter, read YouTube data, share to social platforms
6. Make your first API call
The easiest way to learn is to try one. Here's a completely free API that needs no sign-up or API key — the NOAA National Weather Service API.
Paste this URL into your browser right now (or use the tool below):
You'll see JSON data about the weather forecast point for London. The response includes a URL to get the actual forecast — follow it and you'll see a week of weather data.
Congratulations — you just used an API.
Ready to explore more APIs?
Browse our catalog of 2,500+ APIs with live testing, code snippets, and Postman guides.