Qortora · Search · Indexed page

www.ibm.comFetched 2026-08-17T14:33:05Z

What Is an API (Application Programming Interface)? | IBM

An API is a set of rules or protocols that enables software applications to communicate with each other to exchange data, features and functionality.

Open original source · Full cached text

What Is an API (Application Programming Interface)? | IBM What is an API (application programming interface)? By Michael Goodwin Published 09 April 2024 Updated 08 May 2026 What is an API? An API, or application programming interface, is a set of rules or protocols that enables software applications to communicate with each other to exchange data, features and functionality. APIs simplify and accelerate application and software development by enabling developers to integrate data, services and capabilities from other applications, instead of developing them from scratch. APIs give application owners a simple, secure way to make application data and functions available to both internal and external API consumers. APIs are predefined interfaces that share only the necessary data and functions for specific queries. Servers do not have to fully expose data—APIs enable the sharing of small packets of data, relevant to the specific request. They keep other internal system details hidden, which helps preserve the integrity of system security.  Comprehensive and well-maintained API documentation drive successful API adoption, integration and management. API documentation is like a technical instruction manual. It provides details about an API (such as supported protocols, languages and authentication methods) and information for developers on how to work with an API and its services. Well-designed documentation promotes a better API experience for users and generally makes for more successful APIs. Join 100,000+ subscribers for the latest tech news Stay up to date on the most important—and intriguing—industry news on AI, automation, data, quantum, infrastructure and security with the Think Newsletter, delivered twice weekly.  Thank you! You are subscribed. How do APIs work? It’s useful to think about API communication in terms of a request and response between a client and server. The application submitting the request is the client, and the server provides the response. The API is the bridge establishing the connection between them. A simple way to understand how APIs work is to look at a common example, third-party payment processing. When a user purchases a product on an e-commerce site, the site might prompt the user to “Pay with PayPal” or another type of third-party system. This function relies on APIs to make the connection. When the buyer clicks the payment button, an API call is sent to retrieve information. This is the request. This request is processed from an application to the web server through the API’s Uniform Resource Identifier (URI) and includes a request verb, headers and sometimes, a request body.   After receiving a valid request from the product webpage, the API calls to the external program or web server, in this case, the third-party payment system.   The server sends a response to the API with the requested information.   The API transfers the data to the initial requesting application, in this case, the product website. While the data transfer differs depending on the web service used, the requests and responses all happen through an API. There is no visibility on the user interface, meaning APIs exchange data within the computer or application, and appear to the user as a seamless connection. API Connect IBM API Connect Developer Portal See how the API Connect Developer Portal empowers you to share, manage, and customize APIs for your developers—accelerating integration and collaboration with a secure, scalable platform. Explore the developer portal Types of APIs APIs can be categorized by use case, including data APIs, operating system APIs, remote APIs and web APIs. Web APIs Web APIs enable the transfer of data and functionality over the internet by using HTTP protocol. Today, most APIs are web APIs. Web APIs are a type of remote API (meaning that the API uses protocols to manipulate external resources) that expose an application’s data and functionality over the internet. The four main types of web APIs are: Open APIs Open APIs are open source application programming interfaces you can access with the HTTP protocol. Also known as public APIs, they have defined API endpoints and request and response formats. Partner APIs Partner APIs connect strategic business partners. Typically, developers access these APIs in self-service mode through a public API developer portal. Still, they need to complete an onboarding process and get login credentials to access partner APIs. Internal APIs Internal, or private, APIs remain hidden from external users. These private APIs aren't available for users outside of the company. Instead, organizations use them to improve productivity and communication across different internal development teams. Composite APIs Composite APIs combine multiple data or service APIs. They allow programmers to access several endpoints in a single call. Composite APIs are useful in microservices architecture where running a single task might require information from several sources. Other types of APIs Less common types of APIs include: Data (or database) APIs, which are used to connect applications and database management systems Operating system (or local) APIs, which are used to define how apps use operating system services and resources Remote APIs, which are used to define how applications on different devices interact API examples Because APIs allow organizations to open access to their resources while maintaining security and control, they have become a valuable aspect of modern business and personal applications. Here are some API examples that users often encounter: Universal logins A popular API example is the function that enables people to log in to websites by using their Facebook, X or Google profile login details. This convenient feature allows any website to use an API from one of the more popular services for quick authentication. This capability helps save users the time and hassle of setting up a new profile for every web application or new membership. Internet of Things (IoT) These “smart devices” offer added functionality, such as internet-enabled touchscreens and data collection, through APIs. For example, a smart fridge can connect to recipe applications or take and send notes to mobile phones through text message. Internal cameras connect to various applications so that users can see the contents of the refrigerator from anywhere. Travel booking comparisons Travel booking sites aggregate thousands of flights, showcasing the cheapest options for every date and destination. APIs enable this service by providing application users access to the latest information about availability from hotels and airlines. This access is available either through a web browser or the travel booking company’s own application. With an autonomous exchange of data and requests, APIs dramatically reduce the time and effort involved in checking for available flights or accommodation. Navigation apps Navigation apps use core APIs that display static or interactive maps. These apps also use other APIs and features to provide users with directions, speed limits, points of interest, traffic warnings and more. Users communicate with an API when plotting travel routes or tracking items on the move, such as a delivery vehicle. Social media Social media companies use APIs to allow other entities to share and embed content featured on social media apps to their own sites. For example, the Instagram API enables businesses to embed their Instagram grid on their website and for the grid to update automatically as users add new posts. SaaS applications APIs are an integral part of the growth in software as a service (SaaS) products. Platforms like CRMs (customer relationship management tools) often include several built-in APIs that let companies integrate with applications they already use, such as messaging, social media and email apps. This integration drastically reduces time spent switching between applications for sales and marketing tasks. It also helps reduce or prevent data silos that might exist between departments that use different applications. API protocols, architectural styles and languages Traditionally, API referred to an interface connected to an application created with any of the low-level programming languages, such as JavaScript. However, modern APIs vary in their architectures and use of data formats. They are typically built for HTTP (hypertext transfer protocol), resulting in developer-friendly interfaces that are easily accessible. These interfaces are also widely understood by applications written in Java™, Ruby, Python and many other languages. As the use of web APIs has increased, it has led to the development and use of certain protocols, styles, standards and languages. These structures provide users with a set of defined rules, or API specifications, that create accepted data types, commands and syntax. In effect, these API protocols facilitate standardized information exchange. SOAP (simple object access protocol) SOAP is a lightweight XML-based messaging protocol specification that enables endpoints to send and receive data through a range of communication protocols including SMTP (simple mail transfer protocol) and HTTP. SOAP is independent, which allows SOAP APIs to share information between apps or software components that run in different environments or are written in different languages. Remote procedure call (RPC) Remote procedure call (RPC) is a protocol that provides the high-level communications paradigm used in the operating system. RPC presumes the existence of a low-level transport protocol, such as transmission control protocol/internet protocol (TCP/IP) or user datagram protocol (UDP), for carrying the message data between communicating programs. RPC implements a logical client-to-server communications system designed specifically for the support of network applications. The RPC protocol enables users to work with remote procedures as if the procedures were local.1 XML-RPC (XML-remote procedure call) The XML-RPC protocol relies on a specific XML format to transfer data. XML-RPC is older than SOAP, but simpler and relatively lightweight in that it uses minimum bandwidth. JSON-RPC Like XML-RPC, JSON-RPC is a remote procedure call that uses JSON (JavaScript Object Notation) instead of XML. JSON is a lightweight format for data exchange that is simple to parse and uses name-value pairs and ordered lists of values. Because JSON uses universal data structures, it can be used with any programming language. gRPC gRPC is a high-performance, open source RPC framework initially developed by Google. gRPC uses the network protocol HTTP/2 and protocol buffers data format and is commonly used to connect services in a microservices architecture. WebSocket WebSocket APIs enable bidirectional communication between client and server. This type of API does not require a new connection to be established for each communication. Once the connection is established, it allows for continuous exchange. This makes WebSocket APIs ideal for real-time communication. REST (representational state transfer) REST is a set of web API architecture principles. REST APIs, also known as RESTful APIs, are APIs that adhere to certain REST architectural constraints. REST APIs use HTTP requests such as GET, PUT, HEAD and DELETE to interact with resources. REST makes data available as resources, with each resource represented by a unique URI. Clients request a resource by providing its URI. REST APIs are stateless—they do not save client data between requests. It’s possible to build RESTful APIs with SOAP protocols, but practitioners usually view the two standards as competing specifications. GraphQL GraphQL is an open source query language and server-side runtime that specifies how clients should interact with APIs.2 GraphQL allows users to make API requests with just a few lines, rather than having to acces…