Meta Ad Library Scraper — Ad Creatives, Spend & Targeting
Pricing
from $5.00 / 1,000 ad results
Meta Ad Library Scraper — Ad Creatives, Spend & Targeting
Extract Facebook & Instagram ad creatives, spend ranges, impressions, targeting data, and landing pages from Meta Ad Library $5.00/1K. MCP/API-ready.
Pricing
from $5.00 / 1,000 ad results
Rating
0.0
(0)
Developer
Khadin Akbar
Maintained by CommunityActor stats
1
Bookmarked
34
Total users
2
Monthly active users
3 days ago
Last modified
Categories
Share
Meta Ad Library Scraper is an Apify Actor for people who need Meta Ad Library records from Facebook, Instagram, and Messenger in a structured dataset. It accepts a keyword, multiple keywords, advertiser Page IDs, Meta Ad Library URLs, or a single ad ID. Each returned record represents one ad and can include creative text, headline, landing page, spend range, impressions, platform placement, languages, region or demographic delivery data, and enrichment fields such as ad summary, detected CTA, ad category, running days, word count, hashtag count, and emoji count. The output is ready for analysis in Apify, downstream automation, or use through Apify MCP.
Best fit and connected workflows
This Actor fits workflows where the source of truth is Meta Ad Library and the goal is to turn public ad listings into clean records.
It works well when you want to:
- search by topic, brand, or advertiser Page ID
- compare active and inactive ads across countries
- review image and video creatives alongside landing pages
- use spend, impressions, and targeting fields when a Meta access token is provided
- enrich records for AI or MCP pipelines with summary and CTA fields
- run a quick count first with
onlyCountand then fetch the full dataset
If your workflow starts from a known Facebook Page, advertiserPageIds gives you a direct path to all ads from that advertiser. If you already have a Meta Ad Library URL, startUrls can capture the filters from the URL and reuse them in the run input.
Practical scenario
Maya is reviewing a fitness supplement brand that just launched a new campaign. She starts with the brand name in searchQuery, limits results to US, sets adStatus to ACTIVE, and keeps enrichAds enabled.
The returned record shows:
page_namefor the advertiser identityad_creative_bodyandad_creative_link_titlefor the messagelanding_page_domainfor the destination sitespend_lowerandspend_upperfor estimated spendimpressions_lowerandimpressions_upperfor reach signalsad_summaryanddetected_ctafor quick review
Maya uses the landing page domain and CTA type to decide whether the brand is sending traffic to a product page or a lead capture flow. Her next action is to open the linked creative in ad_snapshot_url and compare it with other active ads from the same advertiser.
Input fields
| Field | Type | Purpose |
|---|---|---|
searchQuery | string | Search one keyword or phrase in Meta Ad Library. |
searchQueries | array[string] | Run several keyword searches and merge the results. |
metaAccessToken | string | Meta Graph API access token with ads_read permission. |
countries | array[string] | ISO country codes for ad delivery filtering. Default: ["US"]. |
adStatus | string | ALL, ACTIVE, or INACTIVE. |
adType | string | Ad category filter such as ALL or regulated categories. |
mediaType | string | Creative format filter such as ALL, IMAGE, or VIDEO. |
startDate | string | Include ads running on or after this date. |
endDate | string | Include ads running on or before this date. |
maxResults | integer | Maximum number of ad records to fetch. |
sortBy | string | impressions_desc or most_recent. |
enrichAds | boolean | Add summary and auto-analysis fields to each record. |
providerFallbackEnabled | boolean | Use configured public-data fallback when the primary path returns no ads. |
onlyCount | boolean | Return only the total number of matching ads. |
advertiserPageIds | array[string] | Fetch all ads for specific Facebook Page IDs. |
startUrls | array | Paste Meta Ad Library URLs or Facebook Page URLs. |
adId | string | Look up one specific ad by Meta Ad Library ID. |
contentLanguages | array[string] | Filter creative language by ISO 639-1 code. |
publisherPlatforms | array[string] | Filter by platform such as Facebook or Instagram. |
searchType | string | KEYWORD_UNORDERED or KEYWORD_EXACT_PHRASE. |
metaAccessTokens | array | Token pool for high-volume use. |
proxyUrls | array | Custom proxy URLs for web scrape mode. |
Focused JSON input example
{"searchQuery": "artificial intelligence","countries": ["US", "GB"],"adStatus": "ACTIVE","adType": "ALL","mediaType": "ALL","startDate": "a source-provided date","endDate": "a source-provided date","maxResults": 50,"sortBy": "impressions_desc","enrichAds": true,"providerFallbackEnabled": true,"onlyCount": false,"publisherPlatforms": ["facebook", "instagram"],"searchType": "KEYWORD_UNORDERED"}
Output fields
Each dataset item represents one ad record. The live dataset contract defines these fields.
| Field | Type | Purpose |
|---|---|---|
ad_id | string or null | Meta Ad Library ad identifier. |
page_id | string or null | Facebook Page ID for the advertiser. |
page_name | string or null | Advertiser name shown in the library. |
ad_creative_body | string or null | Main ad copy. |
ad_creative_bodies | array or null | Multiple copy variants when present. |
ad_creative_link_title | string or null | Headline or CTA card title. |
ad_creative_link_caption | string or null | Domain shown on the link card. |
ad_creative_link_description | string or null | Link card description text. |
ad_snapshot_url | string or null | Creative preview link in Meta Ad Library. |
landing_page_url | string or null | Advertiser destination URL. |
spend_lower / spend_upper | integer or null | Estimated spend range where available. |
currency | string or null | ISO 4217 currency code. |
impressions_lower / impressions_upper | integer or null | Estimated impression range where available. |
eu_total_reach | integer or null | EU reach value where available. |
delivery_start_date / delivery_stop_date | string or null | Ad run dates. |
ad_creation_time | string or null | Ad creation timestamp. |
is_active | boolean | Whether the ad is currently running. |
publisher_platforms | array or null | Platforms where the ad ran. |
languages | array or null | Creative language codes. |
demographic_distribution | array or null | Age and gender delivery breakdown. |
delivery_by_region | array or null | Regional delivery breakdown. |
landing_page_domain | string or null | Domain extracted from the landing page. |
image_urls | array or null | Direct image URLs when available. |
video_urls | array or null | Direct video URLs when available. |
cta_type | string or null | CTA button type from Meta data. |
carousel_cards | array or null | Carousel card details when present. |
search_query | string or null | Search term used for the record. |
ad_summary | string or null | One-sentence LLM-ready summary. |
detected_cta | string or null | Auto-detected CTA label. |
ad_category | string or null | Auto-classified ad category. |
running_days | integer or null | Number of days the ad has been running. |
word_count | integer | Word count of the ad body. |
hashtag_count | integer | Hashtag count in the ad body. |
emoji_count | integer | Emoji count in the ad body. |
country_filter | string | Country filter applied to the run. |
data_mode | string | Collection mode used for the record. |
scraped_at | string | Extraction timestamp. |
Illustrative output record
{"ad_id": "23851234567890123","page_id": "123456789","page_name": "Nike","ad_creative_body": "Run faster. Train smarter. Shop now and get free shipping.","ad_creative_link_title": "Shop Nike Air Max 2024","ad_creative_link_caption": "nike.com","ad_snapshot_url": "https://www.facebook.com/ads/archive/render_ad/?id=23851234567890123","landing_page_url": "https://www.nike.com/w/new-shoes","spend_lower": 1000,"spend_upper": 5000,"currency": "USD","impressions_lower": 100000,"impressions_upper": 500000,"eu_total_reach": 250000,"delivery_start_date": "2024-01-15T00:00:00+0000","delivery_stop_date": "2024-02-28T00:00:00+0000","is_active": true,"publisher_platforms": ["facebook", "instagram"],"languages": ["en"],"landing_page_domain": "nike.com","cta_type": "SHOP_NOW","ad_summary": "Nike ad on facebook/instagram (currently running, links to nike.com): \"Run faster. Train smarter...\"","detected_cta": "shop_now","ad_category": "ecommerce","running_days": 45,"word_count": 18,"hashtag_count": 3,"emoji_count": 2,"country_filter": "US","data_mode": "graph_api","scraped_at": "2026-03-28T10:30:00.000Z"}
How it works
The actor uses Meta Graph API when a valid Meta access token is supplied. In that mode, it can return spend ranges, impressions, demographics, and richer creative data.
When the native Meta Graph API or browser scrape path returns no ads because of a block, timeout, rate limit, or expired token, provider fallback can try configured public Meta Ad Library APIs from ScrapeCreators or SociaVault. The manifest also shows support for public web scraping mode and custom proxy URLs for that path.
enrichAds adds derived fields to each record, including ad_summary, detected_cta, ad_category, running_days, word_count, hashtag_count, and emoji_count. onlyCount returns the match total without downloading ad rows.
Pricing
This Actor uses pay per event pricing plus Apify platform usage. The primary event is Ad Result, charged for each ad scraped. A separate actor start event is also charged by memory allocation.
For example, a run that returns one hundred ads is billed for one hundred Ad Result events, plus the actor start event. For the current event definitions and the live Pricing tab, check the Actor page in Apify.
Use with AI agents (MCP)
This Actor is usable through Apify MCP as an Apify Actor, which lets agents call it as a tool and receive structured ad records back in the dataset.
Actor identity: khadinakbar/meta-ad-library-scraper
Tool description: search Meta Ad Library by keyword, advertiser, URL, or ad ID and return one record per ad with creative, spend, impressions, targeting, and landing-page fields.
Find active Facebook and Instagram ads for the keyword "AI productivity tools" in the US, return up to 50 results, and include enrichment fields for summary and CTA detection.
How to read the output:
ad_summaryis the quickest LLM-ready descriptionad_snapshot_urlpoints to the creative in Meta Ad Librarylanding_page_urlandlanding_page_domainidentify the destinationspend_lower/spend_upperandimpressions_lower/impressions_upperare ranges when availablepublisher_platforms,languages,demographic_distribution, anddelivery_by_regionsupport targeting analysisdata_modeshows whether the record came from Graph API, web scrape, or a fallback provider
Scope and provenance:
- Each dataset row represents one ad
scraped_atmarks when the record was extractedcountry_filterandsearch_queryhelp trace the search context
Pagination and cost guidance:
- Raise
maxResultsfor broader coverage - Use
onlyCountfirst when you want a quick estimate - Use
sortBy: "impressions_desc"to review higher-reach ads first - Cost scales with returned ad results under the pay per event model
Apify API example
import { ApifyClient } from 'apify-client';const client = new ApifyClient({token: process.env.APIFY_TOKEN,});const run = await client.actor('khadinakbar/meta-ad-library-scraper').call({searchQuery: 'AI productivity tools',countries: ['US'],adStatus: 'ACTIVE',maxResults: 25,enrichAds: true,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);const datasetItems = await client.dataset(run.defaultDatasetId).listItems();console.log(`Returned ${datasetItems.items.length} ads`);
Best results and outcome guidance
Use searchQuery for topic discovery, advertiserPageIds for known brands, and startUrls when you already have a filtered Meta Ad Library URL. For focused review, combine countries, adStatus, mediaType, and publisherPlatforms. For AI workflows, keep enrichAds enabled so the dataset includes summary and classification fields.
Focused standalone workflow
Meta Ad Library Scraper — Ad Creatives, Spend & Targeting is designed as a focused standalone workflow for the public input and structured output contract described above.
Design note
I found that the live dataset contract includes scraped_at as a required field, while many other fields are optional and may be null depending on the collection path.
FAQ
How should I choose between searchQuery and advertiserPageIds?
Use searchQuery when you want to discover ads around a theme or brand name. Use advertiserPageIds when you already know the Facebook Page IDs and want all ads from those advertisers.
When should I use startUrls?
Use startUrls when you have a Meta Ad Library URL with filters already set in the browser and want the Actor to reuse those parameters.
What does onlyCount return?
It returns the total number of matching ads without downloading full records.
Which fields are richest with a Meta access token?
The input contract says the token unlocks spend ranges, impressions, demographics, image and video URLs, and faster scraping.
How do I narrow results to a specific market or format?
Use countries, adStatus, adType, mediaType, publisherPlatforms, and contentLanguages together.
What is the output record structure useful for?
It is built for ad creative review, targeting analysis, landing-page comparison, and AI or MCP pipelines that need one normalized record per ad.
Responsible use
Use this Actor in ways that respect Meta Ad Library access, applicable laws, and the terms that apply to your account and environment. Review public ad records carefully, especially when using spend, impression, or targeting fields, since some values are ranges or may be null depending on the data collection path and the ad type.