# REST API

> A web API where each thing has its own address, and HTTP methods act on it.

**Field:** Software Development  
**Category:** APIs  
**Also known as:** REST, RESTful API, Representational State Transfer

## Think of it like

Think of it like a library. Each book has its own shelf number.

## Definition

A REST API gives each thing, called a resource, its own web address. You act on them with the normal HTTP methods: GET to read, POST to create, PUT or PATCH to change and DELETE to remove. Each request carries everything the server needs, so the server keeps no memory between requests. Answers are usually JSON. REST was described by Roy Fielding in 2000 and is the most common style of web API.

## Example

Jack's REST API has /books and /books/7. GET /books/7 reads book 7, and DELETE /books/7 removes it.

## Example code

```http
GET /books/7 HTTP/1.1
Host: api.example.com
Accept: application/json
```

The address names the book; the method says what to do with it.

## Why it matters

Most public web APIs follow REST. Learn it once and you can use thousands of them.

## Common mistake

Putting verbs in addresses, like /getBook?id=7. In REST, the address names the thing and the method is the verb.

## Three principles

- **Things have addresses.** Called resources.
- **Methods are the verbs.** GET, POST, PUT, DELETE.
- **No memory between calls.** Each request stands alone.

## Related terms

- [Application Programming Interface (API)](https://learn.benibix.com/term/development/api)
- [GraphQL](https://learn.benibix.com/term/development/graphql)
- [HTTP Method](https://learn.benibix.com/term/infrastructure/http-method)
- [JavaScript Object Notation (JSON)](https://learn.benibix.com/term/development/json)
- [Create, Read, Update, Delete (CRUD)](https://learn.benibix.com/term/development/crud)
- [API Ingestion](https://learn.benibix.com/term/data/api-ingestion)
- [REST Resource](https://learn.benibix.com/term/development/rest-resource)

## Told apart from

- [REST vs GraphQL](https://learn.benibix.com/compare/rest-vs-graphql): A REST API gives every thing its own address and uses HTTP methods on it. GraphQL sends every query to one address and lets the client pick the exact fields. REST is simpler to cache; GraphQL saves trips on a slow phone.
- [REST API vs gRPC](https://learn.benibix.com/compare/rest-api-vs-grpc): People think gRPC is just a faster REST, and it is not. REST gives each thing an address and uses HTTP methods on it, with JSON most people can read. gRPC calls named functions and sends packed bytes. It is faster between services, but a browser cannot call it without help.

---

Source: https://learn.benibix.com/term/development/rest-api
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
