· Sales data · 5 min read

5 Best Meta Ad Library APIs for Competitor Ads (2026)

How to get a competitor's Facebook and Instagram ads by API. Meta's official API leaves most commercial ads out. Here are four APIs that don't, with prices.

Summarize
›In this post · 4 sections
  1. Meta's official Ad Library API
  2. Four APIs that read the Ad Library website
  3. What a company's ads tell you
  4. Get Meta ads in pipe0

In this post, we'll walk you through how to get a company's Facebook and Instagram ads through an API. Companies use these ad APIs to research their competitors: which products they push, which messages they test, and how long a campaign runs. Others use them for inspiration for their own ads, or to see which accounts are spending on paid social right now.

This post compares five APIs. The first is Meta's own, which leaves out most commercial ads. We explain what it returns and where it stops. Then we walk you through four APIs that get you a brand's ads: pipe0, LeadMagic, Adyntel and Apify. We compare what you send them, what comes back and what it costs, so you can pick the one that fits your job. So keep reading.

Meta's official Ad Library API

Meta offers an official API for looking up ads: the Ad Library API. You send it a search term or an advertiser, and it sends back the ads that match.

Meta built the Ad Library API for transparency research, not for marketers. It returns two kinds of ads: ads about social issues, elections or politics, from any country, and ads that reached the European Union. Ads that fall into neither category don't show up.

Even the ads it does return lack what most people want. There are no images or videos, only a link that displays the ad. Additionally, spend is never published.

Access takes a Facebook account that has passed Meta's identity check, a developer account and an app. The ID check can take a few weeks.

Four APIs that read the Ad Library website

Next to the official API, there's an official Ad Library website, run by Meta. Here, anyone can search for the active ads of any advertiser, from any country, commercial ads included.

The third-party APIs in this post get their data from the official Ad Library. Apify and SerpApi say outright that they scrape it.

The official Ad Library finds ads by keyword or by the Facebook Page that ran them, never by company.

So before you pick an API, check what it needs from you. Some take a company's website, such as clay.com, and find its Facebook Page for you. Others need the Page itself, which you look up in the Ad Library by hand. For a few competitors you already know, that is a one-time job.

ServiceYou sendPrice
pipe0Company domainAbout 1.5¢ per ad, plans from $49 a month
LeadMagicCompany domain or nameAbout 2¢ per ad, plans from $99 a month
AdyntelDomain, Page URL or Page IDAbout 0.9¢ per call of 30 ads, plans from $44 a month
ApifyPage or Ad Library URL0.5¢ per ad, plans from $19 a month

pipe0 finds a company's Meta ads from its domain. You run the lookup in a sheet, through the API or from an AI agent, next to pipe0's other company and contact lookups.

The lookup runs on a waterfall and keeps an ad only when its Page name or its landing page ties back to the company. That drops other advertisers' ads. It returns up to 25 ads per company by default, 50 at most, and charges per ad kept. A company with no ads costs nothing.

One contract, used three ways: as a table, as an API and by an agent.

LeadMagic

leadmagic.io

LeadMagic is a B2B data API for work emails, mobile numbers and company data. Its Meta ads search takes a company's domain or name and returns up to 100 ads per request.

It charges one credit per ad returned and nothing when a company runs no ads.

A list goes through a closed box. The rows that come back filled are paid for; the empty one costs nothing.

Adyntel is an API for ad data from Meta, Google, LinkedIn and TikTok. Its Meta endpoint takes a domain, a Facebook Page URL or a Page ID. Each call returns about 30 ads with their text, image and video links, landing pages and dates.

A token pages through the rest, or a webhook receives every ad a company runs. Adyntel charges one credit per call that returns data, which makes it the cheapest per ad here.

A batch of rows goes into a closed box. When the box is done, the filled rows arrive at a second address, not back at the caller.

Apify is a marketplace of web scrapers. Its Facebook Ads Library Scraper takes the Ad Library's own links: a Page, a search, or a results page with filters for country, status, media type and dates.

You get whatever the website shows for that link, and pay per ad scraped. It fits competitor research, where you know the Pages.

A query goes out over many pages of the open web. Three pages match, and each becomes a row of a list.

Notable tools beyond this list

ToolWhat it is
ScrapeCreatorsA social media data API. Takes a Page ID or a company name, about 0.2¢ a request.
SearchAPIA search results API. Takes a keyword or a Page ID, from $40 a month.
SerpApiA search results API. Takes a keyword or a Page ID, from $25 a month.

What a company's ads tell you

A company's ads can be used to analyze a company's acquisition strategies, messages and budget. The start dates of ads also point to how much effort a company puts into experimentation.

When we looked up Notion's ads on December 4, all ten we got back had started in November. The landing page shows which product or market the budget is behind. The count separates a company testing one ad from one running dozens.

The tracking code on a landing page can name the campaign. One of HubSpot's reads BrandStrategy_VideoViews_EN_NAM_NAM_GBC_AnnoyinglyGood-Q4-2026: the goal (video views), the region (North America), the quarter and the theme.

For sales teams, a company running Meta ads is a third-party signal: anyone can see it. Our post on sales signals explains the different types of signals and how to turn them into campaigns.

Google keeps its ads in a separate library. The same question for Google is answered in the Google Ad Library API.

Get Meta ads in pipe0

You can run the Meta ads lookup on a list in a pipe0 sheet (visually), or call it through the API. The request, for one domain:

import { Pipe0 } from "@pipe0/client";

const pipe0 = new Pipe0({ apiKey: process.env.PIPE0_API_KEY });

const result = await pipe0.pipes.pipe({
  config: { environment: "sandbox" },
  pipes: [{ pipe_id: "ads:meta:waterfall@1", config: { limit: 10 } }],
  input: [{ id: "1", company_domain: "hubspot.com" }],
});
console.log(result);
import requests

response = requests.post(
    "https://api.pipe0.com/v1/pipes/run/sync",
    headers={"Authorization": f"Bearer {API_KEY}"},
    json={
        "config": {"environment": "sandbox"},
        "pipes": [{"pipe_id": "ads:meta:waterfall@1", "config": {"limit": 10}}],
        "input": [{"id": "1", "company_domain": "hubspot.com"}],
    },
)
print(response.json())
curl -X POST "https://api.pipe0.com/v1/pipes/run/sync" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "config": { "environment": "sandbox" },
  "pipes": [{ "pipe_id": "ads:meta:waterfall@1", "config": { "limit": 10 } }],
  "input": [{ "id": "1", "company_domain": "hubspot.com" }]
}'

Frequently asked questions

Can I get the ad spend of a brand's Facebook ads?

No. Meta publishes spend and impressions only for ads about social issues, elections or politics, as ranges. For commercial ads it publishes neither, not in the API and not on the Ad Library website. Any spend figure for a brand's Meta ads is an estimate.

How long do ads stay in the Meta Ad Library?

Ads about social issues, elections or politics stay for seven years. Ads delivered in the EU stay for one year after their last impression. Other commercial ads are shown while they run.

Do I need to verify my identity to use the Meta Ad Library API?

Yes. You need a Facebook account that has passed Meta's identity confirmation, a Meta for Developers account and an app that issues the access token. The ID check can take from a few days to a few weeks.

Next-gen enrichment & search.

Build revenue systems that scale. For humans, agents, and apps. Replace tools like Clay, n8n, Hightouch, etc.

selectedRun
InputHDFind work email
NameWork email
Ada ByrneHa.byrne@acme.io
Leo CostaDl.costa@northbeam.co
Mia ChenRunning...
New empty row
Using pipe0 at work?