Meta Ad Library Multi Search Scraper avatar

Meta Ad Library Multi Search Scraper

Pricing

from $9.00 / 1,000 results

Go to Apify Store
Meta Ad Library Multi Search Scraper

Meta Ad Library Multi Search Scraper

Scrape Facebook and Instagram ads from Meta Ad Library. Extract competitor ad creatives, copy, CTA links, and platform data with multi-keyword search. Supports 22+ countries, date filters, and media type filters.

Pricing

from $9.00 / 1,000 results

Rating

5.0

(1)

Developer

Juyeop Park

Juyeop Park

Maintained by Community

Actor stats

0

Bookmarked

22

Total users

14

Monthly active users

6 days ago

Last modified

Share

Meta Ad Library Scraper

Scrape Facebook and Instagram ads from Meta Ad Library — the only tool that lets you search multiple keywords in a single run and optionally target specific advertisers by Facebook Page ID for precise results. Extract ad creatives, videos, images, ad copy, CTA links, and more from 22+ countries without writing a single line of code.

What is Meta Ad Library Scraper?

Meta Ad Library Scraper is an Apify Actor that automates data extraction from Meta's Ad Library. Instead of manually browsing and copy-pasting ad data, this scraper collects structured ad information at scale.

Meta Ad Library is Facebook's public database of all ads running across Facebook, Instagram, Messenger, and Audience Network. This scraper turns that public data into structured, exportable datasets you can use for competitor analysis, market research, and creative inspiration.

What can this scraper do?

  • Multi-keyword search — Search up to 5 keywords (brand names, products, topics) in a single run. No need to run the scraper multiple times.
  • Target specific advertisers by Page ID — Pair any keyword with a Facebook Page ID to restrict results to that exact advertiser's page. Ideal when multiple brands share a similar name and you only want one.
  • 22+ countries supported — Target ads in specific countries: US, UK, Germany, Japan, South Korea, and more. Or search all countries at once.
  • Advanced filters — Filter by active/inactive status, media type (image, video, meme), date range, and sort order.
  • Complete ad data extraction — Get ad creatives (images & videos), ad copy, CTA destination URLs, advertiser info, platform targeting, start dates, and Library IDs.
  • Automatic deduplication — No duplicate ads in your results, even when scrolling loads the same ad multiple times.
  • Export anywhere — Download results as JSON, CSV, or Excel. Connect to Google Sheets, Airtable, Zapier, Make, or access via REST API.

Why use this scraper instead of browsing manually?

FeatureManual browsingThis scraper
Speed~2 min per ad100+ ads in minutes
Multi-keywordOne search at a timeUp to 5 keywords per run
Data formatCopy-pasteStructured JSON/CSV/Excel
CTA linksClick each adExtracted automatically
Video URLsNot downloadableDirect video URLs
SchedulingManual effortAutomate with Apify schedules
API accessNoneFull REST API

Use cases

  • Competitor analysis — Monitor how competitors advertise on Facebook and Instagram. Track their ad creatives, messaging, and CTA strategies.
  • Market research — Discover what types of ads are running in your industry across different countries.
  • Creative inspiration — Build a swipe file of high-performing ad creatives for your team.
  • Brand monitoring — Track how your brand (or clients' brands) appear in ads across Meta platforms.
  • Agency pitches — Gather ad intelligence to support client proposals and competitive analyses.

How to scrape Meta Ad Library

  1. Go to the Meta Ad Library Scraper page on Apify Store.
  2. Click Try for free to open the Actor in Apify Console.
  3. Enter your search keywords (e.g., "Nike", "Adidas").
  4. (Optional) Enter a Facebook Page ID for each keyword to restrict results to a specific advertiser's page.
  5. Select your target country and filters.
  6. Click Start and wait for the results.
  7. Download your data as JSON, CSV, or Excel — or connect to Google Sheets, Airtable, Zapier, or Make.

No coding, no API keys, no setup required.

Input parameters

ParameterTypeDescriptionDefault
keywordsarraySearch keywords — brand names, product names, or topics (max 5 per run). Pair with pageIds to target a specific advertiser's page.Required
pageIdsarray(Optional) Facebook Page IDs matched by index to keywords. If you want to collect ads from a specific advertiser with precision, provide the exact view_all_page_id value of that advertiser's Facebook Page. When provided, the search is restricted to that page, significantly improving the accuracy of collected data. Leave an entry blank to use keyword-only search at that position. (max 5)-
countrystringCountry code (US, KR, JP, GB, DE, FR, and 16 more)KR
adTypestring"all" or "political_and_issue_ads"all
activeStatusstring"all", "active", or "inactive"all
mediaTypestring"all", "image", "meme", "video", "none"all
startDateMinstringFilter ads started on or after this date (YYYY-MM-DD)-
startDateMaxstringFilter ads started on or before this date (YYYY-MM-DD)-
sortBystring"relevancy_monthly_grouped" (Most Recent) or "total_impressions" (Highest Impressions)relevancy_monthly_grouped
maxResultsintegerMaximum ads to collect per keyword (1–200)100
proxyobjectProxy configuration (Residential proxy required — datacenter IPs are rate-limited by Facebook)Apify Proxy (RESIDENTIAL)

Example input

{
"keywords": ["Nike", "Adidas", "Puma"],
"pageIds": ["", "123456789", ""],
"country": "US",
"activeStatus": "active",
"mediaType": "video",
"maxResults": 50
}

Using Page IDs for precise advertiser targeting

pageIds is an optional field. You do not need to provide it for the scraper to work — keyword-only search is the default behavior.

However, if you want to collect ads from a specific advertiser with precision, you can provide the view_all_page_id value of that advertiser's Facebook Page. When a Page ID is set for a keyword, the scraper restricts the search to that exact page, which significantly improves the accuracy of collected data — eliminating ads from other brands that happen to match the same keyword.

How to find a view_all_page_id:

  1. Go to Meta Ad Library and search for the advertiser by name.
  2. Click on the advertiser's name in the results to open their Ad Library page.
  3. The URL will contain view_all_page_id=XXXXXXXXX — copy that number.

Alternatively, open the advertiser's Facebook Page and look for the numeric ID in the page URL or page source.

Rules:

  • pageIds is index-matched to keywords: pageIds[0] corresponds to keywords[0], pageIds[1] to keywords[1], and so on.
  • Leave an entry as "" (empty string) to use keyword-only search for that position.
  • If pageIds is shorter than keywords, the remaining keywords use keyword-only search.
  • Only provide the numeric ID value (e.g. "123456789"). Any blank or non-numeric-looking entry is ignored and will not be added to the URL.

Example — mixing keyword-only and Page ID search:

{
"keywords": ["Nike", "Adidas", "Puma"],
"pageIds": ["", "123456789", ""]
}

In this example, "Nike" and "Puma" use keyword-only search, while "Adidas" is restricted to the page with ID 123456789. Only "Adidas"'s own ads will be collected for that keyword.

What data can you extract from Meta Ad Library?

Each ad in the output includes:

FieldTypeDescription
libraryIDstringUnique Meta Ad Library identifier
keywordstringSearch keyword that found this ad
pageIdstring|nullFacebook Page ID used to target a specific advertiser. null if no Page ID was provided.
brandstringAdvertiser name
brandImgstringAdvertiser profile image URL
bodystringAd copy / text content
startDatestringWhen the ad started running (YYYY-MM-DD)
isActivebooleanWhether the ad is currently running
platformsarrayPlatforms — Facebook, Instagram, Messenger, Audience Network, Threads
imagesarrayImage URLs from the ad (carousel supported)
videosarrayVideo URLs with poster images
ctaLinkstringCall-to-action destination URL (decoded)
scrapeDatestringWhen the data was collected (ISO 8601)

Example output

{
"libraryID": "123456789012345",
"keyword": "Nike",
"pageId": "123456789",
"brand": "Nike",
"brandImg": "https://scontent.xx.fbcdn.net/v/...",
"body": "Just Do It. Shop the latest Nike Air Max collection.",
"startDate": "2024-01-15",
"isActive": true,
"platforms": ["Facebook", "Instagram"],
"images": [{ "url": "https://scontent.xx.fbcdn.net/v/..." }],
"videos": [{ "url": "https://video.xx.fbcdn.net/v/...", "posterUrl": "https://scontent.xx.fbcdn.net/v/..." }],
"ctaLink": "https://nike.com/air-max",
"scrapeDate": "2024-01-20T10:30:00.000Z"
}

Integrations

Connect your scraped data to the tools you already use:

  • Google Sheets — Auto-sync results to a spreadsheet
  • Airtable — Build a searchable ad database
  • Zapier — Trigger workflows when new ads are found
  • Make (Integromat) — Automate complex data pipelines
  • Webhooks — Send data to your own backend in real time
  • REST API — Access results programmatically from any language
  • Slack / Email — Get notifications when scraping completes

You can also schedule this scraper to run daily or weekly to track ad changes over time.

Supported countries

CodeCountryCodeCountry
USUnited StatesKRSouth Korea
GBUnited KingdomJPJapan
DEGermanyFRFrance
CACanadaAUAustralia
BRBrazilINIndia
MXMexicoESSpain
ITItalyNLNetherlands
SGSingaporeTWTaiwan
HKHong KongTHThailand
VNVietnamIDIndonesia
PHPhilippinesMYMalaysia
ALLAll Countries

How much does it cost to scrape Meta Ad Library?

This Actor uses pay-per-result pricing — you only pay for the ads you successfully extract.

EventPrice
Actor start$0.02 per run
Per ad extracted$0.015

Cost examples

ScenarioKeywordsAds/keywordTotal adsEstimated cost
Quick test11010~$0.17
Standard use3100300~$4.52
Full scan52001,000~$15.02

No results = no charge. If a keyword returns 0 ads, you only pay the $0.02 Actor start fee.

Proxy costs

This Actor requires Apify Proxy with RESIDENTIAL group to access Meta Ad Library. Facebook aggressively rate-limits GraphQL pagination requests from datacenter IPs (error code 1675004) — the initial page loads but infinite-scroll fails silently and no new ads are fetched. Residential proxy is set as the default and must not be changed to datacenter.

Proxy typePriceNote
Residential~$12.50/GBRequired — the only option that works for pagination
Datacenter~$0.04/GBWill NOT work — GraphQL pagination is blocked

Estimated proxy cost per run: $0.10–$0.50 depending on data volume.

Tips for best results

  1. Use specific keywords — Brand names ("Nike", "Coca-Cola") work better than generic terms ("shoes", "drinks").
  2. Use a Page ID for exact advertiser targetingpageIds is optional, but if you want to collect ads from a specific advertiser with precision, provide their exact view_all_page_id value. This restricts results to that advertiser's page only, significantly improving data accuracy. Find the Page ID by searching the advertiser in Meta Ad Library and copying the numeric ID from the URL (view_all_page_id=XXXXXXXXX).
  3. Start small — Test with maxResults: 5 to verify results before running large extractions.
  4. Filter by active status — Use "active" to focus on currently running ads.
  5. Use date filters — Narrow results to recent ads for the freshest insights.
  6. Try different countries — The same brand may run different ad creatives in different markets.

FAQ

Yes. Meta Ad Library is a publicly accessible database that Meta provides for transparency. This scraper only accesses publicly available data. However, please ensure your use case complies with Meta's Terms of Service and applicable laws in your jurisdiction.

Will Meta block the scraper?

This scraper includes built-in proxy support and anti-detection measures. It uses Apify Proxy with RESIDENTIAL group by default, which is required for reliable access. Do not switch to datacenter proxies — Facebook rate-limits GraphQL pagination from datacenter IPs, causing the scraper to collect zero ads beyond the initial page load.

How long does it take?

Typical run times:

  • 10 ads: ~1–2 minutes
  • 100 ads: ~5–10 minutes
  • 1,000 ads (5 keywords × 200 each): ~20–40 minutes

Can I schedule automatic runs?

Yes. Apify supports scheduled runs — set the scraper to run daily, weekly, or at any custom interval to monitor ad changes over time.

Does it extract ad spend or impressions data?

Meta only makes spend and impression data publicly available for political and issue ads. For regular commercial ads, this data is not available in the Ad Library.

Support

This Actor accesses publicly available data from Meta Ad Library. It does not access private data, bypass authentication, or violate Meta's Terms of Service. Users are responsible for ensuring their use of extracted data complies with applicable laws and regulations.