Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between API and web services?

As per my knowledge api and web services are used to fetch data from other websites.

So what's difference between them ?

Any Help!

EDIT

Can somebody please explain it with proper example ?

What is twitter and facebook api ? Can we say it's just a function or webservices to access their data.

like image 516
krunal shah Avatar asked Nov 19 '10 21:11

krunal shah


People also ask

What is difference between API and Web services give one example?

Web service is a collection of open source protocols and standards used for exchanging data between systems or applications whereas API is a software interface that allows two applications to interact with each other without any user involvement.

What is difference between REST API and web service?

The Core Differences APIs are application interfaces, meaning that one application is able to interact with another application in a standardized way. Web services are a type of API, which must be accessed through a network connection. REST APIs are a standardized architecture for building web APIs using HTTP methods.

Is REST API a Web service?

Overview. A REST API (also known as RESTful API) is an application programming interface (API or web API) that conforms to the constraints of REST architectural style and allows for interaction with RESTful web services. REST stands for representational state transfer and was created by computer scientist Roy Fielding.


2 Answers

A web service is just an API in HTTP clothing.

like image 182
Edwin Buck Avatar answered Sep 28 '22 11:09

Edwin Buck


A web service is something delivered over the Internet for direct use by another computer (rather than a human).

An API is an Application Programming Interface. A website application might expose an API thorugh a web service. However, desktop applications like Excel or Word have APIs which have nothing to do with the web (they have VBA and COM based APIs).

Simlarly, a server application (eg. Joomla) might have a PHP based API that is used from withinthe server - ie. no web service necessarily involved.

like image 28
winwaed Avatar answered Sep 28 '22 10:09

winwaed