Glossary
REST API: resources, methods and status codes
A REST API is a web API designed around resources, each with a URL, which clients read and change using standard HTTP methods and status codes, usually exchanging JSON over HTTPS.
Where REST comes from
REST, short for representational state transfer, was described by Roy Fielding in his 2000 doctoral dissertation as the architectural style behind the web itself. Its constraints include a client and server split, stateless requests, cacheable responses and a uniform interface. In everyday use, "REST API" means something looser: an HTTP API that follows a set of resource oriented conventions.
The conventions in practice
Nouns in the URL, verbs in the method:
GET /v1/orders list orders
POST /v1/orders create an order
GET /v1/orders/8812 read one order
PATCH /v1/orders/8812 change some fields
DELETE /v1/orders/8812 remove it
- Status codes carry the outcome: 201 after creation, 404 for a missing resource, 422 for invalid input, 429 when rate limited (see HTTP status code).
- Statelessness: every request carries what the server needs, including credentials. No hidden server side conversation.
- JSON bodies with consistent field naming, plus pagination for lists.
- Versioning in the path or a header, so old clients keep working.
REST versus RPC style
Not every good API is RESTful. RPC style APIs name actions instead of resources: POST /createTask, POST /getTaskResult. GateSolver uses this style, and so do many APIs in the CAPTCHA solving space, because the operations map naturally to actions (create, check, read balance) rather than to resources you edit. In an RPC style API, the HTTP status is often 200 for any processed call, with the real outcome in the body, so clients read errorId and errorCode instead of relying on the status alone.
| REST style | RPC style | |
|---|---|---|
| URL names | Resources (/tasks/42) | Actions (/getTaskResult) |
| Methods | GET, POST, PUT, PATCH, DELETE | Mostly POST |
| Errors | HTTP status plus body | Mostly in the body |
| Caching | GET responses cacheable | Rarely cached |
Neither is better in general. Pick the client code for the style you are calling and do not assume REST habits apply everywhere.
Consuming REST APIs in scrapers
Many sites run an internal REST API for their own front end, and reading it is often the cleanest way to collect public data (see hidden API scraping). Those internal APIs may require the same proof as the page: a session cookie, a CSRF token, or a CAPTCHA token in a header. If a search endpoint expects a reCAPTCHA v3 token, solve it with the page's action name and attach it to that request; v3 tokens usually arrive under 3 seconds.
Pagination and filtering
List endpoints in REST APIs usually accept query parameters for page size, cursors, sorting and filters. Read the defaults: many APIs return a small page unless you ask for more, and some cap the page size. Following the next link or cursor the API gives you is safer than computing offsets yourself.
Good client habits
Set timeouts, retry only idempotent methods automatically, back off on 429 and 5xx, log request IDs the server returns, and pin the API version you tested against.
Common questions
What does REST stand for?
Representational state transfer, the architectural style Roy Fielding described in his 2000 dissertation.
Is the GateSolver API RESTful?
It is RPC style: endpoints are actions such as createTask, called with POST and JSON, with errors in the body.
Must a REST API use JSON?
No, the style does not require a format, but JSON is by far the most common choice today.
What does stateless mean for a REST API?
Each request carries everything the server needs, including credentials, with no reliance on earlier requests.
Which methods are safe to retry automatically?
GET, HEAD, PUT and DELETE are idempotent by definition; POST and PATCH need extra care.
Keep reading
- APIApplication programming interfaces in general: the contract that lets one program use another without knowing its insides.
- API endpointA specific URL and method an API answers on, plus how endpoints are grouped, versioned and described in documentation.
- HTTP status codeThe three digit codes servers answer with, and what 200, 301, 403, 429 and 503 usually mean for a scraper.
- JSONThe text format of objects, arrays, strings, numbers, booleans and null that almost every web API speaks, with the mistakes to avoid.