What is an API?

Completed

What is an API? This term seems to get used for many different things. Let's start with a definition of the acronym: "API" stands for "application programming interface." It's easiest to think of an API as a set of rules, or a codified handshake, between systems.

You can also think of an API as a "kitchen sink," as Burke Holland says. A sink is an API between you, the consumer of water, and the pipes that deliver it to you. You don't need to know much about the pipe configuration. You just need to know that when you turn a handle, water comes out and you can use it. An API is a convenient way to interface between a user and a product.

One example of an API is the jQuery API. This API is a program that uses jQuery's library to simplify the programmer's interaction between a browser and the DOM, the tree of objects that make up a web page. Another example is software that allows you to access other people's programs in a clear, secure, and documented way. For example, an API might let you access flight times from an airline database so you can use that data in your own applications.

Fundamentally, this handshake between systems allows you to build your own applications with the help of a technology that allows you to easily use other systems to enhance your own.

APIs have traditionally been built with a variety of protocols, including the XML-based Simple Object Access Protocol (SOAP) and Representational State Transfer (REST). SOAP is a powerful tool for sending and receiving messages between systems. But REST, with its ability to return both XML and the popular JSON format, has emerged as a more common way to use internet-connected web services and HTTP calls to send and receive data from third-party connections.

When an API or other interface follows the principles of REST, that interface is referred to as RESTful. We'll use both terms loosely in the rest of this module as you learn about building and using RESTful APIs.

Learn more about APIs

For more information, see Burke Holland's video "What is an API?":