API stands for application programming interface, which is the intermediary code that allows applications to talk to each other. All major ad platforms have APIs, and with a little know-how, you can write pieces of code that will help you manage your advertising better.
On most platforms, APIs automate certain processes that you’d otherwise have to do manually. On Facebook, however, the API functions a little differently and is more powerful because it contains features that you simply can’t access via the Facebook Ads interface.
Without coding experience, API documentation can be difficult to understand. Keeping that in mind, let’s take a look at the parts of Facebook Ads that are only accessible via API — and discuss when it might be worth diving into them.
When you’re searching for interested audiences in the Facebook Ads interface, you’re directly querying Facebook’s Targeting Search API.
Given a collection of letters or words, this API will return a list of “interest audiences” that match your query. For example, if you start typing a word like car into the interest audience search bar inside an ad set, you’ll see results like car racing, car rentals, and electric cars.
But there’s more to it: Facebook Ads only lets you see 25 interest audiences for any search. This isn’t because the Targeting Search API only returns 25 audiences; it’s because Ads Manager artificially limits what you see to the first 25 results.
This is particularly limiting if you are trying to:
If you query the API directly instead, you see every interest audience that’s relevant to your search. From here, you can simply add these to your ad sets.
If you’re interested in learning more about interest audience searches, here’s the relevant API document.
If you’re advertising a product where LTV is important, then you likely know the factors that influence LTV. You might know, for instance, that women using your brand have a 20% higher LTV than men, or that LTV increases steadily with user age.
While this is good contextual information, it can be difficult to translate into actionable strategy. You might be tempted to take advantage of it by creating different campaigns for each age and gender combination, working toward a different CPA for each. This would be highly complex to manage though, not to mention the small size of each campaign will limit how much you learn.
A better solution is to use Facebook’s bid modifiers API. This lets you run a single ad set targeting any audience you want — all while working to different CPA targets for each segment.
As a basic example, you might run an ad set targeting males and females, working towards a CPA target of $10. If I happened to know that females had a 20% higher LTV, I could apply a +20% bid modifier to females, and effectively work towards a $12 CPA for them. This lets you work towards different LTVs for different audience segments, without having to fragment your campaign.
The bid modifier API has been around for more than a year, but is still in closed beta phase. You can reach out to your Facebook rep if you’re interested in getting access.
Facebook’s experimentation tools have come a long way in recent years. The experiments tab within Ads Manager now allows for complex, multi-cell tests, both with and without holdout groups (otherwise known as lift tests).
Long before these features were available in Ads Manager though, they were accessible via the Facebook API. To this day, there are still some experimentation options that you can only access via the API:
Lastly, we have lookalike audiences. Building your lookalike audiences through the Facebook API gives you two main advantages over building them through Ads Manager’s audience screen:
This can be useful when you’re looking to run broader campaigns (broader than a 10% lookalike), but want to stop short of targeting a whole country. These 20% lookalikes can also be layered on top of specific interest audiences, helping refine your audience without overly restricting volume.
You can find out more on how to take advantage of these two features in the lookalike API docs.
Clearly, there is more to advertising on Facebook than just the Ads Manager platform. While navigating the API and relevant documentation can be a little technical, it can also be very valuable for advertisers. Not every API-only feature will apply to each advertiser, but it’s good to be aware of them when you do run into potential use cases. While some of these features will get built into Ads Manager over time, some of them will likely remain hidden in the API — and only available to advertisers who know where to look.