"The W3C defines a Web service as a software system designed to support interoperable Machine to Machine interaction over a network. Web services are frequently just Web APIs that can be accessed over a network, such as the Internet, and executed on a remote system hosting the requested services."
Then what is API? API stands for Application Program InterfaceIt is a mechanism by which application programs interact with a "middleware" service.
Each API specification describes the abstract syntax and semantics of the service, including parameter definitions and usage rules. A middleware was used to "extends the platform with a framework comprising components, services, and tools for the development of distributed applications. It aims at the integration, the effective development, and the flexible extensibility of the business applications.”
Keywords: API, middleware, Web service