What is API?

1.90K 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

I wouldn’t ELI5 this. If you want to be a webdev you should learn this in the following order:

Networking (TCP/IP, UDP, HTTP, DNS) and then something on abstract classes/interfaces and then you should be equipped to understanding this topic quite intuitively.

Analogies are confusing in this sort of environment, and web APIs are really closest to abstract interfaces which get implemented by classes.

ELI5 attempt: An Interface is a contract to deliver a certain thing when requested a certain way. It’s a sort of menu that says “if you provide me with these inputs, I’ll return this as an output”. When we talk about Web APIs, we’re talking about menus that you order from over HTTP. You pass data in, in a way the API expects, it processes it and then sends you back new data. It’s sort of like ordering a pizza between software applications.

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