Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Pricing

from $1.99 / 1,000 ads

Go to Apify Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

Scrape the Facebook Ads Library by keyword, Page ID, or Ad Library URL. Export ad copy, call to action, landing URL, publisher platforms, collation count, and how many days each ad has been running.

Pricing

from $1.99 / 1,000 ads

Rating

0.0

(0)

Developer

Andrej Kiva

Andrej Kiva

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Share

Public competitor ads from the Meta Ad Library: Facebook, Instagram, Messenger, and other placements that appear in one search. No Facebook login.

This Facebook Ads Library Scraper searches by keyword, advertiser Page ID, or a pasted Ad Library URL and returns ad copy, the call to action, landing URL, creative format, publisher platforms, how many variants are running together, and how many days the ad has been active.

Meta Ad LibraryTikTok top ads
Facebook Ads Library Scraper ◄── you are hereTikTok Ads Scraper

When to use it

Use this Actor when you need a repeatable export of ads a brand is running in a country: creative tests, landing pages, and which ads have stayed up the longest.

Skip it for Facebook Marketplace listings, profile posts, or ad-account metrics from Ads Manager. This Actor reads the public Ad Library only. Marketplace classifieds are Facebook Marketplace Scraper. TikTok Creative Center top ads are TikTok Ads Scraper.

Key features

  • Keyword search and exact advertiser Page ID search
  • Pasted Ad Library URLs keep that URL's country and filters
  • Active, inactive, or both, plus political, housing, employment, and credit slices
  • Image, video, meme, or text-only media filter
  • Days running, variant count (collationCount), and an isScaled flag when an ad has two or more collated variants
  • About 30 ads from the first page; raise maxAds to paginate, up to 1,000 per query
  • JSON dataset for Python, Node.js, cURL, and MCP

Input

FieldRequiredDefaultWhat it does
queriesyesnikeKeyword, numeric Page ID, or Ad Library URL. One search per entry.
countrynoUSISO country when the query is not a full URL.
activeStatusnoactiveactive, inactive, or all.
adTypenoallall, political, housing, employment, or credit.
mediaTypenoallall, image, video, meme, or none.
maxAdsno30Cap per query. Values above 30 paginate.
proxyConfigurationnoApify datacenterOn by default. The library often returns an empty page without a proxy. Use residential if pagination stops early.
{
"queries": ["nike", "89516513179"],
"country": "US",
"activeStatus": "active",
"mediaType": "all",
"maxAds": 50
}

A full Ad Library URL is also a query. Put it in the JSON array as text; the Actor reads country, q, and view_all_page_id from it.

Output

One dataset row per ad.

FieldMeaning
adArchiveIdAd Library id
pageName, pageId, pageLikeCountAdvertiser page
bodyText, title, linkDescriptionPrimary copy
ctaText, ctaTypeButton label and type
linkUrlLanding URL shown on the ad
displayFormatVIDEO, IMAGE, DCO, CAROUSEL, and similar
imageUrls, videoUrlsCreative media URLs
publisherPlatformsFACEBOOK, INSTAGRAM, MESSENGER, and others
isActiveStill running
collationCount, isScaledHow many variants share a collation; scaled when count is 2 or more
startDate, endDate, daysRunningDelivery window and days from the start date
spendLower, spendUpper, impressionsTextPresent when the Ad Library discloses them (often political or EU ads)
country, querySearch that produced the row
adLibraryUrlAd Library link for that ad id
scrapedAtUTC timestamp
{
"adArchiveId": "925321173274919",
"pageName": "Nordstrom Rack",
"pageId": "89516513179",
"bodyText": "Buy online and pick up in store for free! Get up to 70% off Nike.",
"ctaText": "Learn more",
"displayFormat": "VIDEO",
"publisherPlatforms": ["FACEBOOK", "INSTAGRAM", "MESSENGER"],
"isActive": true,
"collationCount": 2,
"isScaled": true,
"daysRunning": 51,
"startDate": "2026-08-03",
"country": "US",
"query": "nike"
}

Use cases

  • Pull every active ad for a competitor keyword in the US, then sort by daysRunning to see what they kept on.
  • Pass a Page ID on a schedule and diff adArchiveId values to spot new creatives.
  • Filter isScaled rows when you only want ads the advertiser is running in more than one variant.
  • Export landing URLs and CTAs into a sheet for a creative review.

Integration examples

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('crawloop/facebook-ads-library-scraper').call({
queries: ['nike'],
country: 'US',
maxAds: 50,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items[0].pageName, items[0].daysRunning);

Python

from apify_client import ApifyClient
client = ApifyClient(token="YOUR_APIFY_TOKEN")
run = client.actor("crawloop/facebook-ads-library-scraper").call(run_input={
"queries": ["nike"],
"country": "US",
"maxAds": 50,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["pageName"], item["daysRunning"], item["linkUrl"])

cURL

curl "https://api.apify.com/v2/acts/crawloop~facebook-ads-library-scraper/runs?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"queries":["nike"],"country":"US","maxAds":30}'

MCP and AI assistants

Use this Actor from AI tools via Apify MCP. Connect your Apify account, then call crawloop/facebook-ads-library-scraper.

Example prompts:

  • "Run Facebook Ads Library Scraper for the keyword nike in the US and return the 20 ads with the highest daysRunning."
  • "Scrape active video ads for Page ID 89516513179 and list page name, CTA, and landing URL."
  • "Find Facebook Ads Library ads for the query adidas in DE and summarize which creatives look scaled."
  • "Chain Facebook Ads Library Scraper then TikTok Ads Scraper for nike and compare Meta days-running with TikTok top-ad CTR."

Suite next step

After the Meta Ad Library export, run TikTok Ads Scraper for the same brand to collect Creative Center top ads, CTR score, video URL, and landing page. For Marketplace classifieds instead of ads, use Facebook Marketplace Scraper.

FAQ

Does this need a Facebook login or a Meta developer token?
No. It reads the public Ad Library while logged out.

Why do some ads have no spend or impressions?
The Ad Library shows spend and reach ranges mainly for political ads and for ads delivered in the EU. Commercial US ads often leave those fields empty. Days running and variant count are still filled.

The run saved about 30 ads and then failed.
Pagination past the first page can be rate limited on a datacenter IP. Switch the proxy group to residential and rerun with the same maxAds.

Can I monitor new ads?
Run the same Page ID on a schedule and compare adArchiveId to the previous dataset. This Actor does not keep a private diff store.

Is this Facebook Marketplace?
No. Marketplace listings are a different product. Use Facebook Marketplace Scraper for those. This Actor is only the Ads Library.