What are web browser APIs?
Web Browser APIs are functionalities provided by browsers to interact with the browser environment.
API stands for Application Programming Interface.
A Web API is an application programming interface for the Web.
A Browser API can extend the functionality of a web browser.
A Server API can extend the functionality of a web server.
To put it in simple terms, API is some kind of interface which has a set of functions that allow programmers to access specific features or data of an application, operating system or other services.
Web API as the name suggests, is an API over the web which can be accessed using HTTP protocol. It is a concept and not a technology. We can build Web API using different technologies such as Java, .NET etc. For example, Twitter's REST APIs provide programmatic access to read and write data using which we can integrate twitter's capabilities into our own application.
Examples include:
a. DOM manipulation (document.getElementById(), etc.)
b. Fetch API (fetch())
c. Timers (setTimeout(), setInterval())
d. Geolocation API
e. Web Storage API (localStorage, sessionStorage)