“I Don’t Know What an API Is, and at This Point I’m Too Afraid to Ask”
Working in an industry that is even remotely technical means acronyms. A lot of them. Most of us have an acronym assertion routine (AAR) that gets us by, and don’t even think twice about it. Hear it once on a podcast? Probably not important. Twice from a peer? Politely ask its meaning. Three times from a guru at a conference? Schedule a 3-hour Wikipedia self-study session this evening.
How Our Big Data Platform and Social Analytics API Work
Sometimes industry acronyms slip into that sweet spot, though, where you’re pretty sure you know what something means…but you definitely wouldn’t pick it for Final Jeopardy. For a lot of people, API has slipped into that crack. For digital marketers, it’s the perfect acronym storm of being proliferate but only recently lexical in the industry, technical but specific only in context, important but not universally applicable.
To get all of us on the same page, and so you don’t have to lie awake at night pondering the existential terror of not really knowing what an API is, let’s go over what an API is in the context of digital marketing, and how you can talk about and use it without feeling like you’re just spouting another buzzword.
At the highest level, an API is an outline on how things work with some software or data. Too high-level? I know. To be honest, I had to get that definition out of the way because API can mean so many things to engineers that I needed somewhere to point when someone inevitably replies, “But an API can also mean blah, blah, blah…”. So, that’s my insurance policy.
It’s also an important caveat to our definition: APIs can be A LOT of things having to do with computers. Be specific when you’re talking about “APIs.” This term can be applied to just about anything.
For digital marketers, when we talk about APIs, we’re usually talking about the interface of some structured data. We hear “API” and “Big Data” spoken about together because, when we want access to some store of really juicy data, we probably need to be familiar with its API to get exactly what we want from it.
To these data stores, API is the language the data speaks to be able to communicate with the rest of the world.
Much as humans use language as a construct to help us categorize, reason about, and make sense of the world around us, so too do complex sets of data. It’s as if big sets of data are humans, with tremendous value, insight, and knowledge–but without language, they have no way to share. In a way, an API is like a language that some provider speaks, and learning that language will allow you to communicate with it.
Of course, not every set of data is the same, so there are lots of different languages to learn. When we say “[some information] is available on Big Social Network’s API,” what we mean is that Big Social Network’s API language has some kind of specific way to ask for some information for the purpose of being able to communicate the information. However, there isn’t one universal way to necessarily ask for that information across all social networks, because the uniqueness of each social network means they need different languages to communicate.
You’re at a coffee shop in another country, and you ask the barista for a coffee in your native language. It’s very possible you will get a quizzical look and no coffee. The reason, obviously, is that they don’t call coffee “coffee” in this country, they call it something else. It’s still coffee, the physical entity you want, but for a reason outside of your control, you can’t ask for it as “coffee.” You must adapt to the language of the country you’re in to be served coffee.
APIs function similarly. When you talk to an API, you’re in its “country.” You must learn the language spoken there to get your data. Once you ask in a way it understands (the “request”), it is very likely to oblige (the “response”).
“How do I actually talk to an API?”
An interaction with an API takes place as one or more network requests. You ask for information via a “query” that specifies exactly what information you want.
A query is like asking for decaf coffee with soy milk: you don’t just want coffee. You want a specific kind of coffee.
That query gets wrapped up in a “request” that is sent off to the API to respond to. The request likely also includes information specifying who you are, and whether you are authorized to order coffee in the first place. All of that info is received by the listening API, which sends you back your coffee exactly how you want it, in the “response”.
“Let’s talk about Jason”
API responses can be a lot of things, but these days you will often see the data you asked for in a format called JSON (yes, it’s actually pronounced “Jason”). I’m not going to get into JSON too much, but it’s worth going over quickly.
When we think of data, we usually think of rows and columns, like how you would look at a table in Excel. The idea behind JSON data is that it eschews table data’s confined dimensions for a format which can have limitless dimensions.
Imagine you want to show some data for social media engagement over time. In Excel, you might structure it as dates on your headers, and then types of engagement as the columns. Each cell, then, represents a type of engagement on a certain date.
But what if you want to show what type of platform each engagement came from on the same table? You have a problem. We want to show another dimension of data, but we’ve run out of dimensions on our table.
JSON solves that. An example JSON blob for a single day, showing all of those dimensions, would look like this:
Don’t worry about fully understanding all the curly brackets and colons. Just know that by delivering data like this, APIs don’t need to worry about how many dimensions the data they want to show takes up.
“So, what’s the point?”
The point of an API is that, by building its own language, you can actually converse with data, instead of being prescribed it. You can ask meaningful questions for your business, instead of hoping that someone else has packaged up an exact subset of data in a consumable way. You and the data you care about are in a meaningful long-term relationship, instead of just shallow one-off dates.
Awesome Things That a Social API Enables
When Simply Measured released our API earlier this year, we were ecstatic. It meant that all the powerful insights inside our databases were now available to YOU, when you want, EXACTLY how you want. Want to know the fine details of everything you’ve done on your social media channels, and how it’s made you money? We finally opened that door.
Leveraging the Simply Measured API, and the API of social media networks you interact with regularly, means leveraging all the information available to you to make better decisions and level up your marketing activities. As new sources of data become available, being able to speak the language of your data will only become more important.
Oh, and API stands for “Application Programming Interface.”