What do APIs do?
Web APIs enable developers to integrate services into their smaller apps; when you register for a brand new app using your Facebook or Twitter account, the developer has used an API. Whenever you see a Google map on a restaurant’s web site showing you wherever you’ll find them, that’s an API. Have you ever searched for and watched a YouTube on a web site that wasn’t YouTube itself? An API! You get the concept.
These kinds of APIs permit developers to use a number of the functionality of alternative applications in their apps, provided they follow the documentation outlined by the people that created it. It makes it possible for Google to allow you to have an awesome map on your web site without surrendering their entire codebase.
APIs are still helpful in open source; you’ll decide and select what elements of an application you would like to use while not trawling through a complete codebase, and avoid any licensing problems if you would like to use your app commercially.