Web APIs are defined as being based on HTTP, the four main types of web APIs seen today are:
1. RESTful APIs - dating back to Roy Fielding's cortoral thesis back in 2000, representational state transfer is the most common type of web API, typically using JSON (JavaScript object notation) for the data. RESTful APIs are easy to consume by modern front-end frameworks (e.g., React and React Native) and facilitate web and mobile application development. They became the de-facto standard for any web API, including those used for B2B.
2. SOAP APIs - SOAP uses the verbose eXtended Markup Language (XML) for remote procedure calls (RPC). It can still be found in legacy APIs.
3. GraphQL APIs - the new, Facebook-developed, GraphQL standard provides database access over a single POST endpoint (typically /graphql). It solves a common RESTful API problem - that of requiring multiple calls to populate a single UI page - while introducing other additional problems.
4. gRPC APIs - a new, Google-developed, high-performance binary protocol over HTTP/2.0, that used mostly for east-west communication