A

API

A set of rules and protocols that allows different software applications to communicate with each other.

Also known as: Application Programming Interface, Web API, REST API
Technology

An Application Programming Interface (API) is a set of rules and protocols that allows different software applications to communicate with each other. APIs define the methods and data formats that programs can use to request and exchange information.

How APIs Work

APIs work on a request-response model. A client sends a request to an API endpoint, and the server processes the request and returns a response, typically in JSON or XML format.

Types of APIs

  • REST API – Uses HTTP methods (GET, POST, PUT, DELETE)
  • SOAP API – Uses XML-based messaging protocol
  • GraphQL – Query language for APIs developed by Facebook
  • WebSocket API – Enables real-time bidirectional communication

Example

When you use a weather app on your phone, it sends an API request to a weather service to retrieve the current forecast for your location.