# REST API

> A REST API is a web API that follows the REST style, exposing data as resources at URLs and using standard HTTP methods such as GET, POST, PUT and DELETE to read and change them, usually exchanging data as JSON.

Also called: RESTful API, REST, HTTP API, JSON API. Category: Agents and automation. Source: https://aibuildindex.com/glossary/rest-api

## In the index

- API integration: median $2,500, middle half $500 to $7,680, 11,407 priced briefs (https://aibuildindex.com/skills/api-integration)
- FastAPI: median $3,500, middle half $500 to $11,540, 524 priced briefs (https://aibuildindex.com/skills/fastapi)
- Back-end development: median $3,000, middle half $560 to $9,600, 325 priced briefs (https://aibuildindex.com/skills/back-end-development)

A REST API is the most common shape a web API takes. Each kind of thing, such as customers, orders or invoices, lives at its own web address, and a client reads or changes it using the same small set of HTTP verbs every time. For a business buyer the term mostly signals familiarity: most cloud software exposes a REST API, most builders know how to work with one, and it is usually the expected way to put an AI feature behind your own product.

## How it works

REST, short for representational state transfer, organises an API around **resources**. A CRM might expose contacts at a path ending in contacts and a single contact at a path ending in that contact's ID. The **HTTP method** says what to do:

- **GET** reads a resource or a list.
- **POST** creates a new one.
- **PUT** or **PATCH** updates an existing one.
- **DELETE** removes it.

Responses carry **status codes**, such as success, not found, unauthorised or too many requests, which tell the caller what happened. REST APIs are designed to be stateless: each request carries everything needed, including credentials, so servers can handle requests independently. Long lists are returned in pages, and filters are passed as query parameters.

Builders also create REST APIs. A team wrapping an AI model as a service might build an endpoint that accepts a document, runs extraction and returns structured fields, using a framework such as FastAPI, so that other systems can call it like any other web service.

## What it means for cost

Working with REST APIs is routine, but a few things still move effort:

- **Documentation.** A clear specification, often in the OpenAPI format, lets builders generate client code and test quickly.
- **Pagination and limits.** Pulling large datasets means handling pages and [rate limits](https://aibuildindex.com/glossary/rate-limit) carefully.
- **Building your own.** Designing a REST API for others to use involves authentication, versioning, documentation and monitoring, which adds real scope.
- **Change management.** Versioning rules decide whether updates break existing integrations.

Ask a builder whether the systems in scope have documented REST APIs, and if you are commissioning a new API, how it will be secured, documented and versioned.

## Common questions

### What is the difference between REST and GraphQL?

With REST, each resource has its own endpoint and returns a fixed shape of data. With GraphQL, the client sends a single query describing exactly which fields it wants across related data. GraphQL can reduce round trips; REST is simpler and more widely supported.

### Is a REST API the same as a webhook?

No. With a REST API, your system makes requests when it wants something. A [webhook](https://aibuildindex.com/glossary/webhook) is the other system sending a request to you when something happens. They are often used together in one integration.

## Related terms

- [API](https://aibuildindex.com/glossary/api): An API, or application programming interface, is a defined way for one piece of software to request data or actions from another, such as fetching a customer record, sending a message or calling an AI model, without a person using a screen.
- [API integration](https://aibuildindex.com/glossary/api-integration): API integration is the work of connecting two or more software systems through their APIs so that data and actions flow between them automatically, for example syncing orders to accounting or sending CRM records to an AI model.
- [Webhook](https://aibuildindex.com/glossary/webhook): A webhook is an automatic message one system sends to another over the web when an event happens, such as a payment succeeding or a form being submitted, so the receiving system can react immediately without repeatedly checking for changes.
- [OAuth](https://aibuildindex.com/glossary/oauth): OAuth is an open standard that lets a user give an application limited access to their account on another service, such as reading their calendar or CRM, without sharing their password, by issuing scoped and revocable access tokens.
- [Rate limit](https://aibuildindex.com/glossary/rate-limit): A rate limit is a cap set by a service on how many requests, or how much data, an application can send in a given period, which AI and software providers use to share capacity and protect their systems.
