Over the years, an "API" has often included any kind of generic Connection interface described to an application. More recently, however, the modern API has taken on some characteristics that make it extremely valuable and useful:
Modern APIs adhere to standards (typically HTTP and REST) that are developer-friendly, easily accessible and generally understandable.
They are treated more like products than code. They are designed for use by specific target groups (e.g. mobile developers), they are documented, and they are versioned so that users can have certain expectations about their maintenance and lifecycle. Because they are much more standardized, they have much more discipline for security and governance, and monitoring and management for performance and scale.