What's the difference between a Web Application and an API?

A web application is just that - a full application like an installed program, but it's hosted on the web.

An API is an Application Programming Interface, meaning particular services / functions are exposed and usable in another application. An API is used while programming to hook into another application, and can be something like a packaged library (DLL) or a web service (like a REST service).

API's are important to keep in mind while developing an application (particularly in business environments) in case systems need to "talk" to each other. It provides an easy way / abstracted layer so that the systems aren't tightly coupled to each other.
 
Think of it like this:
https://www.whatismyip.com/
that page is like an application, you can go to it, and as a human you can see the IP address. but if you were a machine it takes some effort to separate that from the page.

the application that runs there has got your IP address and presented it to you on a screen.

(this could be anything really).

same site, but API:

http://ipv4bot.whatismyipaddress.com/

see, quick efficient machine communication. not additional processing required, but exactly the information that a computer needs.

the application interface makes it pretty for people, the API interface makes things efficient for machines.
 
Back
Top Bottom