Web API vs Microservices
We had already discussed about Microservices in last article. So, as topic describes, we will be looking into difference between Microservices and Web APIs.
What are Web APIs
An API is some kind of interface/application which has a set of functions that allow programmers to access specific features or data of an application, operating system or other services.
Web API as the name suggests, is an API over the web
which can be accessed using HTTP protocol. Please keep in mind that Web API is a concept
and not a technology.
What are Microservices
Microservices are small form of action ('Micro' means tiny/small and 'Services' means actions) which can get your work done. Microservice is an architectural style that structures an application as a collection of services that are:
Web APIs vs Microservices: Real life example
To make it easier for you to understand, lets take an example of any e-commerce site. You might be noticed while
you visited any ecommerce site like Amazon that there are several activities aka request for service like login, searching for product(s), adding/removing product(s)
to cart or wish list and so on.
If we think of application perspective:

Now let us look into Web API (REst full API),for the same service examples I considered to explain Microservices.

So, we can summarize the differences between WEB APIs and Microservices as: