Facebook Ad Library scraper: build a competitor ad tracker

Updated

A Facebook Ad Library scraper reads the public Meta Ad Library to collect active ads, creative files, landing pages and start dates across Facebook and Instagram, including commercial ads outside the EU that Meta’s official API excludes. The useful work happens next: collapse duplicate creative variants, diff against last week’s run to flag new launches and surviving winners, pull EU, UK or Brazil reach on top ads, and export a ranked CSV. Bridgly runs every step on one API key with no Meta developer app, and 1,000 ads plus 100 full ad detail lookups cost $1.83 to $2.20.

Get 100 free credits with a business email, no card required. That is enough to run the tracker below on a small competitor list and inspect your first ranked swipe file.

Most tutorials on scraping the Facebook Ad Library stop at dumping one page of ads for a keyword. A performance team, agency or creative strategist needs more than a raw export: which ads have survived past day 30, which creatives a competitor is duplicating across ad sets, which tests launched this week, and where those ads send traffic. This guide builds that tracker in one TypeScript script. It resolves brand names to Meta Page IDs, vets each advertiser, pulls active ads, collapses duplicate creative runs, enriches the longest-running winners with reach and targeting where Meta publishes them, and writes a scored CSV you can refresh on a weekly schedule.

What to read in competitor ads (beyond the copy)

Meta does not publish spend or ROAS for ordinary commercial ads. Instead, experienced media buyers read four public signals in the Ad Library that separate tests killed on day two from ads an advertiser keeps funding:

SignalWhere it lives in the responseWhat it tells you
Longevity (days active)startDate on every adAn ad still running after 30+ days is earning back its spend. An ad that disappears between weekly runs was likely a failed test or a short promo.
Duplicate creative runscollationId and collationCountAdvertisers duplicate winning creatives into multiple ad sets or campaigns. A high collationCount signals budget behind that angle.
Landing page and CTAlinkUrl, ctaText and cardsShows whether a brand sends cold traffic to a product page, a quiz, an advertorial or a bundle offer, and when it changes offers.
EU, UK and Brazil reachtotalReach and targeting on ad detailsFor ads shown in those regions, Meta publishes exact reach plus targeted ages, genders and locations, giving a real read on scale and audience.
Advertiser profileowner, history and adminCountries on advertiser detailsConfirms the legal entity behind a page, flags recent page renames, and reveals the linked Instagram handle for organic comparison.

Ways to scrape the Facebook Ad Library

MethodCommercial US/global adsSetupWhat you get
Meta’s official Ad Library APINo (EU-delivered and political ads only)Meta developer app plus identity confirmationText, dates, EU reach, political spend and a rendered ad_snapshot_url rather than media files
Your own Playwright or GraphQL scriptYesHeadless browser, residential proxies and parser upkeepWhatever you parse until Meta changes its GraphQL payloads or blocks the IP pool
No-code Actors, such as ApifyYesApify account and Actor input URLsBatch dataset exports to JSON, CSV or Excel on a schedule
Ad spy apps, such as ForeplayYes, from their own databaseMonthly subscriptionVisual swipe-file app, saved history, transcripts and a credit-based API
Social data APIs, such as Bridgly, ScrapeCreators and SearchApiYesOne API key, no Meta login or developer appLive JSON in your own code: ads, media file URLs, reach and advertiser details

The biggest surprise for developers new to the Ad Library is Meta’s official Ad Library API (ads_archive). It is free, but it only returns ads about social issues, elections or politics alongside ads delivered inside the European Union. Commercial ads running strictly in the United States, Canada or Australia do not come back, and creative assets arrive as an ad_snapshot_url preview link rather than direct image or video URLs. Every commercial Facebook Ad Library scraper reads the public Ad Library web interface instead.

What Meta shows to any Ad Library scraper

Some limits come from Meta itself, so they apply to Bridgly and every other scraper. Plan for them before building dashboards or alerts on top of the data:

  • No spend or impressions for commercial ads. Meta publishes spend, impressions and reachEstimate only for ads about social issues, elections or politics. For commercial brands, longevity (startDate) and variant count (collationCount) are the strongest public signals.
  • Reach and targeting are regional. totalReach, reachBreakdown and targeting (ages, genders, locations) come back on ad details only for ads shown in the EU, the UK or Brazil. Searching GB or an EU country gives you reach data for international brands that run in both Europe and the US.
  • One creative can appear dozens of times. Advertisers test the same video across multiple ad sets, creating separate Ad Library entries that share a collationId. Collapse duplicates by collationId, as the script below does, or your CSV will repeat the same ad twenty times.
  • Carousel and catalog copy lives inside cards. Dynamic creative (DCO) and product catalog (DPA) ads often leave top-level title or body empty and place each card’s headline, text, link and image inside cards, with rotated copy inside textVariations.
  • Recent sorting is approximate. Meta’s Ad Library does not return ads in strict chronological order when sorted by recent. Check startDate in your own code when ranking fresh launches.
  • Media links expire. Image and video URLs served by Meta’s CDN carry signed tokens that expire over time. If you are building a permanent swipe file, download the files for the winning ads you want to keep.

The workflow: resolve, vet, pull, dedupe, enrich, score

  1. Search advertisers by brand name to resolve each competitor to its numeric Facebook Page ID, with likes, category and linked Instagram username.
  2. Fetch advertiser details once per brand for its total Ad Library count, confirmed legal owner, page creation and rename history, and admin countries.
  3. Pull every active ad for each Page ID with pagination: true, filtered by country and activeStatus: "active".
  4. Collapse duplicate creative copies by collationId, calculate how many days each creative has stayed live, and compare against seen-ads.txt to label every ad as new, testing or winner (30+ days) while counting stopped tests.
  5. Open full ad details only for the top long-running ads per brand (>= 14 days, capped at 10 per competitor) to add EU, UK or Brazil reach and audience targeting without spending credits on day-one tests.
  6. Score every active creative with readable reasons, write competitor-ads.csv ranked highest first, and save seen-ads.txt for next week’s diff.

Set up

You need Node.js and a Bridgly API key. Create a free account, copy a key from the dashboard, and install the TypeScript SDK:

bash
npm install @bridgly/sdk
npm install --save-dev tsx
export BRIDGLY_API_KEY=bgly_...

The script

Save this as ad-tracker.mts, replace COMPETITORS and COUNTRY at the top with the brands and market you care about, and run npx tsx ad-tracker.mts. It writes competitor-ads.csv with one row per unique active creative, best first, and updates seen-ads.txt so the next run highlights new launches and retired tests.

TypeScript
// ad-tracker.mts
// Run: npx tsx ad-tracker.mts
import {
type ApiResult,
Bridgly,
type MetaAdsGetAdDetailsResponse,
type MetaAdsGetCompanyResponse,
type MetaAdsSearchResponse,
} from '@bridgly/sdk';
import { readFile, writeFile } from 'node:fs/promises';
type MetaAd = MetaAdsSearchResponse['data']['ads'][number];
type AdDetails = MetaAdsGetAdDetailsResponse['data'];
type Advertiser = MetaAdsGetCompanyResponse['data'];
type AdStatus = 'new' | 'testing' | 'winner';
type Competitor = {
brand: string;
pageId: string;
advertiser: Advertiser | null;
ads: MetaAd[];
};
type Signal = { hit: boolean; points: number; reason: string };
type TrackedAd = {
brand: string;
ad: MetaAd;
advertiser: Advertiser | null;
details: AdDetails | null;
daysActive: number;
status: AdStatus;
score: number;
reasons: string[];
};
// Brands you want to watch. Change these to match your category.
const COMPETITORS = ['Allbirds', 'Hoka', 'On Running'];
const COUNTRY = 'GB';
const MAX_ADS_PER_BRAND = 150;
const WINNER_DAYS = 30;
const ENRICH_MIN_DAYS = 14;
const MAX_ENRICH_PER_BRAND = 10;
const SEEN_FILE = 'seen-ads.txt';
const DAY_MS = 24 * 60 * 60 * 1000;
const client = new Bridgly({ apiKey: process.env.BRIDGLY_API_KEY ?? '' });
/** Ad ids seen on the previous run, one per line. */
async function readSeenIds(): Promise<Set<string>> {
const text = await readFile(SEEN_FILE, 'utf8').catch(() => '');
return new Set(text.split('\n').filter((line) => line !== ''));
}
/** Days since an ad started running, or 0 when Meta leaves startDate empty. */
function daysRunning(ad: MetaAd): number {
const started = Date.parse(ad.startDate ?? '');
if (Number.isNaN(started)) return 0;
return Math.max(0, Math.floor((Date.now() - started) / DAY_MS));
}
/**
* Collapses duplicate creative runs that share a collationId, keeping the
* longest-running copy with the highest variant count.
*/
function dedupeCreatives(ads: MetaAd[]): MetaAd[] {
const oldestFirst = ads.toSorted(
(a, b) =>
daysRunning(b) - daysRunning(a) ||
(b.collationCount ?? 1) - (a.collationCount ?? 1),
);
return [
...new Map(
oldestFirst.toReversed().map((ad) => [ad.collationId ?? ad.id, ad]),
).values(),
];
}
/** First playable video or display image link on an ad. */
function primaryMediaUrl(ad: MetaAd): string {
const video = ad.videos.at(0);
if (video?.hdUrl != null) return video.hdUrl;
if (video?.sdUrl != null) return video.sdUrl;
const image = ad.images.at(0);
if (image != null) return image;
const card = ad.cards.at(0);
return card?.video?.hdUrl ?? card?.imageUrl ?? '';
}
/** Main copy and destination link, falling back to the first carousel card. */
function adCopy(ad: MetaAd): { headline: string; body: string; link: string } {
const card = ad.cards.at(0);
return {
headline: ad.title ?? card?.title ?? '',
body: ad.body ?? card?.body ?? '',
link: ad.linkUrl ?? card?.linkUrl ?? '',
};
}
/** Labels an active ad based on its longevity and whether it is new this week. */
function statusOf({
ad,
daysActive,
seenIds,
}: {
ad: MetaAd;
daysActive: number;
seenIds: Set<string>;
}): AdStatus {
if (!seenIds.has(ad.id)) return 'new';
if (daysActive >= WINNER_DAYS) return 'winner';
return 'testing';
}
/** Scores an ad and keeps the reasons, so a strategist sees why it ranks high. */
function scoreAd({
ad,
details,
daysActive,
}: {
ad: MetaAd;
details: AdDetails | null;
daysActive: number;
}): Pick<TrackedAd, 'score' | 'reasons'> {
const variants = ad.collationCount ?? 1;
const reach = details?.totalReach ?? 0;
const signals: Signal[] = [
{
hit: daysActive >= WINNER_DAYS,
points: 3,
reason: `active ${daysActive} days`,
},
{
hit: daysActive >= ENRICH_MIN_DAYS && daysActive < WINNER_DAYS,
points: 1,
reason: `active ${daysActive} days`,
},
{
hit: variants >= 3,
points: 2,
reason: `${variants} creative variants`,
},
{
hit: ad.platforms.length >= 3,
points: 1,
reason: `${ad.platforms.length} placements`,
},
{
hit: ad.videos.length > 0,
points: 1,
reason: 'video creative',
},
{
hit: reach >= 50_000,
points: 2,
reason: `${reach.toLocaleString('en-US')} EU/UK/BR reach`,
},
];
const hits = signals.filter((signal) => signal.hit);
return {
score: hits.reduce((sum, signal) => sum + signal.points, 0),
reasons: hits.map((signal) => signal.reason),
};
}
/** Resolves a brand name to its Meta Page ID, advertiser info and active ads. */
async function collectCompetitor(brand: string): Promise<{
competitor: Competitor | null;
calls: ApiResult<unknown>[];
}> {
const found = await client.metaAds.searchCompanies({
q: brand,
country: COUNTRY,
});
const match = found.type === 'success' ? found.data.companies.at(0) : null;
if (match == null) return { competitor: null, calls: [found] };
const [companyRes, adsRes] = await Promise.all([
client.metaAds.getCompany({ pageId: match.id }),
client.metaAds.search({
pageId: match.id,
country: COUNTRY,
activeStatus: 'active',
count: MAX_ADS_PER_BRAND,
pagination: true,
}),
]);
const ads = adsRes.type === 'success' ? dedupeCreatives(adsRes.data.ads) : [];
return {
competitor: {
brand,
pageId: match.id,
advertiser: companyRes.type === 'success' ? companyRes.data : null,
ads,
},
calls: [found, companyRes, adsRes],
};
}
/** Opens full ad details only for the top long-running ads of each brand. */
async function enrichWinners({
competitor,
seenIds,
}: {
competitor: Competitor;
seenIds: Set<string>;
}): Promise<{ tracked: TrackedAd[]; calls: ApiResult<unknown>[] }> {
const candidates = competitor.ads
.filter((ad) => daysRunning(ad) >= ENRICH_MIN_DAYS)
.toSorted((a, b) => daysRunning(b) - daysRunning(a))
.slice(0, MAX_ENRICH_PER_BRAND);
const detailCalls = await Promise.all(
candidates.map(async (ad) => ({
id: ad.id,
result: await client.metaAds.getAdDetails({ adId: ad.id }),
})),
);
const detailsById = new Map(
detailCalls.flatMap(({ id, result }): [string, AdDetails][] =>
result.type === 'success' ? [[id, result.data]] : [],
),
);
const tracked: TrackedAd[] = competitor.ads.map((ad) => {
const daysActive = daysRunning(ad);
const details = detailsById.get(ad.id) ?? null;
const status = statusOf({ ad, daysActive, seenIds });
const scored = scoreAd({ ad, details, daysActive });
return {
brand: competitor.brand,
ad,
advertiser: competitor.advertiser,
details,
daysActive,
status,
...scored,
};
});
return { tracked, calls: detailCalls.map(({ result }) => result) };
}
/** Formats targeting ages when Meta publishes them, e.g. "18-65". */
function targetAges(details: AdDetails | null): string {
const targeting = details?.targeting;
if (targeting?.ageMin == null && targeting?.ageMax == null) return '';
return `${targeting.ageMin ?? ''}-${targeting.ageMax ?? ''}`;
}
/** Credits spent across a set of calls. Failed calls cost nothing. */
function creditsOf(results: ApiResult<unknown>[]): number {
return results.reduce(
(sum, result) => sum + (result.type === 'success' ? result.creditsCost : 0),
0,
);
}
/** Quotes a value so commas, quotes and line breaks stay in one cell. */
function csvCell(value: string | number): string {
return `"${String(value).replaceAll('"', '""')}"`;
}
/** One CSV row per unique active creative. */
function toRow(item: TrackedAd): (string | number)[] {
const { ad, advertiser, details } = item;
const copy = adCopy(ad);
return [
item.score,
item.status,
item.brand,
ad.startDate ?? '',
item.daysActive,
ad.collationCount ?? 1,
ad.displayFormat ?? '',
ad.platforms.join('; '),
copy.headline,
copy.body.slice(0, 280),
ad.ctaText ?? '',
copy.link,
primaryMediaUrl(ad),
details?.totalReach ?? '',
targetAges(details),
details?.targeting?.gender ?? '',
advertiser?.owner?.name ?? '',
advertiser?.instagramUsername ?? '',
item.reasons.join('; '),
ad.url,
];
}
const HEADER = [
'score',
'status',
'brand',
'startDate',
'daysActive',
'variants',
'format',
'platforms',
'headline',
'bodyPreview',
'cta',
'landingPage',
'mediaUrl',
'reach',
'targetAges',
'targetGender',
'confirmedOwner',
'instagram',
'reasons',
'adLibraryUrl',
];
// 1. Load last week's ad ids so we can flag new launches and stopped tests.
const seenIds = await readSeenIds();
// 2. Resolve each competitor page, fetch advertiser info and pull active ads.
const collected = await Promise.all(COMPETITORS.map(collectCompetitor));
const competitors = collected.flatMap(({ competitor }) =>
competitor == null ? [] : [competitor],
);
// 3. Open full ad details on the longest-running creatives and score every ad.
const enriched = await Promise.all(
competitors.map((competitor) => enrichWinners({ competitor, seenIds })),
);
const allTracked = enriched
.flatMap(({ tracked }) => tracked)
.toSorted((a, b) => b.score - a.score || b.daysActive - a.daysActive);
const currentIds = new Set(allTracked.map(({ ad }) => ad.id));
const stoppedCount = [...seenIds].filter((id) => !currentIds.has(id)).length;
// 4. Write the swipe-file CSV and save this week's snapshot.
const csv = [
HEADER.join(','),
...allTracked.map((item) => toRow(item).map(csvCell).join(',')),
].join('\n');
await writeFile('competitor-ads.csv', csv);
await writeFile(SEEN_FILE, [...currentIds].join('\n'));
console.table(
allTracked.slice(0, 10).map((item) => ({
brand: item.brand,
status: item.status,
days: item.daysActive,
score: item.score,
headline: adCopy(item.ad).headline.slice(0, 40),
})),
);
console.log(`Active unique creatives: ${allTracked.length}`);
console.log(
`New since last run: ${allTracked.filter((i) => i.status === 'new').length}`,
);
console.log(`Stopped since last run: ${stoppedCount}`);
console.log(
`Credits used: ${creditsOf([
...collected.flatMap(({ calls }) => calls),
...enriched.flatMap(({ calls }) => calls),
])}`,
);

How the script works

Resolve names once, then keep Page IDs. Searching by brand name finds the main Facebook Page automatically, and getCompany adds the confirmed owner and total Ad Library count. Once you confirm each competitor’s exact Page ID (some global brands run separate regional pages), you can hardcode the Page IDs directly and skip the advertiser search step.

Collapse variants before scoring. dedupeCreatives groups ads by collationId ?? ad.id, keeping the longest-running entry and its collationCount. That keeps one creative from crowding the top of your spreadsheet while preserving how many active variations the brand is running.

Enrich winners only. Calling getAdDetails on every active ad is wasteful when half of them launched yesterday. enrichWinners filters to creatives running at least 14 days and caps lookups at 10 per brand, focusing spend on the ads most likely to matter. Setting COUNTRY to GB or an EU country surfaces totalReach and targeting on those lookups; in US, those regional fields stay blank while creative and advertiser fields still populate.

Built-in concurrency and retry handling. Every competitor lookup and detail call runs through Promise.all. The SDK limits concurrent requests per platform to two by default, queues the rest, and retries any 429 response automatically after the requested wait. Rejected requests cost nothing. On Growth or Scale packages, raise maxConcurrency in the client config to match your rate limit.

Free cached re-reads via REST. If you call the REST API directly, every Meta Ads endpoint accepts cacheMaxAgeHours. A page or ad Bridgly fetched within that window comes back from cache at no cost, which helps when multiple teammates or jobs query the same advertisers. See the Meta Ad Library API reference for all cache parameters.

Discover new advertisers by keyword (and cross-check Instagram)

If you do not have a fixed competitor list yet, search the Ad Library by a product keyword, group the active ads by page.id, and keep brands running multiple ads. Because Bridgly uses one key across platforms, the script below also pulls each advertiser’s linked Instagram account through the Instagram user endpoint so you can compare paid ad volume against organic audience size:

TypeScript
// discover-advertisers.mts
// Run: npx tsx discover-advertisers.mts
import { Bridgly } from '@bridgly/sdk';
const client = new Bridgly({ apiKey: process.env.BRIDGLY_API_KEY ?? '' });
const search = await client.metaAds.search({
q: 'running shoes',
country: 'US',
activeStatus: 'active',
count: 90,
pagination: true,
});
if (search.type === 'error') {
throw new Error(`${search.status} ${search.message}`);
}
const pageIds = [
...new Set(
search.data.ads.flatMap((ad) => (ad.page?.id == null ? [] : [ad.page.id])),
),
];
const activeBrands = pageIds
.map((pageId) => ({
pageId,
ads: search.data.ads.filter((ad) => ad.page?.id === pageId),
}))
.filter(({ ads }) => ads.length >= 2)
.toSorted((a, b) => b.ads.length - a.ads.length)
.slice(0, 10);
const rows = await Promise.all(
activeBrands.map(async ({ pageId, ads }) => {
const company = await client.metaAds.getCompany({ pageId });
const handle =
company.type === 'success' ? company.data.instagramUsername : null;
const ig =
handle == null ? null : await client.instagram.getUser({ username: handle });
return {
brand: ads.at(0)?.page?.name ?? pageId,
adsInSearch: ads.length,
totalLibraryAds:
company.type === 'success' ? (company.data.adCount ?? '') : '',
instagram: handle ?? '',
igFollowers: ig?.type === 'success' ? ig.data.followers : '',
};
}),
);
console.table(rows);

Schedule weekly runs or export from the CLI

Run ad-tracker.mts once a week with cron, GitHub Actions or any task scheduler so seen-ads.txt tracks new creative launches and paused tests automatically:

bash
# Every Monday at 08:00, from the folder that holds the script
0 8 * * 1 cd ~/ad-tracker && BRIDGLY_API_KEY=bgly_... npx tsx ad-tracker.mts

For a quick one-off CSV without writing TypeScript, the Bridgly CLI writes a page of up to 30 Ad Library search results straight to disk:

bash
npm install -g @bridgly/cli
bridgly meta-ads search --q "running shoes" --country US \
--active-status active --count 30 --output running-shoes-ads.csv

What a run costs on Bridgly

Ad search costs 1 credit per ad returned, with a minimum of 1 credit per request and up to 30 ads per page. Advertiser search, advertiser details and ad details cost 1 credit per request. Failed and rate-limited requests cost nothing, and every SDK response reports its exact creditsCost.

Here is a worked example of one weekly run across five competitors, each running 100 active ads. Resolving five brands takes 5 credits, vetting five advertisers takes 5 credits, pulling 500 active ads takes 500 credits, and opening full details on the top 10 winners per brand takes 50 credits: 560 credits in total. That is $1.12 on Pay as you go and $0.93 on Scale.

Bridgly tierPrice per 1,000 creditsWeekly 5-brand run (560 credits)1,000 ads + 100 ad details (1,100 credits)Meta Ads requests per minute
Pay as you go, from $5$2.00$1.12$2.2030
Growth, from $50$1.82$1.02$2.00200
Scale, from $300$1.67$0.93$1.831,000

Credits are one-time purchases with no subscription and never expire, so a weekly tracker spending a dollar or two does not require a monthly seat. Rate limits apply per platform, so Meta Ads calls do not slow down lookups on other platforms on the same key. See pricing for every tier.

Bridgly compared with other Facebook Ad Library scrapers

This table prices the same job everywhere: pull 1,000 active commercial ads and open full details for 100 of them. Vendor prices come from each vendor’s own pages, checked on November 29, 2026, in USD.

Option1,000 ads + 100 ad detailsBillingAdvertiser owner & historyGood to know
Bridgly$1.83 to $2.20 (1,000 search ads + 100 detail calls)One-time credits from $5 that never expireYes (getCompany)Live typed JSON, EU/UK/Brazil reach and targeting, no Meta developer app, errors cost nothing.
Apify: Facebook Ads Library ScrapersAbout $0.95 on Curious Coder ($0.75/1K + ~$0.20 usage), or $0.55 to $0.70/1K plus $0.10 to $0.15/1K add-ons on Apify’s own ActorApify plans: free $5/mo usage, then Starter at $19/mo (unused credit expires monthly)Page transparency add-on on Apify’s Actor; not listed on Curious CoderBatch runs with visual scheduling and CSV/Excel exports in the Apify console.
ScrapeCreatorsAbout $0.13 to $0.25 (about 34 search pages at ~30 ads/page + 100 detail calls)100 free credits, then $47 for 25,000 or $497 for 500,000 credits (never expire)Not listedPer-page search billing and video ad transcription included (up to 2 min); returns Meta’s raw payload shape.
SearchApiAbout $0.28 to $0.56 (about 40 search pages at ~25 ads/page + 100 detail calls)100 free requests, then monthly plans from $40/mo for 10,000 searchesYes (meta_ad_library_page_info)Closest API match on advertiser ownership and EU reach; monthly subscription required after the trial.
Foreplay1,000 of 10,000 monthly API credits (from its indexed database)Plans at $59/mo (Basic), $175/mo (Workflow with Spyder) and $459/mo (Agency); extra API credits from $99/mo for 100KNot listedFull visual swipe-file app, historical ad database and video transcripts for creative teams.
Meta Ad Library APIFreeFree (requires Meta developer app and identity check)NoReturns EU-delivered and political ads only, with ad_snapshot_url links instead of media files.

Where the other options are better

  • ScrapeCreators, SearchApi and Apify cost less for bulk ad exports. Because ScrapeCreators and SearchApi bill per search page rather than per ad, and Apify’s Actors price per 1,000 ads below $1, all three are cheaper when you are ingesting tens of thousands of ads into a warehouse. ScrapeCreators also includes video ad transcription, which Bridgly does not currently include.
  • Foreplay is built for creative teams that do not want to maintain scripts. It gives media buyers a visual swipe file, historical ads saved even after an advertiser turns them off, video transcripts and automated Spyder competitor alerts inside a ready-made UI.
  • Apify runs scheduled spreadsheet exports with no code. If your goal is a weekly CSV emailed or pushed into Google Sheets without writing TypeScript, an Apify Actor schedule handles that out of the box.
  • Meta’s official API is free for EU and political research. If your scope is strictly European transparency data or political ad spend, Meta’s Ad Library API costs nothing and comes directly from Meta.

Bridgly fits when Meta Ad Library data feeds code or an AI agent you own, and you want clean, typed JSON covering ads, EU/UK/Brazil reach, and confirmed advertiser ownership with no subscription commitment. Because one key also covers the other social platforms Bridgly supports, the same script can enrich an advertiser’s organic Instagram or social footprint without a second vendor. For a broader breakdown of eight providers across three workloads, read the best Facebook Ad Library APIs compared.

Turn the CSV into creative briefs

  • Study winner rows first, not new rows. New launches tell you what a competitor is testing this week; ads labeled winner that stay active past 30 days with multiple variants tell you what actually converted.
  • Audit the landing page, not only the hook. Open landingPage on top-scoring rows to see whether competitors are running dedicated advertorials, quiz funnels or bundle offers rather than sending paid traffic to a generic homepage.
  • Download winning creatives early. Because Meta CDN media links expire, save the mediaUrl video or image files for any row you add to your team’s swipe file.
  • Watch stopped ads for seasonal shifts. A sudden spike in stoppedCount alongside a wave of new rows usually marks a promo rollover, a new product drop or a fresh creative sprint.

To inspect one brand’s active ads in your browser before running a script, try the free Facebook Ad Library search tool. AI assistants such as Claude and Cursor can run the same searches and advertiser checks directly through the Bridgly MCP server. Browse every Meta Ad Library endpoint to see the full schemas.

Start with 100 free credits and run the tracker against three competitors in your category. When it becomes part of your weekly creative review, compare credit packages for larger lists.

Frequently asked questions

Why can’t I use Meta’s official Ad Library API to scrape commercial US ads?

Meta’s official ads_archive Graph API endpoint returns commercial ads only if they reached users in the European Union, plus ads about social issues, elections or politics from anywhere. Commercial ads running strictly in the US or other non-EU countries are visible on the public Ad Library website, which is what third-party scrapers and APIs read.

How much does it cost to scrape 1,000 Facebook Ad Library ads?

On Bridgly, ad search costs 1 credit per ad returned, so 1,000 ads cost $2.00 on Pay as you go and $1.67 on Scale. Opening full details for 100 top ads adds 100 credits, bringing the combined run to $1.83 to $2.20.

Can a Facebook Ad Library scraper show how much a competitor spends?

Not for ordinary commercial ads. Meta only publishes spend and impression ranges for ads about social issues, elections or politics. For commercial brands, the best public proxies are how long an ad stays active (startDate), how many duplicate variants run under one collationId, and EU, UK or Brazil reach on ad details.

Do I need a Facebook account or Meta developer app to use Bridgly?

No. Every Meta Ad Library request takes only your Bridgly API key and a keyword, Page ID or Ad Library ID. There is no Facebook login, identity verification, Meta developer app or expiring access token to manage.

Does the scraper return Instagram ads as well as Facebook ads?

Yes. The Meta Ad Library covers Facebook, Instagram, Messenger, Audience Network, WhatsApp and Threads. Each ad lists its exact placements in the platforms array, and you can filter search results to specific placements such as ["instagram"].

Why do image and video URLs from the Ad Library stop working later?

Meta signs its CDN media URLs with expiring tokens. They work immediately when scraped, so if you want a permanent creative archive or swipe file, download the image and video files for your winning ads into your own storage during the run.

Is it legal to scrape the Facebook Ad Library?

The Meta Ad Library is a public transparency archive, but Meta’s terms restrict unauthorized automated collection. Collect only the public business data your workflow needs, treat any personal contact details in political disclaimers or owner records in line with GDPR and CCPA, and do not republish copyrighted ad creatives without permission. This is not legal advice.

Can I scrape the Facebook Ad Library without writing code?

Yes. You can run quick searches in the free Facebook Ad Library search tool, export a page straight to CSV with one Bridgly CLI command, or connect the hosted Bridgly MCP server to Claude or Cursor and ask it to pull and summarize competitor ads for you.

Sources

  1. Bridgly API reference: Meta Ad Library search
  2. Bridgly API reference: Meta Ad Library ad details
  3. Bridgly API reference: Meta Ad Library advertiser details
  4. Bridgly docs: rate limits
  5. Meta for Developers: Ad Library API (ads_archive)
  6. Meta for Developers: Archived Ad fields
  7. Apify: Curious Coder Facebook Ads Library Scraper
  8. Apify: official Facebook Ads Scraper
  9. Apify: plans and pricing
  10. ScrapeCreators: Facebook Ad Library API
  11. ScrapeCreators: credit packs and pricing
  12. SearchApi: Meta Ad Library API
  13. SearchApi: plans and pricing
  14. Foreplay: plans and pricing
  15. Foreplay: API and credits

Related

Start pulling data in minutes.

100 free credits on business email, no card needed. Call any endpoint through the API, the TypeScript SDK or MCP.

APIMCPSDKCLI
free credits

On business email signup. No credit card required.

Start free