What is an API?

A plain-English guide for complete beginners — no coding experience needed.

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.

🧑‍💻
Your app

The customer — makes a request for something it needs

🤝
The API

The waiter — carries the request and brings back the response

🗄️
The server

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.

Your App Makes a request
API Routes the request
Server Processes & responds
Your App Gets the data

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).

Real example When a weather app asks "what's the weather in London?", it sends a request to 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:

https://api.openweathermap.org/data/2.5/weather?appid=YOUR_API_KEY&q=London&units=metric

↑ Hover any part to learn what it does

🔒 https://
The protocol. The "S" means secure — your data is encrypted between you and the server. Always look for https.
🌐 api.openweathermap.org
The host — the server's address on the internet. Like a phone number for the API.
📍 /data/2.5/weather
The endpoint — the specific resource you want. Different paths give different data (e.g. /forecast for a 5-day forecast).
🔑 appid=YOUR_KEY
Your API key — proves you're authorised to use the API. Keep it secret like a password.
🏙️ q=London
A query parameter — filters the data. Here it tells the API which city you want weather for.
🌡️ units=metric
Another parameter — controls the response format. "metric" means Celsius; "imperial" means Fahrenheit.

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.

Keep your API key secret. Treat it like a password. Don't paste it into public code, screenshots, or chat messages. If someone else uses your key, you'll be charged for their usage.

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:

GET Read
Retrieve data — like looking something up. Most API calls are GET. No side effects.
POST Create
Send new data — like submitting a form. Creates a new resource or triggers an action.
PATCH Update
Change part of existing data — like editing a field without replacing everything.
DELETE Remove
Delete data. Permanent — be careful.

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:

200 OK
It worked. The data is in the response body.
400 Bad Request
Something in your request is wrong — check your parameters.
401 Unauthorized
Missing or invalid API key. Add your key to the request.
429 Too Many
You've hit the rate limit. Wait and try again.
500 Server Error
Something went wrong on the API's side. Not your fault — try again later.

5. What can I build with APIs?

Almost anything. Here are some examples by category:

🌤
Weather apps

Show forecasts, alerts, historical data for any location

💳
Payment systems

Accept credit cards, manage subscriptions, issue refunds

📍
Location features

Maps, directions, geocoding addresses, nearby places

🤖
AI features

Generate text, analyse images, translate languages, detect sentiment

📧
Messaging

Send emails, SMS, push notifications, make voice calls

📈
Financial data

Real-time stock prices, exchange rates, crypto prices

🔐
Authentication

"Sign in with Google/GitHub" — let users log in without a password

📱
Social features

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):

https://api.weather.gov/points/51.5074,-0.1278

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.

Browse all APIs Free Weather APIs All Collections

Continue learning