API – Application Programming Interface
Just like a user interface enables communication between humans and machines, APIs enable communication between different software applications. Thanks to these interfaces, data can be transferred back and forth in an orderly manner. This even works when the applications were created in different programming languages.
Key Takeaways
Anyone connecting software to an outside service works through its API: the provider decides which functions are available, who is allowed to call them and in what form the answer comes back.
- What an API is: an application programming interface through which one program can call defined functions of another and exchange data in a standardized form
- Why they are needed: they let developers reuse existing software components, connect services to one another and control who is allowed in
- How they work: the provider publishes an interface and documents it, the calling program sends a request to it and receives a defined response
- Which types exist: function-based, file-based, protocol-based and object-based interfaces, plus the distinction between private and public APIs
- How to test them: with a graphical client such as Postman or on the command line with curl
- DNS management
- Easy SSL admin
- API documentation
What is an API?
API stands for application programming interface. As the name suggests, APIs allow external programmers to access certain functions. The interfaces act as the entry point to another software program. Both programs can use the API to communicate with each other, exchange data and issue commands. And this is possible with desktop software as well as mobile apps and web applications. An individual program can also be designed so that various modules communicate with one another via interfaces.
An application programming interface is an interface that connects various programs together and standardizes data transmission and the exchange of instructions between the program modules.
Why do we need APIs?
Nowadays, APIs are used by various software manufacturers to make it easier for programmers to access software components. SAP, Amazon and Google offer APIs for different application areas, for example. These interfaces allow developers to perform different tasks:
- Forward a developer’s instruction to a software program and receive its response
- Insert content in web services
- Reuse app codes by networking programs
- Control access for other programmers
In daily use, APIs are used in web services for instance. When booking a flight, you can ask a suitable search engine to find all flights and flight prices for a certain destination and date. As soon as you click on “Search”, the website will start to communicate with the APIs of the individual airlines to find out prices for the destination. This all happens in a matter of seconds and you, as the customer, quickly receive an overview of available flights. But how exactly does it work?
Fancy programming a mobile app? Our starter guide on mobile app design has all the information you need.
How do APIs work?
Although they benefit end users, APIs are primarily intended for programmers. The application programming interface is typically provided by software developers so that programmers of other applications can use the interface. The programming interface defines how information and data are accepted and returned between modules. For instance, Google has released an API that enables other programmers to dock their own applications to Google services. Here, a dedicated standard is used which the external software has to follow.
The REST protocol is highly popular for communication between applications – especially within the web. A REST API uses the same commands as HTTP. The instructions are not complex and, therefore, make information exchange quite easy. What’s more, the basic protocol simplifies the process of establishing a connection to the API for programmers.
What that looks like in practice is a short exchange. The calling program addresses a defined web address, the endpoint, and states which resource it wants and what it intends to do with it. The interface answers with a defined response: a status code that says whether the request worked, and the requested data as a structured data set, today usually in JSON format. Because that response follows an agreed structure, the calling program can read it without knowing anything about the internals of the program that produced it – which is exactly why the exchange also works between applications written in different programming languages.
Access to the interface is part of what an API defines. A provider that opens an interface to outside programmers needs to be able to tell callers apart, so a developer normally registers an application first and receives an API key that is sent with every request. Where an interface reaches data belonging to an individual user, a key is not enough: The user is asked to grant permission, and the application then works with a token issued for that one user. The widely used standard for this is OAuth 2.0. Providers also set limits on how often an interface may be called within a given period, which is why a program that uses external APIs has to be prepared for a request being turned down.
So, standardization is vital in order to use the programming interface – regardless of which protocol is used for exchange. Moreover, it’s important to show other programmers how to use the interface properly. That’s why an API is often provided with extensive documentation on syntax and function. Many providers write that documentation in a machine-readable form, the OpenAPI specification being the common one; the Swagger toolset is built around it and generates readable documentation and test pages from such a description. Good documentation also names the version of the interface it describes. Interfaces change over time, and providers usually keep an older version reachable for a transition period – often marked by a version number in the endpoint address – so that applications built against it keep working.
To display this video, third-party cookies are required. You can access and change your cookie settings here.
What types of API exist?
There are generally four different classes of programming interface:
- Function-based APIs
- File-based APIs
- Protocol-based APIs
- Object-based APIs
The choice of class depends on the relevant area of application. Function-based programming interfaces are relatively complex. For example, they enable developers to access hardware components. But only functions are accessed. File-based APIs enable connections at the file level. This way, data can be requested and written. The protocol-based interface provides standardized communication between programs and does not depend on the operating system or hardware. Lastly, object-based APIs are more versatile.
A differentiation can also be made between internal interfaces and public APIs. Private interfaces are only available within an organization. They are often used to connect a company’s own functionalities, allowing employees or customers to gain access to private networks. Public interfaces are open to developers outside the provider’s organization – which rarely means that they are open without conditions. Usually, you register an application, accept the provider’s terms of use and receive the key or token described above. Google, Amazon, eBay, Facebook and PayPal all run public APIs of this kind. What such access costs does not depend on how many people work with it: Providers price a public API by what is actually requested of it – the number of calls, the volume of data transferred or a quota booked in advance – and many of them keep a free tier below a certain number of calls per day. Many providers (such as Google) also actively invite developers to participate in their API development.
What advantages do APIs have?
APIs provide a number of advantages and for different groups of people: end users benefit from programming interfaces just as much as the developers do.
Developers who equip their programs with good programming interfaces can expect to achieve greater distribution. Since this makes it easier for other programmers to interact with the software, applications with effective APIs are preferred. External developers can significantly expand the functional scope of their own software by building connections with other applications. Ultimately, it’s primarily the users who benefit from the interface connections: APIs enable them to combine a wide range of programs with ease and enjoy greater convenience.
Example: APIs and SDKs for Google Maps
Google Maps is a well-known service for integrating APIs. The popular online maps were released in February 2005 and have since been part of everyday life for many people – on desktop computers and smartphone apps.
On the Google Maps platform, developers can find SDKs (software development kits) and APIs to integrate with their own apps, programs and websites. This allows the functions of Google Maps to be quickly and easily integrated into other applications. With the Maps JavaScript API, for example, website owners can conveniently insert interactive maps. This is especially useful for shops or restaurants whose business success often depends on whether customers are easily able to find and visit their premises.
The example also shows how such an interface is paid for in practice. Access runs through a project with a key of its own, and Google bills usage by the number of map loads and other requests, not by the number of developers or visitors involved. Anyone building a service on an external API should therefore look at the expected volume of calls first.
To display this video, third-party cookies are required. You can access and change your cookie settings here.
How to test APIs?
When integrating application programming interfaces into programs or applications, it’s important to first test them to make sure everything works as intended and the APIs don’t take too long to access information. Developers who write their own APIs should also test them first. Fortunately, it’s now relatively easy to test APIs – not least thanks to applications like Postman or curl.
Postman makes it possible to test API access defined by the user. Developers can import and try out their API specifications. Postman also offers schematic support for formats like OpenAPI, AsyncAPI, RAML and GraphQL. APIs can be tested both in their initial stages and in their final state. The pricing structure of Postman varies depending on the scope of requirements. There is also a free plan. A single developer can design and test APIs with the Solo plan for $9 per user per month, while teams are served by the Team plan at $19 per user per month, each billed annually. An Enterprise plan with custom pricing is available on request.
curl is a command-line tool for testing APIs. It requires a good understanding of command-line functions. It’s not as convenient as Postman and doesn’t offer a graphical user interface. But curl is free of charge. The documents on various topics can be viewed on the curl project page.
| Postman | curl |
|---|---|
| A free plan is available; paid plans start at $9 per user per month. | Free, open-source |
| Platform-based | Command-line tool |
| Postman allows APIs to be tested in detail | curl is used more frequently for quickly viewing HTTP headers |
- Fast page loads while cutting costs by 60%
- Keep your site open 24/7 with 99.99% uptime
- Never run out of space with unlimited storage


