{ }

How APIs Work

Discover how apps talk to servers — send real API requests and see live responses

1

What's an API?

Imagine you're at a restaurant. You don't walk into the kitchen and cook your own food — you tell the waiter what you want, and the waiter brings it back. An API works exactly the same way between apps and servers.

👤
You
(Client)
👓
Waiter
(API)
🍳
Kitchen
(Server)
GET /menu/burger
200 OK: Here's your burger!

Client (You)

The app or website making the request — your browser, a mobile app, or any program that needs data.

API (Waiter)

The messenger that takes your request to the server and brings back the response. It defines what you can ask for and how to ask.

Server (Kitchen)

The backend that does the work — stores data, runs logic, and prepares the response you asked for.

Fun Fact
API stands for Application Programming Interface. Every time you check the weather, scroll social media, or stream a video, dozens of API calls happen behind the scenes!
2

Anatomy of a Request

Every API request is just a URL with a specific structure. Click each part below to see what it does.

https:// api.example.com /api/v1 /gallery ?sort=popular&limit=10

👈 Click any colored segment above to learn what it does

Requests also have a method that tells the server what action to take. Click each one:

GET
Read
POST
Create
PUT
Update
DELETE
Remove

👈 Click a method badge above to see a real-world example

GET

"Give me data." Used for reading — loading a page, fetching a list, viewing a profile. Safe and repeatable.

POST

"Create something new." Submitting a form, uploading a file, saving a new project.

PUT

"Update this." Changing your username, editing a project, updating settings.

DELETE

"Remove this." Deleting a project, removing a comment, clearing data.

Fun Fact
These methods come from HTTP, the same protocol your browser uses. When you type a URL and press Enter, your browser sends a GET request!
3

JSON — The Language of APIs

When APIs send data back, they use JSON — a simple text format that's easy for both humans and computers to read. Click the brackets to collapse/expand, or search for a field.

Keys & Values

JSON is made of pairs: "name": "Pixel Art". The key is always a string, the value can be text, numbers, lists, or nested objects.

Nested Objects

Values can contain other objects using { } — like a folder inside a folder. This lets APIs return complex, structured data.

Arrays (Lists)

Square brackets [ ] hold ordered lists of items — like an array of projects, tags, or comments.

Fun Fact
JSON stands for JavaScript Object Notation, but don't let the name fool you — almost every programming language (Python, Java, Ruby, Go, C#) can read and write JSON. It's the universal language of the web!
4

Try It Live

Time for the real thing! Pick an endpoint below and send an actual API request to this platform's server. You'll see real data come back.

GET
Waiting...
Pick an endpoint and click "Send Request" to see real data from the API.

Real Data

These aren't fake examples — the response comes directly from this platform's API server, right now.

Public Endpoints

These endpoints don't need a login because the data is public. Your own projects would need authentication.

Pro Tip
You can call these same endpoints from any programming language — JavaScript, Python, even from the terminal with curl. The API doesn't care who's asking, as long as the request is valid!
5

Authentication — Proving Who You Are

Public data is free for anyone. But what about your projects? The server needs to know who's asking. That's where API keys come in. Try toggling the key below.

Endpoint: GET /api/v1/projects (your projects)
API Key: X-API-Key: (none)
Waiting...
Toggle the API key and click "Send" to see what happens with and without authentication.

API Key Header

X-API-Key: mtek_abc123...

Send your key in the request header. Best for scripts, server-to-server calls, and terminal requests.

Platform.api()

Platform.api('/gallery', { sort: 'popular' })

If you're building inside the platform, this helper handles auth automatically — no key needed in your code.

Fun Fact
API keys are like ID badges — they tell the server who you are and what you're allowed to do. Never share your key publicly! If someone gets it, they can make requests as you.

API Explorer!

You now understand how every app, website, and service communicates behind the scenes. APIs are the invisible glue of the internet!

0
Requests Sent
0
Live API Calls
0
Auth Attempts
0
Time Exploring

APIs are Middlemen

APIs sit between clients and servers, translating requests into responses — like a waiter in a restaurant.

HTTP Methods Matter

GET reads, POST creates, PUT updates, DELETE removes. The method tells the server what you want to do.

JSON is the Language

APIs speak JSON — structured key-value pairs that any programming language can read and write.

Auth Protects Data

API keys and tokens prove who you are, so the server knows what data you're allowed to access.

Ready to Create?

Put your new knowledge into practice!

Suggest a Correction