What is API?

1.92K viewsEngineeringOther

What is exactly API and why we call it like that? I am learning web development, and always come across APIs. I would love to learn it through an analogy.

In: Engineering

32 Answers

Anonymous 0 Comments

If I’m a website and I want to get data from somewhere else, maybe information about the weather or something, an API is what I can use to communicate with the weather service

Another use case is when you have a database with information about a school, for example. The API could allow you to ask for information about the teachers, the students, the grades, enter new information into the database, etc., without you having to write the SQL code to get that data yourself (which is great because you don’t really want anyone to be able to interact directly with the database as they might have bad intentions)

Add someone else said, it’s like a menu. The cooks can probably make a huge variety of things that aren’t on the menu, but that’s not what you want the customer to be able to order. An API lets you request the data the service wants you to have access to and nothing else (hopefully)

You are viewing 1 out of 32 answers, click here to view all answers.