High-level explanation of API ?

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.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.
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.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
blinkme323Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Legacy OS

From novice to tech pro — start learning today.