The essential difference between microservices and APIs

Alex Mosso
The Startup
Published in
3 min readJun 17, 2020

--

Out there there is a confusion about what is an API, or if it is the same thing as a microservice.

OK, but first, let’s define what an API is —in short terms it is an interface which defines interaction between applications, and it defines which functionality is exposed and how we can make a call.

Now I will ask a simple question — Do we need an API to define microservices interaction? The answer is — no, actually, you will get better results if you don’t use API for your microservices interaction strategy. For many, this concept might sound weird, but I put some references down below if you want to know more about this.

Most commonly, behind an API you will have an application, that’s the reason why we call it API (Application Programming Interface).

Now, if we expose a microservice through an API, is then a microservice an application too? even when if we were exposing a microservice through an API we cannot say it is the same thing. So, we could say that an application is a complete set of functions, while a microservice contains a unique well defined function (most of the cases). So in this article, I will use indistinctly the terms API and application.

When you try to make a conceptual definition of a microservice and an API, you will face the…

--

--

Alex Mosso
The Startup

I solve problems to empower operations, maximize performance and increase profits.