Google News
logo
Web Services - Interview Questions
Write the difference between API and Web services.
API (Application Programming Interface) : It acts as an interface between two devices so that they can communicate with each other without any user intervention. Some of its features include customizable, easy integration with GUI, time effective, language-independent, etc. All APIs are not web services.

Web Service : It facilitates interaction between two devices over a network. They are widely used for exchanging data among systems or applications. Some of its features include loosely coupled, supports document exchange, interoperability, extensibility, etc. All Web services are APIs.

 
API Web Service
It can be online or offline. It must use a network.
They are lightweight architecture. They require SOAP to send and receive network data therefore, are not lightweight architectures.
It can use any design style or protocol. It can only use SOAP but sometimes UDDI, XML, RPC, and REST also.
It supports HTTP/HTTPS protocol and also supports XML and JSON. It supports HTTP protocol and also supports XML.
It doesn’t require any network for its operation. It requires a network for its operation.
They are open source and are used for XML. They are not open source and are used to understand JSON (JavaScript Object Notation).
Advertisement