5 API Styles Every Developer Should Know, and When to Reach for Each

REST isn't the only way systems talk to each other. Here are five API styles every developer should know, and when to reach for each.
1. REST
Resources and HTTP verbs (GET, POST, PUT, DELETE). Simple, stateless and cache-friendly.
Best for: public APIs and CRUD apps.
2. GraphQL
One endpoint. The client asks for exactly the fields it needs: no over-fetching, and no chain of five requests to build one screen.
Best for: complex frontends and mobile apps.
3. SOAP
Strict XML contracts (WSDL) with built-in standards for security and reliability.
Best for: banking, healthcare and enterprise integrations.
4. WebSocket
One connection that stays open. Client and server push data both ways, instantly.
Best for: chat, live notifications and multiplayer games.
5. RPC (gRPC, JSON-RPC, tRPC)
Call a function on another machine as if it were local. Actions, not resources.
Best for: fast service-to-service calls in microservices.
At a glance
| Style | Its shape | Reach for it when |
|---|---|---|
| REST | Resources and HTTP verbs | Anyone, anywhere, should be able to call and cache it |
| GraphQL | One endpoint, the client picks the fields | Many screens need different slices of the same data |
| SOAP | XML contract (WSDL) | A partner, bank or regulator requires the contract |
| WebSocket | One open, two-way connection | Updates have to arrive the moment they happen |
| RPC | Remote function calls | Your own services call each other constantly |
There's no "best" API style, only the right one for the job. Most real systems run two or three of them side by side: REST for the public API, WebSocket for live updates, gRPC between internal services.
Which ones are in your stack right now?
First shared on LinkedIn.