Sr. No. | API | Web Services |
---|---|---|
1. | API may or may not need network for its operations. | Web Services always need network for its operation. |
2. | API can be communicated through SOAP, REST, XML-RPC and CURL calls as well. API can also be exposed in number of ways like JAR, DLL, XML over HTTP, JSON over HTTP etc. |
Web service can be communicated through SOAP, REST, AND RPC. |
3. | API can perform all the operations which web service can't perform. | Web service can't perform all the operations like API. |
4. | All APIs are not web service. | All web services are API |