High-level explanation of API ?

blinkme323 used Ask the Experts™
Could someone provide a high to mid-level explanation on what APIs are and how they are used?  I think I grasp the concept, but I'm hoping to get some confirmation.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
API's define how applications should interact with each other.  Basically a standardized way of integrating with various systems.

Take Microsoft as an example.  There are published API's that can be used to hook into the Microsoft applications to perform various functions like retrieving data from Active Directory.

Take a look at Wikapedia (http://en.wikipedia.org/wiki/Application_programming_interface) -- they have a good working explanation.
Top Expert 2013

Here is good link and explanation
What does the acronym API stand for? API means Application Programming Interface and they say that APIs are the underlying aspect of Web 2.0.  But what does it really mean – what is an api? Let’s try to demystify the term a little.

The word to really pay attention to is “Interface”. If you have any experience at all with programming, all kinds of abstractions and contracts must be coming to your mind when you hear the word “interface” but we are more interested in the classical meaning of the term.

An interface is a common boundary between two separate systems. It is the means or the medium via which these two systems communicate.


An API is the interface implemented by an application which allows other applications to communicate with it.
Why Is It Needed?

In one word – communication. You might ask why communication is so important. Just imagine Notepad couldn’t copy-paste to and from Microsoft Word or Google Chrome. Imagine having to type each and every time although the text is already there in some other application. This is only one of the examples of communication between applications and all this communication is made possible via APIs.
What Is It Really?

You cannot run an API like you would run say a Notepad application. This is because APIs are generally invisible to the end users like you and me. APIs are carefully thought out pieces of code created by programmers for their applications that allow other applications to interact with their application.

The previous responses are excellent, but I'll add another sort of example.

In the DOS days, there were multiple ways for a programmer to communicate with the system.  Let's look at a very simple example of writing a character to the screen.  One method was to put the appropriate information in different registers (storage locations) and then send a request to the BIOS to handle the rest of it.  A similar approach used DOS, which would then call the BIOS.

These two methods are examples of using the API.  The big advantage was that the programmer needed to know very little about the hardware; that was the API's job.  If a new video card came along that was designed differently from the older cards, it would still work because it would replace the BIOS code that actually communicated with the card with new code that could properly access the new card.

The main disadvantage with those approaches was that they were too slow.  Instead, programmers would write the characters directly to the video card and skip the APIs altogether.  This put a much bigger burden on the programmer who had to know which video card was installed, was it in text or graphics mode, which screen was active, etc.  It wasn't too bad in the days of single-tasking, but it was still more work and some programmers didn't quite get it right.

If a new video card came along whose architecture was different from the cards that the programmer knew about, code written to bypass the API probably wouldn't work.  Code written to use the BIOS or DOS APIs should work properly without any changes.



Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial