What Is a REST API?

The term shows up on almost every API page you'll ever read. Here's what it actually means — no computer science degree required.

1. What "REST" actually stands for

REST stands for Representational State Transfer — a name that explains almost nothing on first read. It was coined by Roy Fielding in his 2000 doctoral dissertation, as a description of the architecture the web itself already used successfully: resources identified by URLs, manipulated through a small, fixed set of HTTP methods.

In practice, "REST API" has come to mean something simpler than the formal definition: an API where you interact with named things (resources) at predictable URLs, using standard HTTP verbs, and get structured data back. That's the 95% version almost every public API you'll encounter actually implements — including nearly every one in our catalog.

You don't need the formal definition Fielding's dissertation lists six architectural constraints (client-server, stateless, cacheable, uniform interface, layered system, code-on-demand). Very few real-world APIs satisfy all six strictly. When people say "RESTful API" day-to-day, they mean "resource-oriented, uses HTTP verbs correctly, returns JSON" — that's the definition this guide uses.

2. Everything is a resource

A resource is any "thing" the API lets you work with — a user, an order, a photo, a weather station, a repository. Each resource type gets its own URL pattern, and each individual resource gets its own address within that pattern:

GET /repos — the collection: all repositories
GET /repos/42 — one specific repository
GET /repos/42/issues — a nested collection: that repo's issues

Notice the pattern: plural nouns for collections (/repos), an ID to pick one item out of the collection (/repos/42), and nesting to express relationships (/repos/42/issues — "the issues that belong to repo 42"). This is the single most consistent convention across REST APIs, and once you can read it, you can guess your way around an API you've never used before.

📦 Collection
A list of resources of the same type — /users, /products, /apis. Usually plural.
🔖 Individual resource
One specific item, addressed by ID — /users/17, /products/sku-4471.
🌳 Sub-resource
A collection scoped to a parent — /users/17/orders means "orders belonging to user 17."

3. HTTP verbs: what you can do to a resource

Where the URL says what you're operating on, the HTTP method says what you're doing to it. REST reuses the same small set of verbs for every resource type instead of inventing a new action name per endpoint — that's most of what makes REST predictable to learn.

VerbMeaningSafe?Idempotent?
GETRead a resource or collectionYesYes
POSTCreate a new resourceNoNo
PUTReplace a resource entirelyNoYes
PATCHUpdate part of a resourceNoNo
DELETERemove a resourceNoYes

"Safe" means the call doesn't change anything on the server — you could retry it, cache it, or have a search-engine crawler follow it, and nothing bad happens. "Idempotent" means calling it once has the same effect as calling it five times in a row: deleting resource 42 twice still just leaves it deleted. POST is neither — calling it twice typically creates two resources, which is exactly why browsers warn you before resubmitting a form.

Why this matters in practice If a network request times out and you don't know whether it reached the server, it's safe to retry a GET, PUT, or DELETE automatically. Retrying a POST blind can double-charge a customer or create a duplicate order — good API clients only auto-retry the idempotent verbs, or require an explicit idempotency key for POST (see our API key guide for a related concept: scoping what a credential is allowed to do).

4. Why REST is "stateless"

In a stateless API, the server keeps no memory of your previous requests. Every single request has to carry everything the server needs to understand it — your credentials, the resource you want, any filters — because the server treats each call as if it's the first one it's ever seen from you.

Compare it to a helpdesk that never keeps notes: every time you call, you have to re-explain your whole issue from scratch, including who you are. Annoying for humans — but for servers, it's a feature. A stateless server can hand your very next request to a completely different machine in a server farm, because that machine doesn't need to have "remembered" your last call. This is a big part of why REST APIs scale so well behind load balancers.

This is also why almost every authenticated REST request includes the same Authorization header or API key on every single call, rather than logging in once and being remembered — see our guide to API keys for how that credential actually travels with the request.

5. A real worked example

Let's trace an actual sequence of calls against a real, free, public REST API — GitHub's. No key required for public read-only data.

  1. List a user's repositories — a GET against a collection:
    GET https://api.github.com/users/octocat/repos
  2. The response is a JSON array — one object per repository:
    [ {
      "name": "Spoon-Knife",
      "full_name": "octocat/Spoon-Knife",
      "stargazers_count": 15234,
      "language": "HTML"
      },
    ]
  3. Drill into one repository by adding its identifier to the URL — the collection/individual-resource pattern from section 2:
    GET https://api.github.com/repos/octocat/Spoon-Knife
    This time the response is a single JSON object, not an array — one resource, not a collection of them.
  4. Go one level deeper into that repository's issues — a nested collection, exactly as described in section 2:
    GET https://api.github.com/repos/octocat/Spoon-Knife/issues

Notice that all four calls used GET — read-only, safe to retry, cacheable. Creating a new issue would be the exact same URL as step 4, but a POST instead, with the issue title/body sent as the request body rather than in the URL. Same resource, different verb, different meaning — that's the whole REST idea in one example.

This is exactly how our own apps are built We didn't just write about this pattern — every free tool linked from this site is this pattern, wired up to a real government or public API. Car Lookup decodes a VIN with one GET, then makes a second GET against a nested "recalls for this vehicle" collection — precisely the parent/child resource shape from section 2. Case Law Search paginates through CourtListener's opinions collection using the query-parameter convention from section 6. Game Deal Tracker calls two entirely separate REST APIs (CheapShark for deals, GamerPower for giveaways) and merges the results into one page. None of it required anything beyond what's on this page — and once the pattern and the build pipeline are set up, wiring in a new public API this way is a matter of minutes per app, not days. Most of the tools linked from this site went from "found an interesting API in our own catalog" to a live page in well under an hour.

6. Conventions you'll see everywhere

Pagination

Collections with thousands of items are never returned all at once. Most REST APIs accept ?page=2 or ?limit=50&offset=100 query parameters, and many return a Link header or a next field in the JSON body pointing you to the next page.

Filtering & sorting

Query parameters narrow a collection without changing the URL structure: /repos?language=JavaScript&sort=stars. This keeps the resource path stable (still "the repos collection") while letting you ask a more specific question of it.

Versioning

APIs change over time, and breaking every existing integration isn't an option — so most REST APIs version themselves, either in the URL (/v2/repos) or in a request header (Accept: application/vnd.github.v3+json). If a page in our catalog mentions a version number in its base URL, that's what it's for.

Errors are just resources with bad news

A well-designed REST API doesn't return 200 OK with an error message buried in the body — it uses the HTTP status code itself (404 for "that resource doesn't exist," 422 for "your data didn't validate") with a JSON body explaining why, so you can handle failures programmatically without parsing English text.

7. REST vs. GraphQL vs. SOAP

REST isn't the only way to build an API — it's just the most common one for public, free APIs, which is why it's the default assumption in this guide and across our catalog. Two alternatives worth knowing by name:

GraphQL
One single endpoint. You send a query describing exactly which fields you want, and get back exactly that — no more, no less. Trades REST's predictable URLs for precise, flexible responses. Common in larger platform APIs (GitHub offers both a REST and a GraphQL API, for instance).
SOAP
An older, XML-based protocol with a strict, machine-verifiable contract (WSDL). Heavier and more formal than REST — still common in banking, healthcare, and enterprise systems where that strictness is a feature, but rare in modern public APIs.

If an API page doesn't say otherwise, assume REST — it's overwhelmingly the default for the free and public APIs indexed on this site.

See REST in action

Every API in our catalog documents its base URL, auth type, and endpoints — browse for a real one to try against.

Browse all APIs Next: reading JSON responses

Continue learning