Just like a user interface enables com­mu­ni­ca­tion between humans and machines, APIs enable com­mu­ni­ca­tion between different software ap­pli­ca­tions. Thanks to these in­ter­faces, data can be trans­ferred back and forth in an orderly manner. This even works when the ap­pli­ca­tions were created in different pro­gram­ming languages.

IONOS Developer API
Manage your hosting products through our powerful API
  • DNS man­age­ment
  • Easy SSL admin
  • API doc­u­men­ta­tion

What is an API?

API stands for ap­pli­ca­tion pro­gram­ming interface. As the name suggests, APIs allow external pro­gram­mers to access certain functions. The in­ter­faces act as the entry point to another software program. Both programs can use the API to com­mu­ni­cate with each other, exchange data, and issue commands. And this is possible with desktop software as well as mobile apps, and web ap­pli­ca­tions. An in­di­vid­ual program can also be designed so that various modules com­mu­ni­cate with one another via in­ter­faces.

De­f­i­n­i­tion: API

An ap­pli­ca­tion pro­gram­ming interface is an interface that connects various programs together and stan­dard­izes data trans­mis­sion and the exchange of in­struc­tions between the program modules.

Why do we need APIs?

Nowadays, APIs are used by various software man­u­fac­tur­ers to make it easier for pro­gram­mers to access software com­po­nents. SAP, Amazon, and Google offer APIs for different ap­pli­ca­tion areas, for example. These in­ter­faces allow de­vel­op­ers to perform different tasks:

  • Forward a developer’s in­struc­tion to a software program and receive its response
  • Insert content in web services
  • Reuse app codes by net­work­ing programs
  • Control access for other pro­gram­mers

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 des­ti­na­tion and date. As soon as you click on “Search”, the website will start to com­mu­ni­cate with the APIs of the in­di­vid­ual airlines to find out prices for the des­ti­na­tion. 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?

Tip

Fancy pro­gram­ming a mobile app? Our starter guide on mobile app design has all the in­for­ma­tion you need.

How do APIs work?

Although they benefit end users, APIs are primarily intended for pro­gram­mers. The ap­pli­ca­tion pro­gram­ming interface is typically provided by software de­vel­op­ers so that pro­gram­mers of other ap­pli­ca­tions can use the interface. The pro­gram­ming interface defines how in­for­ma­tion and data are accepted and returned between modules. For instance, Google has released an API that enables other pro­gram­mers to dock their own ap­pli­ca­tions to Google services. Here, a dedicated standard is used which the external software has to follow.

The REST protocol is highly popular for com­mu­ni­ca­tion between ap­pli­ca­tions – es­pe­cial­ly within the web. A REST API uses the same commands as HTTP. The in­struc­tions are not complex and, therefore, make in­for­ma­tion exchange quite easy. What’s more, the basic protocol sim­pli­fies the process of es­tab­lish­ing a con­nec­tion to the API for pro­gram­mers.

So, stan­dard­iza­tion is vital in order to use the pro­gram­ming interface – re­gard­less of which protocol is used for exchange. Moreover, it’s important to show other pro­gram­mers how to use the interface properly. That’s why an API is often provided with extensive doc­u­men­ta­tion on syntax and function.

What types of API exist?

There are generally four different classes of pro­gram­ming interface:

  • Function-based APIs
  • File-based APIs
  • Protocol-based APIs
  • Object-based APIs

The choice of class depends on the relevant area of ap­pli­ca­tion. Function-based pro­gram­ming in­ter­faces are rel­a­tive­ly complex. For example, they enable de­vel­op­ers to access hardware com­po­nents. But only functions are accessed. File-based APIs enable con­nec­tions at the file level. This way, data can be requested and written. The protocol-based interface provides stan­dard­ized com­mu­ni­ca­tion between programs and does not depend on the operating system or hardware. Lastly, object-based APIs are more versatile.

A dif­fer­en­ti­a­tion can also be made between internal in­ter­faces and public APIs. Private in­ter­faces are only available within an or­ga­ni­za­tion. They are often used to connect a company’s own func­tion­al­i­ties, allowing employees or customers to gain access to private networks. Public in­ter­faces are available to anyone and can often be used con­ve­nient­ly by software de­vel­op­ers. Google, Amazon, eBay, Facebook, Twitter, and PayPal are good public API examples. Many providers (such as Google) also actively invite de­vel­op­ers to par­tic­i­pate in their API de­vel­op­ment.

What ad­van­tages do APIs have?

APIs provide a number of ad­van­tages and for different groups of people: end users benefit from pro­gram­ming in­ter­faces just as much as the de­vel­op­ers do.

De­vel­op­ers who equip their programs with good pro­gram­ming in­ter­faces can expect to achieve greater dis­tri­b­u­tion. Since this makes it easier for other pro­gram­mers to interact with the software, ap­pli­ca­tions with effective APIs are preferred. External de­vel­op­ers can sig­nif­i­cant­ly expand the func­tion­al scope of their own software by building con­nec­tions with other ap­pli­ca­tions. Ul­ti­mate­ly, it’s primarily the users who benefit from the interface con­nec­tions: APIs enable them to combine a wide range of programs with ease and enjoy greater con­ve­nience.

Example: APIs and SDKs for Google Maps

Google Maps is a well-known service for in­te­grat­ing 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 smart­phone apps.

On the Google Maps platform, de­vel­op­ers can find SDKs (software de­vel­op­ment kits) and APIs to integrate with their own apps, programs, and websites. This allows the functions of Google Maps to be quickly and easily in­te­grat­ed into other ap­pli­ca­tions. With the Maps JavaScript API, for example, website owners can con­ve­nient­ly insert in­ter­ac­tive maps. This is es­pe­cial­ly useful for shops or restau­rants whose business success often depends on whether customers are easily able to find and visit their premises.

Tip

The IONOS cloud servers can also be contacted via an interface. Find out how this works in the extensive doc­u­men­ta­tion.

How to test APIs?

When in­te­grat­ing ap­pli­ca­tion pro­gram­ming in­ter­faces into programs or ap­pli­ca­tions, it’s important to first test them to make sure every­thing works as intended and the APIs don’t take too long to access in­for­ma­tion. De­vel­op­ers who write their own APIs should also test them first. For­tu­nate­ly, it’s now rel­a­tive­ly easy to test APIs – not least thanks to ap­pli­ca­tions like Postman or CURL.

Postman makes it possible to test API access defined by the user. De­vel­op­ers can import and try out their API spec­i­fi­ca­tions. Postman also offers schematic support for formats like RAML, WADL, OpenAPI, 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 re­quire­ments. Smaller teams can design and test APIs for $12 per user per month, while larger companies are best served with Postman Business for $24 per user per month. An en­ter­prise package is available for companies with more than 100 users.

CURL is a command line tool for testing APIs. It requires a good un­der­stand­ing of command line functions. It’s not as con­ve­nient 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
Prices start at $12 per month. Free, open-source
Platform-based Command line tool
Postman allows APIs to be tested in detail CURL is used more fre­quent­ly for quickly viewing HTTP headers
Web Hosting
Hosting that scales with your ambitions
  • Stay online with 99.99% uptime and robust security
  • Add per­for­mance with a click as traffic grows
  • Includes free domain, SSL, email, and 24/7 support
Go to Main Menu