Meta Ad Library Scraper — Ad Creatives, Spend & Targeting avatar

Meta Ad Library Scraper — Ad Creatives, Spend & Targeting

Pricing

from $0.50 / 1,000 ad results

Go to Apify Store
Meta Ad Library Scraper — Ad Creatives, Spend & Targeting

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. Filter by country, status, and media type. No login required.

Pricing

from $0.50 / 1,000 ad results

Rating

0.0

(0)

Developer

Khadin Akbar

Khadin Akbar

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

8 hours ago

Last modified

Share

Meta Ad Library Scraper — Extract Facebook & Instagram Ad Creatives

Scrape Meta Ad Library ad creatives, spend ranges, impressions, targeting data, and landing pages from any advertiser or keyword. Filter by country, ad status, media type, and publisher platform. Returns structured JSON ready for competitive intelligence, creative research, and AI pipeline consumption.

Compatible with: Apify MCP Server (Claude, ChatGPT), LangChain, Make.com, Zapier, n8n, and direct REST API access.


What does the Meta Ad Library Scraper do?

The Meta Ad Library Scraper connects to the official Meta Graph API and retrieves detailed ad data from the public Meta Ad Library — the transparency database where Meta publishes all active and recent ads running on Facebook, Instagram, Messenger, and Audience Network.

You can search by keyword (find all ads about "AI tools", "weight loss", "real estate") or by specific advertiser (get every ad a brand is running). The actor returns the full creative text, spending ranges, impression ranges, targeting breakdown (age, gender, location), landing page URLs, and demographic delivery data — everything you need for serious competitive ad intelligence.

No coding required. Works with AI agents via MCP. Pay only for results.


What data can you extract from Meta Ad Library?

FieldTypeExample
page_namestring"Nike"
ad_creative_bodystring"Run faster. Train smarter..."
ad_creative_link_titlestring"Shop Nike Air Max 2024"
landing_page_urlstring"https://nike.com/new-arrivals"
spend_lower / spend_upperinteger1000 / 5000
currencystring"USD"
impressions_lower / impressions_upperinteger100000 / 500000
eu_total_reachinteger250000
delivery_start_dateISO date"2024-01-15T00:00:00+0000"
is_activebooleantrue
publisher_platformsarray["facebook", "instagram"]
target_agesarray["25-34", "35-44"]
target_genderstring"All"
target_locationsarray[{"name": "US", "type": "country"}]
demographic_distributionarray[{"age": "25-34", "gender": "male", "percentage": "0.32"}]
delivery_by_regionarray[{"region": "California", "percentage": "0.18"}]
ad_snapshot_urlstringFull ad creative preview URL
funding_entitystring"Nike, Inc."

How to use the Meta Ad Library Scraper

Step 1: Get your free Meta access token

The Meta Ad Library API is public and free, but requires an access token:

  1. Go to Meta Graph API Explorer
  2. Click "Get Token""Get User Access Token"
  3. Add the ads_read permission (check the box)
  4. Click "Generate Access Token" and copy it

No app review required. The Ad Library API is open for transparency purposes — anyone can get a token.

Step 2: Configure the actor

Choose your search mode:

Search by keyword — find ads across all advertisers about a topic:

{
"metaAccessToken": "YOUR_TOKEN_HERE",
"searchQuery": "AI productivity tools",
"countries": ["US", "GB"],
"adStatus": "ACTIVE",
"maxResults": 200
}

Search by advertiser — get all ads from specific brands:

{
"metaAccessToken": "YOUR_TOKEN_HERE",
"advertiserPageIds": ["123456789", "987654321"],
"countries": ["US"],
"adStatus": "ALL",
"maxResults": 500
}

Step 3: Run and download

  1. Click "Try for free" in the Apify Console
  2. Paste your access token and configure filters
  3. Click "Start" and wait for results (typically 1–5 minutes)
  4. Download as JSON, CSV, or Excel

How to scrape Meta Ad Library with AI agents (Claude, ChatGPT)

Connect this actor to Claude or ChatGPT via the Apify MCP Server and ask naturally:

"Find me 200 active ads about weight loss supplements in the US"

"Get all Facebook ads from Nike and Adidas running right now"

"Show me ads targeting 25-34 year olds in the UK with video creative"

The AI agent will automatically select and run this actor, returning structured results you can analyze immediately.


Filtering options — how to target exactly the ads you want

By country: Pass ISO country codes in the countries array. Examples: "US", "GB", "AU", "DE", "FR", "CA". Multiple countries return ads targeting any of them.

By ad status: ACTIVE (currently running — best for competitive intelligence), INACTIVE (historical campaigns), or ALL.

By media type: IMAGE (static images), VIDEO (video ads), MEME, or ALL.

By platform: Filter for Facebook-only, Instagram-only, or both via publisherPlatforms.

By date range: Use startDate and endDate (YYYY-MM-DD format) to find ads running in a specific period.

By ad type: Default ALL returns commercial ads. Use POLITICAL_AND_ISSUE_ADS for political transparency research (requires US, GB, or EU country).


How much does the Meta Ad Library Scraper cost?

UsagePriceNotes
Free trial$5 Apify credit~10,000 ads at standard rate
Standard$0.0005 per adPay only for what you extract
No minimumNo monthly fees, no commitments

Example costs:

  • 100 ads = $0.05
  • 1,000 ads = $0.50
  • 10,000 ads = $5.00

You only pay for ads actually extracted. If a run returns 0 results (e.g., bad token or no matching ads), you pay nothing.


Use cases for Meta Ad Library data

Competitive ad intelligence — See every ad your competitors are running, how much they're spending, and which creative formats they're testing. Track campaign launches in real time.

Creative research — Analyze winning ad copy patterns across your industry. Find high-spend ads with thousands of impressions to identify what's working at scale.

Lead generation — Extract advertisers who are actively spending in your vertical. Their contact info + spend data = a warm outreach list.

Market research — Map advertiser activity by country, category, and platform. Understand who's advertising, how much, and to whom.

AI pipeline input — Feed ad creative data into Claude or GPT for automatic categorization, sentiment analysis, or landing page comparison.

Trend monitoring — Schedule recurring runs to track new advertisers entering your market or changes in competitor creative strategy.


API & Integration examples

REST API

curl -X POST "https://api.apify.com/v2/acts/USERNAME~meta-ad-library-scraper/runs" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"metaAccessToken": "YOUR_META_TOKEN",
"searchQuery": "AI tools",
"countries": ["US"],
"adStatus": "ACTIVE",
"maxResults": 100
}'

JavaScript / Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('USERNAME/meta-ad-library-scraper').call({
metaAccessToken: 'YOUR_META_TOKEN',
searchQuery: 'ecommerce tools',
countries: ['US', 'GB'],
adStatus: 'ACTIVE',
maxResults: 500,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Fetched ${items.length} ads`);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('USERNAME/meta-ad-library-scraper').call(
run_input={
'metaAccessToken': 'YOUR_META_TOKEN',
'searchQuery': 'SaaS tools',
'countries': ['US'],
'adStatus': 'ACTIVE',
'maxResults': 200,
}
)
items = list(client.dataset(run['defaultDatasetId']).iterate_items())
print(f"Fetched {len(items)} ads")

Integrations: Apify MCP Server, LangChain, Make.com, Zapier, n8n, Google Sheets, Airtable, HubSpot


FAQ

Q: Is this legal? A: Yes. The Meta Ad Library is a public transparency database required by law in many jurisdictions. All data returned by this actor is publicly accessible to anyone at facebook.com/ads/library. See Apify's guide on web scraping legality.

Q: Do I need a Facebook account? A: You need a Meta developer account (free) to generate an API access token. You do not need a Facebook Business account or any advertising spend.

Q: Why does spend show as a range (e.g., $1,000–$5,000)? A: Meta intentionally reports spend and impressions as ranges to protect advertiser privacy. This is a limitation of the public API, not this actor. For EU ads, Meta also provides eu_total_reach (exact number) due to DSA requirements.

Q: Can I get targeting data for all ads? A: Targeting data (age, gender, location) is available for political/regulated ads in all regions and for all ad types in the EU (Digital Services Act). For other ad types in non-EU countries, Meta may return null for targeting fields.

Q: How fast is it? A: Approximately 100–300 ads per minute, depending on API response times and the number of results pages.

Q: Can I schedule recurring runs? A: Yes — use Apify's built-in scheduler to run daily, weekly, or at any custom interval. Pipe results to webhooks, Slack, Google Sheets, or your CRM automatically.

Q: What happens if my access token expires? A: The actor will stop with a clear error message telling you to refresh your token. Meta access tokens expire after 60 days (long-lived tokens) or when you log out. Generate a new one at developers.facebook.com/tools/explorer/.

Q: Can I search for political ads? A: Yes — set adType to POLITICAL_AND_ISSUE_ADS and include "US", "GB", or EU country codes in countries. Political ad data includes additional fields not available for regular ads.