APIs and API Integration: A Guide for Growth Marketers

LAST UPDATED ON 

API Integration is one of those things that all growth marketers need to work with sometime in their careers. It’s a part of the general skillset of growth marketing.

It may sound technical, but this guide will make it easy for you to understand and work with APIs (short for Application Programming Interfaces but who cares!) and API Integrations as a growth marketer.

Let’s understand API Integration with an example:

Understand API Integration with an Example

Example: Sign up with Google

You can see how many websites let you log in with Google or Facebook or Twitter.

Google API Integration
Google API Integration

When you use the Sign up with Google option, all that’s happening here is someone is telling Google to fetch the data of that user from their account and get that data back to your website.

What is API?

But who is that someone? Who acts as the interface between your website and Google to get this done?

That interface cannot be human so it must be made using programming. And it must be an application, right?

That’s right, that’s why it’s the Application Programming Interface (API).

The API is the one that talks to Google and brings you the data back that you need to create this user’s account.

A developer would write a function that’ll help get the data from Google via the API. A function could look as follows:

function onSignIn(googleUser) {
  var profile = googleUser.getBasicProfile(); // Asking the API to get the user's profile information
  console.log('ID: ' + profile.getId()); 
  console.log('Name: ' + profile.getName());
  console.log('Image URL: ' + profile.getImageUrl());
  console.log('Email: ' + profile.getEmail()); 
}

You don’t need to know how to write this code at all but you need to see it at least once just so you know what’s really happening with this whole API thing!

Companies like Facebook, Google, and Twitter offer many APIs which make data sharing possibilities across social media and communities. This is also how they scale themselves.

How to Use APIs for Growth Marketing

Every platform has a “Developer” website where you can find a list of all the data you can get via their APIs.

Here’s the API Integration reference from Twitter as an example. You’ll be amazed at the possibilities!

To find API references, just go to developer.(platform).com and that should get you the list of data you can fetch via the API. You can then ask your developer to work on the API Integration so you have access to all the data you need. And that’s how to work as a true growth marketer, combining tech and marketing.

Twitter API reference
Twitter API reference

In fact, you’ve probably already used an API before if you’ve set up social sharing on your website or blog. Or even if you’ve embedded a YouTube video on your website!

Why Use API Integrations

Let’s understand with the YouTube example we just mentioned.

You might ask: If I can just copy the code from YouTube, why should I use the API Integration?

youtube API
YouTube API fetch using embed code

The Answer is: You must think like a growth marketer. When you explore possibilities, you will have access to more options, more data, and hence more creative growth marketing hacks and experiments.

Just by looking at the Twitter API reference, you should get many ideas for your growth funnel!

Similarly, you can look at the functions section of any API reference. That’s where you’ll get new ideas as you’ll now be exposed to the possibilities rather than just using the plain vanilla options to which everyone has access.

YouTube API Integration
API functions

See what possibilities open when you see an API’s functions. And you can do this with any platform!

In fact, just looking at the functions on the Twitter API documentation gives me goosebumps!

twitter-api-functions

In fact, I often use OPAPI hacks for my clients which is short for Other People’s APIs – you can come up with great marketing hacks once you know how to leverage them.

Now, I know you’re excited to get started and use Other People’s APIs in your marketing mix.

An Example on How to Use APIs

Let’s start with your first step i.e. IDEATION right now. And we’ll continue using the Twitter API as an example.

Let me share some ideas of how you can use the Twitter API.

First, let’s understand the possible functions on the API reference:

  1. GET: to retrieving data
  2. POST: to create data
  3. PUT: to update data
  4. DELETE: to remove data

We’ll pick the GET function category for some ideas.

Here are some examples of what you can do with this function:

GET members on a Twitter list

GET https://api.twitter.com/1.1/lists/members.json?list_id=1130185227375038465&cursor=-1&skip_status=true

GET followers

GET https://api.twitter.com/1.1/followers/ids.json?cursor=-1&screen_name=andypiper&count=5000

GET mentions in a given timeframe

GET https://api.twitter.com/1.1/statuses/mentions_timeline.json?count=2&since_id=14927799

GET trending topics by location

GET https://api.twitter.com/1.1/trends/available.json

But that’s not it, you can also go through the entire reference library and pick what you want!

Work along with your developer to help you set this up.

To run these commands, you will need:

  • Command prompt terminal
  • Twitter Developer account
  • Ruby & Twurl
  • An API key
  • A connection between account and your Twitter app

Once you start using APIs in your marketing, the possibilities are limitless.

I wish you the best for all your growth marketing experiments using APIs. More power to you!