Overview

API Types

API Types is a classification of web API architectural styles and protocols widely used in modern software development, including REST, GraphQL, SOAP, gRPC, and WebSocket. Each type corresponds to different communication patterns, data formats, and use cases, forming the foundation for data exchange between systems. The choice of appropriate API type significantly impacts system performance, scalability, and development efficiency.

API REST GraphQL SOAP gRPC WebSocket Web Services Communication Protocol
code slug name description caching communicationPattern dataFormat fullName protocol state useCases
01 rest REST A resource-oriented architectural style using the HTTP protocol. Excellent (HTTP-level) Request-Response ["JSON","XML","YAML","Plain Text"] Representational State Transfer HTTP/1.1, HTTP/2 Stateless ["Web applications","Mobile apps","Microservices","Public APIs"]
02 graphql GraphQL An API that enables flexible data fetching through client-driven query language. Complex (requires custom implementation) Query-Response ["JSON"] Graph Query Language HTTP/1.1, HTTP/2 Stateless ["Mobile apps","SPAs","Complex data relationships","API aggregation"]
03 soap SOAP An XML-based messaging protocol API characterized by strict standardization. No built-in caching Request-Response, One-way ["XML"] Simple Object Access Protocol HTTP, HTTPS, SMTP, TCP Stateful or Stateless ["Financial services","Healthcare systems","Enterprise integration","Legacy systems"]
04 grpc gRPC A high-performance RPC framework developed by Google using Protocol Buffers. No built-in HTTP caching Unary, Server Streaming, Client Streaming, Bidirectional Streaming ["Protocol Buffers (binary)"] Google Remote Procedure Call HTTP/2 Connection-based ["Microservices","Internal service-to-service communication","Real-time systems","IoT"]
05 websocket WebSocket A protocol enabling full-duplex communication, suitable for real-time data exchange. Requires custom logic Full-duplex, Event-driven ["JSON","Binary","Text"] WebSocket Protocol WS, WSS (WebSocket over TLS) Stateful (persistent connection) ["Chat applications","Live dashboards","Online games","Collaborative editing tools"]
06 webhook Webhook An event-driven HTTP callback mechanism that enables push notifications from server to client. Not applicable Event-driven, Push ["JSON","XML","Form Data"] Web Callback HTTP, HTTPS Stateless ["Payment notifications","CI/CD integration","Notification systems","System integration"]

Classification of major web API architectural styles and protocols.