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

It’s a description of an interface. For example when i use a web API i could send json data in a POST to make the website do something like search for data. The would describe the fields i need to put in that json like (“search”:”<string>”). Once the API is documented and written in stone essentially, I can write code against it because it should not change. Also, extra fields like “uppercase”: True, help to describe the API’s capabilities. There maybe dozens option flags/values to tweak the search results or it could only need the search string. Knowing this you can write your code to take advantage of some all or none of its features. But at the end of the day a human looks at a web page, but an app or a machine does’t need the pretty UI, they can use the API to get the data.

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