Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Pricing

from $0.50 / 1,000 results

Go to Apify Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

Scrape public Facebook and Instagram ads from Meta Ad Library by keyword or by pasting an Ad Library search URL. Filter by country, status, category, format, platform, and date, and optionally enrich each ad with full details. No Facebook login or Meta API key required.

Pricing

from $0.50 / 1,000 results

Rating

5.0

(1)

Developer

The Netaji

The Netaji

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

4

Monthly active users

15 days ago

Last modified

Share

Search Meta Ad Library by keyword, URL, or advertiser Page and save public Facebook and Instagram ads as structured records.

I built Meta Ads Scraper as a research workbench rather than a single rigid query. The same Actor can begin with a market term, reproduce a useful Ad Library URL, or focus on an advertiser Page; filters and optional detail enrichment shape what happens next.

Three doors into the Ad Library

Keyword search is useful for category and message research. Ad Library URLs preserve a query assembled in Meta's interface. Page mode focuses the dataset on a known advertiser. Choose the mode that matches the question instead of forcing every project through the same input.

Search by keyword

Set Function to "Search ads", enter a keyword or advertiser name, then narrow results with optional filters.

FieldTypeRequiredDescription
scraperTypestringYesChoose which Meta Ads function this run performs.
qstringNoFor "Search ads": keyword or phrase to search for. For "Find advertiser page": the brand or company name to look up (e.g. Nike). Not used for "Browse page ads".
countrystringNoISO 3166-1 alpha-2 country code to target, e.g. US, IN, GB.
active_statusstringNoReturn all ads, or only currently active or inactive ones.
ad_typestringNoLimit results to a specific ad category, such as political and issue ads.
search_typestringNoHow to match your search query: keywords in any order, or the exact phrase.
media_typestringNoLimit results to a creative format: images, videos, or memes.
publisher_platformsarrayNoOnly include ads shown on the selected Meta platforms.
date_minstringNoOnly include ads active on or after this date (YYYY-MM-DD).
date_maxstringNoOnly include ads active on or before this date (YYYY-MM-DD).
maxItemsintegerNoMaximum number of results to return. Set 0 for no limit.
enrichAdDetailsbooleanNoFetch full details for every returned ad (one extra request per ad — slower and billed as an ad-details enrichment). Leave off for fast, lightweight runs.

Start from an Ad Library URL

Paste a Meta Ad Library search URL into Start URL and its filters are applied automatically.

FieldTypeRequiredDescription
startUrlstringNoOptional shortcut: paste a Meta Ad Library search URL (https://www.facebook.com/ads/library/?...) and its filters (query, country, ad type, media type, and more) are read from it automatically. Anything you set below overrides the URL.
maxItemsintegerNoMaximum number of results to return. Set 0 for no limit.
enrichAdDetailsbooleanNoFetch full details for every returned ad (one extra request per ad — slower and billed as an ad-details enrichment). Leave off for fast, lightweight runs.

Browse page ads

Set Function to "Browse page ads" and provide a Page ID to scrape that advertiser's ads.

FieldTypeRequiredDescription
scraperTypestringYesChoose which Meta Ads function this run performs.
page_idstringNoNumeric ID of the advertiser's Facebook Page whose ads you want. Don't know it? Use the "Find advertiser page" mode to look it up by brand name.
countrystringNoISO 3166-1 alpha-2 country code to target, e.g. US, IN, GB.
active_statusstringNoReturn all ads, or only currently active or inactive ones.
media_typestringNoLimit results to a creative format: images, videos, or memes.
publisher_platformsarrayNoOnly include ads shown on the selected Meta platforms.
date_minstringNoOnly include ads active on or after this date (YYYY-MM-DD).
date_maxstringNoOnly include ads active on or before this date (YYYY-MM-DD).
maxItemsintegerNoMaximum number of results to return. Set 0 for no limit.
enrichAdDetailsbooleanNoFetch full details for every returned ad (one extra request per ad — slower and billed as an ad-details enrichment). Leave off for fast, lightweight runs.

Find advertiser page

Set Function to "Find advertiser page" and enter a brand or company name to get matching Pages and their Page IDs.

FieldTypeRequiredDescription
scraperTypestringYesChoose which Meta Ads function this run performs.
qstringNoFor "Search ads": keyword or phrase to search for. For "Find advertiser page": the brand or company name to look up (e.g. Nike). Not used for "Browse page ads".
countrystringNoISO 3166-1 alpha-2 country code to target, e.g. US, IN, GB.
ad_typestringNoLimit results to a specific ad category, such as political and issue ads.
maxItemsintegerNoMaximum number of results to return. Set 0 for no limit.

Example category scan

{
"scraperType": "search",
"q": "running shoes",
"country": "US",
"active_status": "all",
"maxItems": 50,
"enrichAdDetails": false
}

Creative, advertiser, delivery, and transparency fields

The result schema separates ad identity from advertiser context, creative assets, delivery timing, platforms, and transparency information. Detail enrichment belongs on runs where those additional fields justify the extra processing.

📦 Ad identity

FieldTypeDescription
ad_archive_idstringUnique ID of the ad in the Meta Ad Library.
page_idstringNumeric ID of the advertiser's Facebook Page.
page_namestringName of the advertiser's Facebook Page.

📊 Ad status and performance

FieldTypeDescription
is_activebooleanWhether the ad is currently running.
start_datenumberUnix timestamp when the ad started running.
end_datenumberUnix timestamp when the ad stopped running (0 if still active).
publisher_platformarrayMeta platforms the ad ran on (Facebook, Instagram, etc.).
spendstringEstimated spend range for the ad, when available.
reach_estimatestringEstimated audience reach for the ad, when available.

🔍 Creative and enrichment

FieldTypeDescription
snapshotobjectAd creative: body text, title, call to action, images, videos, and link.
detailsobjectFull ad details, present only when 'Enrich with ad details' is enabled.

🏢 Matching pages

FieldTypeDescription
pageIdstringFacebook Page ID of a matching advertiser.
namestringName of the matching advertiser Page.
categorystringFacebook category of the advertiser Page.
likesnumberNumber of likes on the advertiser Page.
verificationstringVerification status of the advertiser Page.
instagramUsernamestringLinked Instagram username of the advertiser, if any.

Shortened ad record

{
"ad_archive_id": "123456789012345",
"page_id": "102988293558",
"page_name": "Nike",
"is_active": true,
"start_date": 1704067200,
"publisher_platform": [
"FACEBOOK",
"INSTAGRAM"
]
}

Research patterns worth saving

  • Re-run the same market query to observe changes in active creative.
  • Compare advertiser Pages with the same country and status filters.
  • Archive copy and media references before coding themes or formats.

Cost follows result count and detail depth

This Actor uses Apify pay-per-result pricing. You are charged for successful dataset results according to the Actor pricing shown on the Apify Pricing tab. Single-result modes return one dataset item, while search and page modes can return many items.

Apify's free credits may cover small test runs and up to the free result allowance configured for the Actor.

Use the max item limit before large runs so you can control spend while testing keywords, countries, and advertiser pages.

Public advertising data and lawful use

This Actor extracts publicly available information from Meta Ad Library pages and related public ad transparency data. It does not require a Facebook login and should not be used to collect private user data. Your results may still contain personal data or regulated advertising information, so make sure your use case complies with GDPR, other privacy laws, Meta terms, and your own legal obligations. If you are unsure, consult a qualified lawyer.

Run this Actor from code

Python

from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_API_TOKEN")
run = client.actor("thenetaji/meta-facebook-ads-scraper").call(run_input={
"scraperType": "search",
"q": "running shoes",
"country": "US",
"active_status": "all",
"maxItems": 50,
"enrichAdDetails": false
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

Node.js

import { ApifyClient } from "apify-client";
const client = new ApifyClient({ token: "YOUR_APIFY_API_TOKEN" });
const run = await client.actor("thenetaji/meta-facebook-ads-scraper").call({
"scraperType": "search",
"q": "running shoes",
"country": "US",
"active_status": "all",
"maxItems": 50,
"enrichAdDetails": false
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Connect ad research to company and content analysis

  • LinkedIn Company Scraper — Fetch full public LinkedIn company page details — industry, size, headquarters, specialties, similar and affiliated pages, and recent updates — for one or more company handles or URLs.
  • LinkedIn Post Scraper — Fetch full public LinkedIn post details — text, author, reactions, comments, and media — for one or more post, activity, or article URLs.
  • Instagram Related Users Scraper — Discover Instagram accounts similar to a given user

Talk to the maintainer

Use the Issues tab on the Actor page for bug reports, missing fields, and feature requests.