What is an API?

ยท

2 min read

API stands for ๐—”๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป ๐—ฃ๐—ฟ๐—ผ๐—ด๐—ฟ๐—ฎ๐—บ๐—บ๐—ถ๐—ป๐—ด ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐—ณ๐—ฎ๐—ฐ๐—ฒ.

An API (Application Programming Interface) is a set of functions that allows applications to access data and interact with external software components, operating systems, or microservices.

To simplify, an API delivers a user response to a system and sends the systemโ€™s response back to a user. You click "add to cart," an API tells the site you added a product to your cart; the website puts the product in your cart, and your cart is updated.

The API is not the database or even the server, it is the code that governs the access point(s) for the server.

Each time you use an app like Facebook, send an instant message or check the weather on your phone, we are using an API.

In basic terms, APIs allow applications to communicate with one another.

Let's understand this with two ๐—ฟ๐—ฒ๐—ฎ๐—น-๐˜„๐—ผ๐—ฟ๐—น๐—ฑ ๐—ฒ๐˜…๐—ฎ๐—บ๐—ฝ๐—น๐—ฒ ๐Ÿ‘‡

First Example ๐Ÿ‘‡

When we go to the restaurant ๐˜„๐—ฒ ๐—ผ๐—ฟ๐—ฑ๐—ฒ๐—ฟ ๐˜๐—ต๐—ฒ ๐—ณ๐—ผ๐—ผ๐—ฑ ๐˜๐—ต๐—ฟ๐—ผ๐˜‚๐—ด๐—ต ๐˜๐—ต๐—ฒ ๐˜„๐—ฎ๐—ถ๐˜๐—ฒ๐—ฟ and ๐—ฎ๐—ณ๐˜๐—ฒ๐—ฟ ๐˜€๐—ผ๐—บ๐—ฒ ๐˜๐—ถ๐—บ๐—ฒ ๐˜„๐—ฒ ๐—ฟ๐—ฒ๐—ฐ๐—ฒ๐—ถ๐˜ƒ๐—ฒ ๐˜๐—ต๐—ฒ ๐—ณ๐—ผ๐—ผ๐—ฑ. ๐—•๐˜‚๐˜ ๐˜„๐—ต๐—ฎ๐˜ ๐—ต๐—ฎ๐—ฝ๐—ฝ๐—ฒ๐—ป๐˜€ ๐—ฏ๐—ฒ๐˜๐˜„๐—ฒ๐—ฒ๐—ป ๐—ผ๐—ฟ๐—ฑ๐—ฒ๐—ฟ๐—ถ๐—ป๐—ด ๐˜๐—ต๐—ฒ ๐—ณ๐—ผ๐—ผ๐—ฑ ๐—ฎ๐—ป๐—ฑ ๐—ฟ๐—ฒ๐—ฐ๐—ฒ๐—ถ๐˜ƒ๐—ถ๐—ป๐—ด ๐—ถ๐˜?

๐—ฆ๐—ผ ๐—ต๐—ฒ๐—ฟ๐—ฒ ๐˜„๐—ฎ๐—ถ๐˜๐—ฒ๐—ฟ ๐—ฎ๐—ฐ๐˜๐˜€ ๐—น๐—ถ๐—ธ๐—ฒ ๐—ฎ๐—ป ๐—”๐—ฃ๐—œ. ๐—›๐—ฒ ๐˜๐—ฎ๐—น๐—ธ๐˜€ ๐˜๐—ผ ๐˜๐—ต๐—ฒ ๐—ฐ๐—ผ๐—ผ๐—ธ ( database or server ) to prepare the food => It means a ๐—ฐ๐—น๐—ถ๐—ฒ๐—ป๐˜ ๐—ถ๐˜€ ๐—ฟ๐—ฒ๐—พ๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ป๐—ด ๐—ฑ๐—ฎ๐˜๐—ฎ ๐—ณ๐—ฟ๐—ผ๐—บ ๐˜๐—ต๐—ฒ ๐—ฑ๐—ฎ๐˜๐—ฎ๐—ฏ๐—ฎ๐˜€๐—ฒ ๐˜๐—ต๐—ฟ๐—ผ๐˜‚๐—ด๐—ต ๐—ฎ๐—ป ๐—”๐—ฃ๐—œ.

Then the ๐—ฐ๐—ผ๐—ผ๐—ธ ๐—ฝ๐—ฟ๐—ฒ๐—ฝ๐—ฎ๐—ฟ๐—ฒ๐˜€ ๐˜๐—ต๐—ฒ ๐—ณ๐—ผ๐—ผ๐—ฑ ๐—ฎ๐—ป๐—ฑ ๐—ด๐—ถ๐˜ƒ๐—ฒ๐˜€ ๐—ถ๐˜ ๐˜๐—ผ ๐˜๐—ต๐—ฒ ๐˜„๐—ฎ๐—ถ๐˜๐—ฒ๐—ฟ. Finally, the ๐˜„๐—ฎ๐—ถ๐˜๐—ฒ๐—ฟ ๐—ฑ๐—ฒ๐—น๐—ถ๐˜ƒ๐—ฒ๐—ฟ๐˜€ ๐—ถ๐˜ ๐˜๐—ผ ๐˜†๐—ผ๐˜‚ => It means the ๐˜€๐—ฒ๐—ฟ๐˜ƒ๐—ฒ๐—ฟ ๐—ฟ๐—ฒ๐˜€๐—ฝ๐—ผ๐—ป๐—ฑ๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐˜๐—ต๐—ฒ ๐—ฑ๐—ฎ๐˜๐—ฎ ๐˜๐—ผ ๐˜๐—ต๐—ฒ ๐—ฐ๐—น๐—ถ๐—ฒ๐—ป๐˜ ๐˜๐—ต๐—ฟ๐—ผ๐˜‚๐—ด๐—ต ๐—ฎ๐—ป ๐—”๐—ฃ๐—œ.

Second Example ๐Ÿ‘‡

๐—” ๐—ฟ๐—ฒ๐—ฎ๐—น-๐˜„๐—ผ๐—ฟ๐—น๐—ฑ ๐—ฒ๐˜…๐—ฎ๐—บ๐—ฝ๐—น๐—ฒ ๐—ถ๐˜€ ๐—ฏ๐˜‚๐˜†๐—ถ๐—ป๐—ด ๐—บ๐—ผ๐˜ƒ๐—ถ๐—ฒ ๐˜๐—ถ๐—ฐ๐—ธ๐—ฒ๐˜๐˜€ ๐—ผ๐—ป๐—น๐—ถ๐—ป๐—ฒ. ๐—ฌ๐—ผ๐˜‚ ๐—ด๐—ผ ๐˜๐—ผ ๐˜๐—ต๐—ฒ ๐—บ๐—ผ๐˜ƒ๐—ถ๐—ฒ ๐˜€๐—ถ๐˜๐—ฒ; ๐˜†๐—ผ๐˜‚ ๐—ฒ๐—ป๐˜๐—ฒ๐—ฟ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—บ๐—ผ๐˜ƒ๐—ถ๐—ฒ, ๐—ป๐—ฎ๐—บ๐—ฒ, ๐—ฎ๐—ป๐—ฑ ๐—ฐ๐—ฟ๐—ฒ๐—ฑ๐—ถ๐˜ ๐—ฐ๐—ฎ๐—ฟ๐—ฑ ๐—ถ๐—ป๐—ณ๐—ผ๐—ฟ๐—บ๐—ฎ๐˜๐—ถ๐—ผ๐—ป, ๐—ฎ๐—ป๐—ฑ ๐—น๐—ฎ๐˜๐—ฒ๐—ฟ ๐˜†๐—ผ๐˜‚ ๐—ฝ๐—ฟ๐—ถ๐—ป๐˜ ๐—ผ๐˜‚๐˜ ๐˜๐—ต๐—ฒ ๐˜๐—ถ๐—ฐ๐—ธ๐—ฒ๐˜๐˜€.

But what happens between entering your information to receiving your ticket? APIs, that's what! They are collaborating behind the scenes with other applications.

ย