What is an API?

An API (Application Programming Interface)is a set of rules and protocols allowing different software applications to communicate. Think of it as a universal translator that enables two systems to exchange information or functionality, even if they are built differently. APIs aren’t limited to the web and can exist in various forms, such as:

APIs can work within a single system or between different systems and operate with or without a network.

Use p5 as an example.

interface - js

application - canvas

What’s sth that web API brings about

What is a Web API?

A Web API (Web Application Programming Interface) is a specific type of API designed to enable communication and data exchange between different software systems over the Internet. It acts as an intermediary that allows applications to request data or services from a server and receive a response, typically using web protocols like HTTP/HTTPS.

Web APIs are essential for building modern web applications, as they allow different applications, platforms, or devices to interact seamlessly. They enable everything from fetching weather updates in a mobile app to integrating payment gateways on an e-commerce site.

Aspect API Web API
Network Dependency May not need a network to function. Always requires a network connection.
Scope Broad: any type of software interaction. Narrow: designed for web-based communication.
Protocol Usage Can use various protocols. Primarily uses HTTP/HTTPS.
Data Format Can use any data format. Often uses JSON or XML.
Implementation Can be local or remote. Always remote, via the internet.

Key Features of a Web API

  1. Internet Communication:

    Web APIs are designed specifically for internet or network communication, using protocols such as HTTP or HTTPS.