A friend of mine asked me if I knew of a good definition of the term "API". I didn’t have one, but I know that I’ve explained it a number of times in presentations I’ve made to non-technical people. I never wrote down exactly how I’ve explained it in meeting rooms inside large downtown hotels, so I thought this would be a good time to do it.
An "API" is a method for one Web site to communicate with another one in order to get information that they can do cool things with. The best way to take it is word-by-word.
Application
Most useful Web sites are really just applications, just like Microsoft Word or Excel. These applications do specialized things. Digg is an application for managing links and comments about links, and they have an API that lets you query their application for new links added to it recently. Google is an application for delivering links to Web sites based on search terms, and they have an API that allows you to deliver their search result on your Web site in a particular way.
Once you understand that Web sites that do things (list available jobs in your city, list available homes near you, or list garage sales near you) are just applications, you’re more than a third of the way there in understanding APIs.
Program
A program is a method for getting things done. It’s a set of instructions that computers know how to translate into something useful. When you click the "send" button on a form in a browser, the Web site is programmed to save the information you entered into a database and give you a thank you message. Web sites do this all day long.
So in this context, the "program" part of API is a set of instructions that a Web site needs to hear in order to give you back what you want out of their application. This is two computers talking back and forth to each other very quickly. If Google says, "if you want to put a Google search box that allows people to seach our Google from your Web site, you’ve got to ask our application in this particular way", you’ve got to do it that way or you want be able to get what you want out of them.
Interface
An interface is the area within which the stuff gets done. Web site designers try to make the most functional, pleasing interfaces so that you’ll like going to the site. Sometimes Web sites allow you to fiddle with the interface, making the text bigger or moving boxes around. When you go to AOL.com and then Yahoo, you might be surprised at how similar their interfaces are.
For APIs, the main thing about the interface is that it’s actually available to people. Think about it — if you’re a bank, you want to give customers an interface into their bank account, but not to everyone else’s. So in an API the interface is the external-facing location or method where the programming happens.
If I got something wrong and any of my more astute programming genius friends would like to fix it, you know where to find me!
Update: Nemetral makes a good point in the comments: this particular API explanation is focused on Web applications.