The Economist explains

What APIs are

By E.A.H.

A FEDERAL jury has handed Google a huge victory in its long-running battle with a rival, Oracle, over Google’s Android software. The two software giants have been at legal loggerheads for years over Oracle’s allegation that Google illegally copied parts of its software—specifically, 37 “Java APIs”—in its Android phones. Oracle has already announced it plans to appeal. But what is an API?

An API (short for “Application Program Interface”) is a standard way for programmers to work with code written by others—a bit like a postbox is a standard way for sending letters. To use a postbox, you drop your addressed, stamped envelope into it, and expect the post office to take care of the rest. The addresses and stamps are standard. You don’t mind how the letter gets from the postbox to its destination, only that it does so. The system saves you the trouble of figuring out how to get the letter there yourself. APIs perform much the same function: they let programmers perform common tasks. APIs generally perform a group of related tasks: for example, the “java.io” API, one of those at issue in Oracle’s suit, has pieces to read and write files, and to perform other file-related tasks.

More from The Economist explains

What are the obligations of Israel and Hamas to protect civilians?

International Humanitarian Law creates obligations—but contains numerous caveats

Why is so much of the internet’s infrastructure run by volunteers?

Malware smuggled into XZ Utils software highlights a bigger problem


The growing role of fighting robots on the ground in Ukraine

Drones already fill the skies. Now uncrewed vehicles are heading to the front lines