What is an API?
Imagine yourself building an app that needs mapping capabilities. At some point, you are faced with questions along the following similar line/train of thought:
“How do I add a Map to this page?”, “Do I need to build it from scratch? Or use an existing one?”, “I’ve researched that Google Maps does what I want to achieve, and it is capable of integrating with my application, HOW DO I USE THE SERVICE?”
That last statement is where an API comes to the picture.
In that case, Google provides external developers who want to use its Maps services an API. A standard way for consumers to utilize the service.
It’s an “interface”. If you were to withdraw money, how do you do it? Ideally, pupunta ka sa ATM. The ATM is the interface.
But going back to your question, “What is an API”. Walang definite answer diyan. It depends to the context to which you are wanting to refer to.