Facebook Ads Library Scraper
Pricing
from $0.50 / 1,000 results
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
Maintained by CommunityActor 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.
| Field | Type | Required | Description |
|---|---|---|---|
scraperType | string | Yes | Choose which Meta Ads function this run performs. |
q | string | No | For "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". |
country | string | No | ISO 3166-1 alpha-2 country code to target, e.g. US, IN, GB. |
active_status | string | No | Return all ads, or only currently active or inactive ones. |
ad_type | string | No | Limit results to a specific ad category, such as political and issue ads. |
search_type | string | No | How to match your search query: keywords in any order, or the exact phrase. |
media_type | string | No | Limit results to a creative format: images, videos, or memes. |
publisher_platforms | array | No | Only include ads shown on the selected Meta platforms. |
date_min | string | No | Only include ads active on or after this date (YYYY-MM-DD). |
date_max | string | No | Only include ads active on or before this date (YYYY-MM-DD). |
maxItems | integer | No | Maximum number of results to return. Set 0 for no limit. |
enrichAdDetails | boolean | No | Fetch 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.
| Field | Type | Required | Description |
|---|---|---|---|
startUrl | string | No | Optional 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. |
maxItems | integer | No | Maximum number of results to return. Set 0 for no limit. |
enrichAdDetails | boolean | No | Fetch 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.
| Field | Type | Required | Description |
|---|---|---|---|
scraperType | string | Yes | Choose which Meta Ads function this run performs. |
page_id | string | No | Numeric 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. |
country | string | No | ISO 3166-1 alpha-2 country code to target, e.g. US, IN, GB. |
active_status | string | No | Return all ads, or only currently active or inactive ones. |
media_type | string | No | Limit results to a creative format: images, videos, or memes. |
publisher_platforms | array | No | Only include ads shown on the selected Meta platforms. |
date_min | string | No | Only include ads active on or after this date (YYYY-MM-DD). |
date_max | string | No | Only include ads active on or before this date (YYYY-MM-DD). |
maxItems | integer | No | Maximum number of results to return. Set 0 for no limit. |
enrichAdDetails | boolean | No | Fetch 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.
| Field | Type | Required | Description |
|---|---|---|---|
scraperType | string | Yes | Choose which Meta Ads function this run performs. |
q | string | No | For "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". |
country | string | No | ISO 3166-1 alpha-2 country code to target, e.g. US, IN, GB. |
ad_type | string | No | Limit results to a specific ad category, such as political and issue ads. |
maxItems | integer | No | Maximum 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
| Field | Type | Description |
|---|---|---|
ad_archive_id | string | Unique ID of the ad in the Meta Ad Library. |
page_id | string | Numeric ID of the advertiser's Facebook Page. |
page_name | string | Name of the advertiser's Facebook Page. |
📊 Ad status and performance
| Field | Type | Description |
|---|---|---|
is_active | boolean | Whether the ad is currently running. |
start_date | number | Unix timestamp when the ad started running. |
end_date | number | Unix timestamp when the ad stopped running (0 if still active). |
publisher_platform | array | Meta platforms the ad ran on (Facebook, Instagram, etc.). |
spend | string | Estimated spend range for the ad, when available. |
reach_estimate | string | Estimated audience reach for the ad, when available. |
🔍 Creative and enrichment
| Field | Type | Description |
|---|---|---|
snapshot | object | Ad creative: body text, title, call to action, images, videos, and link. |
details | object | Full ad details, present only when 'Enrich with ad details' is enabled. |
🏢 Matching pages
| Field | Type | Description |
|---|---|---|
pageId | string | Facebook Page ID of a matching advertiser. |
name | string | Name of the matching advertiser Page. |
category | string | Facebook category of the advertiser Page. |
likes | number | Number of likes on the advertiser Page. |
verification | string | Verification status of the advertiser Page. |
instagramUsername | string | Linked 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 ApifyClientclient = 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.