API stands for Application Programming Interface. It is an interface that allows two applications to be connected so that they can communicate. APIs allow you to access an application without writing the code for it. Most APIs require internet access to retrieve data from a provider, such as the weather app on your smartphone. This does not calculate the weather data itself, but transmits it from weather data providers and only displays this data.
Web services have a similar function to APIs. They facilitate the exchange of information between two systems over the Internet, using XML coding. Since web applications are often developed in different programming languages, web services act as an intermediate language that is understood by most programming languages, thus enabling the exchange of information.
While a web service allows interaction between two machines in a network, the API serves as an interface for communication between two applications. All web services can be defined as APIs, but not all APIs as web services. A web service API can therefore be described as an application processing interface between a web server and a web browser. An example of this from the BIM- industry is a web service API with which you can access a dictionary database, such as the buildingSMART Data Dictionary (bSDD).