If there’s one thing that is fast becoming an essential skill for data-driven marketers, it’s knowledge of and ability to work with APIs (Application Programming Interfaces).
And if that term has you running for the hills, I can assure you it’s not as scary or as difficult as it may seem.
Here’s the thing: it’s really hard for most marketers to point to an objective and say, “Aha, this is why I need to learn APIs.”
Sure, we hear those famous stories of successes, such as Airbnb’s growth hack coup that utilized Craigslist’s API.
But what about us mere mortals?
I think I have an answer: reporting. APIs allow apps to talk to one another. Imagine having a new person added to your list in Marketo as soon as you create a lead or contact in Salesforce.
This may not be the business-defining growth rocket ship you’d hoped for, but it’s a start. And you can save yourself a heck of a lot of time by using APIs to do reporting and dashboarding because with APIs you can:
The gist of this post is that I’m going to provide a basic 101 approach to what marketers could benefit from knowing about APIs. I’ll use a few examples that most of us browsing the web will at least have a passing familiarity with.
This post will also provide the background information for your future API explorations, so you feel confident in your knowledge when it’s time to dig deeper.
Here’s what I’m going to cover:
Let’s just cut to the chase. Here’s a simple definition: an API is a method for specifying how services should interact and communicate with web-based applications.
Here’s the best analogy of an API I’ve heard. An API is a waiter at a restaurant. The waiters job is to communicate your order from you, at your table, to the kitchen, where the food is made, and then bring it back to you.
The Waiter (API) takes your order (the request) from your table to the kitchen (the system) and returns with your food (the response).
APIs are most commonly used by developers to design products that use or integrate with a particular service. A good example is Facebook.
If you’re reading this post on your computer, you’ll notice that there’s a little sidebar with social media icons, including Facebook. Well, by clicking on the Facebook icon, you can automatically share a link to this post in your Facebook feed.
This is done via the Facebook API. Share this post, get your hands dirty!
When I was first introduced to APIs, I found it easiest to take a step back and look at the roots of an API. The Client-Server Model is the software architecture that defines your normal web browsing experience.
As a client, your web-browser initiates requests to servers which in turn respond with the information you requested. One of the most basic requests is to display a web-page. This is done using a URL request. This is exactly what happened when you clicked to see this blog post on our website!
APIs work in much the same way as a URL does, so it’s useful to brush up on how a URL works. A URL is made up of a number of parts which allow the client (you) to communicate what information you’d like to retrieve from a server (a website).
Think of URLs the same way as you would the way you organize files on your computer. By referring to a location, such as “/desktop/my-folder/image1.png” you are able to access an image file from a folder on your desktop.
This is where things get interesting for us marketing folk, since it’s one of the simplest use-cases for APIs.
So, just as a URL processes a request where you (the client) ask the website (the server) for a specific web resource like a blog post, an API also requests information. But, APIs can be much more clever. You can request data in an open-ended way, because it’s often not possible to know what specific data is associated with a resource.
To understand how APIs can do this, let’s take a look at an example request URL.
Much like any other URL you may plug into your web-browser, a request URL specifies what type of information you want from a service. Let’s take a look at a breakdown of an example request URL.
I included a few other elements in the above URL image. Here’s an overview of those elements:
To help this all sink in, listen to Nikta Kanuka, our Product Manager for Content and Integrations, breaking it down: