What Is an API? Imagine You’re Sitting in a Diner …

Joey Sumi Alight Insights

APIs are an essential part of marketing analytics. They make it possible for marketers to get fast, accurate reporting on all their channels — without being forced to spend hours and hours manually gathering the necessary data. 

The best way to explain what an API is and how it works? With food, of course! Just imagine you’re grabbing lunch at a diner and want to order a burger.  



How APIs Work

But first, let’s look at the technical definition: API stands for Application Programming Interface. An API is a set of protocols that govern how two different applications (or devices) communicate and send data to each other. An API determines what can be shared and how, so you can obtain data without knowing the intricacies of the other application. 

Today, the biggest technology companies in the world — Google, Facebook and others like them — have all created web-based APIs as a convenient way for large numbers of users to access functionality and data from their platforms. For marketers, that data might include reporting on ad campaigns they’re running on those platforms.

To access an API, another platform (like ChannelMix) will create an integration that automates the connection process. Some analytics software will call these integrations “connectors.” 

An API works on a request and response model. You might have heard this referred to as a call.  One application requests data from another, and the second app responds, sending back the requested information almost instantly. (Ideally, at least. But we’ll get to that in a bit.)

The Diner Theory of APIs

So what does this have to do with getting a burger? 

Imagine the API as a waitress in a diner. She comes to your table and takes your order for a hamburger with lettuce, tomato and onion. Then she disappears into the kitchen and eventually brings back what you wanted. 

This is an example of “abstraction of functionality,” one of the reasons why APIs work so well. You can request something (like data or a burger) without knowing all of the inner workings of the application that provided it to you. 

You have no idea exactly what happens inside the kitchen. Maybe the waitress repeated exactly what you said; maybe she told the cook to burn one, take it through the garden and pin a rose on it. Maybe they went next door and bought your hamburger from Wendy’s. Who knows, they could have used sorcery to conjure your burger from the very ether.

You don’t know! But it doesn’t really matter. All that matters is you didn’t have to go back there and make the burger yourself.

The same is true for APIs. You don’t need to know if Facebook has suddenly started using Pig Latin as its programming language of choice. The API lets you simply say, “Facebook, gimme the report.”


BLOG: What Is Data Aggregation? A Quick-Start Guide for Marketing Teams


The Benefit of Using APIs

APIs are especially helpful for cross-channel reporting. A software platform can use APIs to get data from multiple sources and bring that data together in a single report, like a dashboard that shows the latest results from all your paid media in one view. 

Thanks to APIs, that report can be updated on a regular basis — daily in most cases — giving you the insight you need to spend your marketing dollars more efficiently in near real time. 

If you don’t have a way to automate that process, reporting becomes a manual slog. You would have to log into the individual data sources’ platforms, export a report in spreadsheet form and then cut-and-paste the individual reports together. And that’s just a time-consuming and error-prone way to do things. 

Why APIs Don’t Always Work as Intended

APIs aren’t foolproof. Sometimes you make a request, but don’t get a response. 

A request might fail because the application’s servers are down or overwhelmed because every human being in your hemisphere is asking for something at the same time. (Too many customers in the diner!)

If a request is taking too long because it’s requesting a large amount of data, it could be timed out by a client application or server. (Maybe the cook’s on a break?) 

Failures also can happen because there’s been an update to the API and your request doesn’t fit with the new protocol. One of the fields in your report might have had its name changed, or it could have been deprecated entirely. 

(That’s one benefit of working with us — we have teams that monitor and respond to these kinds of changes, which aren’t always announced ahead of time.)

APIs also don’t always deliver data in a format that’s ready to analyze. For some marketing teams, that’s not a big deal — they want that raw stream of data. 

Others may need to transform the data so that it’s easier to understand and study. 

For example: Let’s say you want to know how many email events, like opens or bounces, you had during a particular week. But your email platform’s API doesn’t report the totals that you need — it only shows events on an event-by-event basis.

In a case like that, our platform can automatically add up all the events for you and add that metric to your report, so you’ve got the information you need at a quick glance.

Alternatives to APIs

One other word of caution about APIs: They don’t always include all the data that you might see if you logged into an advertising platform and viewed a report through its dashboard. Because … well, that’s just how they decided to build the API. 

In cases like that, it might not make sense to use an API to access your marketing data. Instead, we’ll set up an automated process where a report is downloaded as a spreadsheet from the source platform (including all the data you’d normally get through the platform’s online dashboard) and sent via secure FTP or email to ChannelMix. 

Faster Data, Better Decisions

A lot of work goes into researching APIs and building integrations with them, but our team really enjoys these projects — partly because we know how important they are to the marketers who rely on them. 

The faster you can access your data, the faster you can make better decisions about marketing strategy. APIs are one of the best tools for making that possible!

Save Hundreds of Hours on Campaign Reporting and Data Prep

Alight’s end-to-end analytics solutions enable marketers to spend less time on manual data aggregation and more time creating valuable insight. Schedule a free solution consultation with our team!