An application programming interface (API) is an interface that provides programmatic access to service functionality and data within an application or a database . It can be used as a building block for the development of new interactions with humans, other applications or smart devices.