An API, or Application Programming Interface, is a type of software interface that offers a way for two or more programs to communicate with one another. In contrast to a user interface (UI), which is the connector between a user and a person, an API provides a way for software programs to interact, exchange information, and perform actions on each other's behalf.
An API allows information to be transferred between two applications through a request and response cycle. One application requests information from another, and the receiving application responds with the requested data. This is achieved through an API call or inquiry to your server.
For example, when you use a social media app on your phone, it communicates with the social media company's servers through an API to retrieve data and perform actions like posting a message or sharing a photo.