api

What is Web API ?

  • Profile picture of Mcs
  • by Mcs June 30, 2025

A Web API (Application Programming Interface) is a set of tools and rules that allows different software (like your JavaScript code) to communicate with web servers or browsers.

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.

Browser APIs

All browsers have a set of built-in Web APIs to support complex operations, and to help accessing data. For example, the Geolocation API can return the coordinates of where the browser is located.

Third Party APIs

Third party APIs are not built into your browser. To use these APIs, you will have to download the code from the Web.

Examples:
  1. YouTube API - Allows you to display videos on a web site. 
  2. Twitter API - Allows you to display Tweets on a web site.
  3. Facebook API - Allows you to display Facebook info on a web site.

Constraint Validation DOM Methods

validation

History Object Methods

api history

Related Pages for Web Storage API

storage api

A Fetch API Example

fetch(url)
 .then(response => response.json())
 .then(data => {
   // use the data here
 })
 .catch(error => {
   console.error("Error:", error);
 });

Web Geolocation API

geo

Comments

Add new comment

Restricted HTML

  • Allowed HTML tags: <br> <p> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <cite> <dl> <dt> <dd> <a hreflang href> <blockquote cite> <ul type> <ol type start> <strong> <em> <code> <li>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.