Library vs APIA library is a chunk of code designed for reuse that is typically installed locally. A library is most often wrapped in an API that defines the functionality the library provides and how to use it.Technically speaking, the term API refers to an interface that doesn't need to have an implementation. However, when people speak of an API they are usually referring to a reusable library or service. Where a library is used as a package of code, a service is a running system that provides functionality to other systems and applications.
|Library vs API|
A reusable chunk of code.
A contract for reuse published by a library, service, framework, system or application.