What Is an API (Application Programming Interface)? Definition and Examples (2024)

Related articles
  • What is application integration?
  • What is API management? Guide to API management tools and platforms

A lot of people who work in technology have an intuitive understanding of what an API (application programming interface) is — but if you asked them to define it, they might have trouble putting an explanation into words. In simple terms, an API is both a piece of software running on a networked server and a component of programming code.

APIs are standards for application data interchange, just as protocols are standards for network data interchange. Without them, software developers would have a much harder time writing code to get information from platforms or apps they want to access.

API definition

When running on a server, an API is a set of coded routines that receives requests from and sends responses to other programs. API designers implement that code through standardized programming statements that expose functions that make sense for accessing the platform in question.

For example, suppose you wanted to incorporate a map to your business on your website or display a list of your latest tweets. You can’t directly access Google Maps or Twitter — the code that runs those sites sits on Google and Twitter servers. But those platforms provide APIs that let authorized users retrieve data from their sites.

The Google Maps API and Twitter API may be among the most widely used API examples, but most software-as-a-service (SaaS) providers offer APIs that let developers write code that posts data to and retrieves data from the provider’s site as well.

Developers can use multiple different programming languages to create web-based APIs, including Java, JavaScript, Perl, Python, and Ruby. Each call that’s a part of these APIs has a defined syntax, and each vendor that provides an API documents its syntax, usually on their site or sometimes on sites like GitHub or ProgrammableWeb.

Most types of APIs have several methods, or operations, that allow developers to create, retrieve, update, and delete data. The verbs used to implement these methods are, respectively, POST, GET, PUT, and DELETE. Each method generally takes a payload in the form of a file in a defined format (usually JSON or XML) that contains the data to be operated on, and uses a URI (Uniform Resource Identifier) that acts as an address where the API can interact with the calling program.

How does that look in practice? Let’s look at a Talend API as an example. The Stitch Import API lets developers send data from an arbitrary source to the Stitch data pipeline. You can push a single record through the Stitch data pipeline with a POST API call:

<pre> curl -X "POST" " https://api.stitchdata.com/v2/import/batch" \
-H 'Authorization: Bearer [ACCESS_TOKEN]' \
-H 'Content-Type: application/json' \
-d $
'{
"table_name": "customers",
"schema": {
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"age": {
"type": "integer"
},
"has_magic": {
"type": "boolean"
},
"modified_at":{
"type":"string",
"format":"date-time"
}
}
},
"messages": [
{
"action": "upsert",
"sequence": 1565880017,
"data": {
"id": 1,
"name": "Finn",
"age": 15,
"has_magic": false,
"modified_at":"2020-12-13T21:25:03+0000"
}
}
],
"key_names": [
"id"
]
}'
</pre>

APIs are useful because they make software developers more productive. Without them, all developers would have to write and then maintain their own code to access remote resources. Having a standard way to read from and write to those resources makes the platform that provides the API more accessible and more attractive to developers, therefore increasing the likelihood that third parties will use and exchange data with their platform.

History of APIs

APIs have been around longer than the World Wide Web — for several decades, in fact. They became more popular with the rise of network computing, when server-based application vendors and operating systems needed standard ways to allow clients to access server resources.

As the Web became ubiquitous, APIs moved into web development. Salesforce introduced the first web APIs when it launched in 2000.

API design

Many of these early APIs relied on SOAP — Simple Object Access Protocol. “Simple” was a misnomer. SOAP relies on XML documents and remote procedure calls (RPC). Developers had to concern themselves with things like transport bindings, operation names, and endpoint URIs. No one set standards for API design, so SOAP APIs were hard to maintain.

An alternative known as CORBA (Common Object Request Broker Architecture), defined by the Object Management Group (OMG), was even more complex.

REST API

Recognizing the need for simplicity, computer scientist Roy Fielding proposed representational state transfer (REST) in his Ph.D. thesis as “an abstraction of the architectural elements within a distributed hypermedia system” — namely the World Wide Web. It provides roles for a user agent (commonly a web browser), an origin server that provides access to web services, and intermediary components that forward requests and responses. RESTful web services allow requesting systems to access and manipulate representations of web resources by using a uniform, predefined set of stateless operations. Stateless just means that the web services don’t retain session information from one request to another.

eBay launched the first REST API in 2002, and quickly proved the wisdom of allowing developers who worked outside the company to add value to eBay’s platform. Since that time, software development teams have written APIs not just for web-based services, but for social media, mobile applications, and hardware devices (the Internet of Things, or IoT), among other platforms. Today, almost all vendors' APIs are REST-based APIs.

Most APIs are public APIs (also called open APIs). After all, if programmers outside your organization can’t use your API, how much value does it have? But private APIs can be useful in certain circ*mstances, such as internal APIs that can only be accessed and used by an organization’s developers for internal use cases. Partner APIs fall somewhere in between, accessible only to a company’s business partners.

API integration

APIs are also a key tool for application integration. Application integration is a means of enabling applications and systems from different vendors to involve each other in their workflows, so that, for example, you can enter data in one application and have it automatically available in other platforms.

An API integration serves as the connection between two applications, letting them exchange data. APIs allow developers to sync data between multiple platforms and can facilitate communication among the various microservices in web applications. API integration is what does the work when, for example, you enter a new contact in Salesforce and it auto-populates to Marketo as well.

A key advantage of API integration is that it automates data sharing in a secure process, therefore helping maintain data integrity between platforms.

API management

To create APIs, businesses turn to API management software. API management tools foster the creation and publication of APIs, enforce usage policies, control access, collect and analyze usage statistics, and report on performance. Both commercial and open source API management tools are available. You can read more about them.

Talend API Services

Many organizations see the value of offering APIs to let outside developers interact with their platforms, but designing and documenting APIs can be a major project that takes months of developer time and costs tens of thousands of dollars.

Rather than start from scratch, businesses can use Talend API Services to do the heavy lifting. It lets developers collaborate to create and test new APIs with visual design tools and an intuitive user interface. We’d be happy to give you a demo and show you what Talend API Services can do for you.

What Is an API (Application Programming Interface)? Definition and Examples (2024)

FAQs

What Is an API (Application Programming Interface)? Definition and Examples? ›

API stands for Application Programming Interface. In the context of APIs, the word Application refers to any software with a distinct function. Interface can be thought of as a contract of service between two applications. This contract defines how the two communicate with each other using requests and responses.

What is API and examples? ›

APIs allow developers to sync data between multiple platforms and can facilitate communication among the various microservices in web applications. API integration is what does the work when, for example, you enter a new contact in Salesforce and it auto-populates to Marketo as well.

What is an API Application Programming Interface is? ›

Many people ask themselves, “What is an API?” API is the acronym for application programming interface — a software intermediary that allows two applications to talk to each other. APIs are an accessible way to extract and share data within and across organizations.

What are the 3 types of APIs and give examples for each? ›

There are also three common types of API architectures:
  • REST, a collection of guidelines for lightweight, scalable web APIs.
  • SOAP, a stricter protocol for more secure APIs.
  • RPC, a protocol for invoking processes that can be written with XML (XML-RPC) or JSON (JSON-RPC).
Jan 16, 2023

What is an example of a programming interface? ›

An interface is a programming structure/syntax that allows the computer to enforce certain properties on an object (class). For example, say we have a car class and a scooter class and a truck class. Each of these three classes should have a start_engine() action.

What is the best example of API? ›

Common API examples include social media APIs like Facebook Graph API, payment gateways like Stripe API, and mapping APIs like Google Maps API. Additionally, web development often involves RESTful APIs, such as those provided by GitHub.

What is a daily example of an API? ›

Weather apps gather real-time weather data through APIs provided by weather services. When you check the weather through a smart device or search engine, the app sends an API request to the weather service, which responds with the current weather conditions and forecasts.

What is an API in layman's terms? ›

API stands for Application Programming Interface. In the context of APIs, the word Application refers to any software with a distinct function. Interface can be thought of as a contract of service between two applications. This contract defines how the two communicate with each other using requests and responses.

What is an API for dummies? ›

APIs, or Application Programming Interfaces, are like a set of rules and protocols that allow different software programs to talk to each other and share data or functionality. For example, when you use a weather app on your phone, it's probably using an API to get the current weather data from a service.

How does an API work? ›

Application programming interfaces (APIs) allow software programs to communicate with each other by sending and receiving API calls, or requests for information. These requests are initiated by an API client and accepted by an API endpoint.

What is the most common API? ›

REST APIs are the most common type of protocol, while GraphQL is a newer type of protocol that allows for more efficient and targeted data retrieval. SOAP, RPC, and webhook API protocols also each have their place.

Is REST an API? ›

A REST API (also called a RESTful API or RESTful web API) is an application programming interface (API) that conforms to the design principles of the representational state transfer (REST) architectural style.

What is the best type of API? ›

REST APIs. The Representational State Transfer (REST or RESTful) protocol is probably the best-known API protocol. The REST protocol defines routes with a URL … and that's it. That simplicity is a big advantage compared to other protocols that require the developer to wrap routes with XML.

What is an example of application interface? ›

An application interface, or user interface, is the set of features an application provides so that a user may supply input to and receive output from the program. If you think about Microsoft Word as an example, the application interface includes a central area for typing and adding feedback on your screen.

What is the application of programming interface? ›

An application programming interface (API) is code that enables two software programs to communicate. An API facilitates the exchange of data, features and functionalities between software applications.

What is an example of an interface? ›

Methods form the object's interface with the outside world; the buttons on the front of your television set, for example, are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to turn the television on and off.

What is an example of an API in real time? ›

Real-Time API Examples

Google Maps API: The Google Maps API provides real-time location data for applications, such as ride-sharing services, food delivery apps, and location-based games.

What is an API in one sentence? ›

APIs, or application programming interfaces, operate like open-source data systems that others can integrate into their own apps.

What is rest API with example? ›

REST APIs communicate through HTTP requests to perform standard database functions like creating, reading, updating and deleting records (also known as CRUD) within a resource. For example, a REST API would use a GET request to retrieve a record. A POST request creates a new record.

Top Articles
Here's the Right Temperature to Set Your Air Conditioning This Summer to Save Money
Investing made easy
Katie Pavlich Bikini Photos
Gamevault Agent
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Free Atm For Emerald Card Near Me
Craigslist Mexico Cancun
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Doby's Funeral Home Obituaries
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Select Truck Greensboro
Things To Do In Atlanta Tomorrow Night
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Craigslist In Flagstaff
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Testberichte zu E-Bikes & Fahrrädern von PROPHETE.
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Walgreens Alma School And Dynamite
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Dmv In Anoka
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Rogold Extension
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Weekly Math Review Q4 3
Facebook Marketplace Marrero La
Nobodyhome.tv Reddit
Topos De Bolos Engraçados
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hampton In And Suites Near Me
Stoughton Commuter Rail Schedule
Bedbathandbeyond Flemington Nj
Free Carnival-themed Google Slides & PowerPoint templates
Otter Bustr
Selly Medaline
Latest Posts
Article information

Author: Rev. Porsche Oberbrunner

Last Updated:

Views: 6573

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Rev. Porsche Oberbrunner

Birthday: 1994-06-25

Address: Suite 153 582 Lubowitz Walks, Port Alfredoborough, IN 72879-2838

Phone: +128413562823324

Job: IT Strategist

Hobby: Video gaming, Basketball, Web surfing, Book restoration, Jogging, Shooting, Fishing

Introduction: My name is Rev. Porsche Oberbrunner, I am a zany, graceful, talented, witty, determined, shiny, enchanting person who loves writing and wants to share my knowledge and understanding with you.