Searches should include Wikipedia, which is surprisingly good for a number of programming concepts/terms such as Application Programming Interface:
What is an API?
An application programming interface (API) is a particular set of rules ('code') and specifications that software programs can follow to communicate with each other. It serves as an interface between different software programs and facilitates their interaction, similar to the way the user interface facilitates interaction between humans and computers.
How is it used?
The same way any set of rules are used.
When and where is it used?
Depends upon realm and API, naturally. Consider these:
Happy coding.
An API is the interface through which you access someone elses code or through which someone else's code accesses yours. In effect the public methods and properties.
Well, in addition to all the answers, I am just adding an example.
As others said API stands for Application Programming Interface
through which softwares can interact with each other
. Note, not a human interaction.
Where it is used
An example: You are buying an item online through your credit card. You will provide credit card details and press 'continue' button. It will tell you whether your information is correct or not. To provide these results, there are lot of things in the background.
The application will send your credit card details to a remote application which will validate your information and send the result back to your application. API is used in this scenario.
I hope it helps for the beginners who don't understand really what API is.
ANOTHER EXAMPLE
Weather application
Without API - Weather application must open weather.com site and read the details as a human does.
With API - Weather application will send a message to weather.com and receive the result and then display it.
SOURCE - Various online resources
1) What is an API?
API is a contract. A promise to perform described services when asked in specific ways.
2) How is it used?
According to the rules specified in the contract. The whole point of an API is to define how it's used.
3) When and where is it used?
It's used when 2 or more separate systems need to work together to achieve something they can't do alone.
an API(Application Programming Interface) is a set of defined functions and methods for interfacing with the underlying operating system or another program or service running on the computer.
It is usually used by establishing a reference to a library in your software or importing a function from a dll.
It is used in one form or another in almost all software, being explicitly called in your program or implicitly called by the compiler.
API stands for Application Programming Interface, i.e. API is the way for an application to interact with certain system/application/library/etc.
For example, there are API's for OS (WinAPI), API's for other applications (like databases) and for specific libraries (for example, image processing), etc.
APIs are usually developed in a form consumable by a client application. For C/C++ applications, it a set header files and dynamic/static libraries. For Java - set of jars. And so on.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With