Apify actor · whoareyouanas/meta-ad-scraper
Meta (Facebook) Ad Library Scraper - Fast & Reliable
Collect public Meta Ad Library creative data by search URL, keyword, Page ID, or ad ID. Export advertiser context, copy, CTAs, media references, dates, and platforms for competitor research.
Documentation checked 2026-10-29 · deployed build 0.0.39 · run through your Apify account
01 / Overview
Match the actor to the job.
Two ways to start
Paste a complete Ads Library URL, or build a search with country and an identifier.
Creative research
Keep copy, advertiser identity, destination links, images, videos, and format together.
Search controls
Choose status, media type, language, and sorting through the deployed input fields.
02 / Input
Start with a clear, bounded input.
A direct targetUrl takes precedence over the search parameters. Without it, provide country and a keyword, Page ID, or ad ID. This older actor does not expose the newer actor's maxAds input; use Console spending controls and appropriate timeouts.
{
"targetUrl": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&view_all_page_id=108047081396228"
}Replace example targets and credential placeholders before running. These are documentation examples, not a promise of currently available source results.
| Field | Type / required | Default | Purpose |
|---|---|---|---|
| targetUrl | string | Not specified | Paste the full Facebook Ad Library URL directly. If provided, all parameter fields below are ignored. Leave empty to build the URL from parameters instead. |
| country | string | "US" | ISO 3166-1 alpha-2 country code for ad targeting (e.g. US, IN, IT, GB). Required when not using a direct URL. |
| searchQuery | string | Not specified | Keyword search query (e.g. 'nike', 'adidas shoes'). This searches across all ads by keyword. |
| pageId | string | "" | Numeric Facebook Page ID to view all ads from a specific page (e.g. 108047081396228). You can find this in the URL when viewing a page's ads. |
All other input controls (11)
| Field | Type / required | Default | Purpose |
|---|---|---|---|
| adId | string | Not specified | Numeric ID of a specific ad to look up (e.g. 1191898553123641). |
| activeStatus | string | "active" | Filter by ad campaign status. Options: active, inactive, all |
| adType | string | "all" | Filter by type of ads. Options: all, political_and_issue_ads, housing, employment, credit |
| mediaType | string | "all" | Filter by media format. Options: all, image, video, meme |
| isTargetedCountry | boolean | false | If true, only show ads specifically targeting the selected country. |
| contentLanguages | array | Not specified | Filter by content language codes (ISO 639-1, e.g. 'en', 'it', 'hi'). Leave empty for all languages. |
| sortMode | string | "total_impressions" | Sort metric for results. Options: total_impressions, relevance, start_date |
| sortDirection | string | "desc" | Sort order for results. Options: desc, asc |
| maxConcurrency | integer | 1 | Number of browser tabs to run in parallel. Keep at 1 for stability. Increase to 2-3 only if you need faster scraping and have sufficient memory. Higher values increase memory usage. Minimum: 1 · Maximum: 10 |
| requestHandlerTimeoutSecs | integer | 900 | Maximum time to wait for a page to load and scrape all ads. Pages with 200+ ads need 600-900 seconds. Default of 900 seconds (15 minutes) handles large datasets. Minimum: 60 · Maximum: 1200 |
| proxyUrl | string | Not specified | Add your Apify Proxy URL to get 99% of all ads! Format: http://groups-RESIDENTIAL:[email protected]:8000. Get your token from Apify Console → Proxy → Groups tab → RESIDENTIAL link → Copy link. External proxies (BrightData, Oxylabs) also work. Or connect with us directly if you don't want to use Proxy but want 99% of all ads. |
03 / Output
Know what each returned row represents.
- One dataset item represents an extracted ad. Creative links point to source hosting and may expire.
- The dataset overview selects common fields; full JSON can retain additional media and metadata.
{
"libraryID": "1234567890",
"brand": "Nike",
"brandLogo": "https://scontent...",
"active": true,
"platforms": [
"Facebook",
"Instagram"
],
"totalPlatforms": 2,
"similarAdCount": 5,
"multipleVersions": true,
"body": "Just Do It. Shop the latest collection...",
"linkTitle": "Nike.com",
"linkUrl": "https://nike.com/shop",
"linkDescription": "Free shipping on orders over $50",
"ctaText": "Shop Now",
"ctaUrl": "https://nike.com/shop",
"images": [
{
"url": "https://..."
}
],
"videos": [
{
"url": "https://...",
"duration": 30
}
],
"startDate": "1/15/2025",
"format": "video"
}Example values illustrate the published contract. Available fields and populated values depend on the source, mode, and result status.
Fields in the documented output view
libraryID
Library ID
brand
Brand
industry
Industry
active
Active
platforms
Platforms
totalPlatforms
Total Platforms
similarAdCount
Similar Ad Count
multipleVersions
Multiple Versions
body
Body
linkTitle
Link Title
linkUrl
Link URL
linkDescription
Link Description
ctaText
CTA Text
ctaUrl
CTA URL
images
Images
videos
Videos
startDate
Start Date
endDate
End Date
format
Format
Output views select columns. They do not necessarily filter record types or exhaust the full JSON payload. Use structured JSON when you need nested arrays or objects.
Dataset links and run artifacts (2)
- Overview 📊
- Overview of all scraped ads with key metrics and details
- All Ads (Full Data) 🔍
- Complete dataset with all fields including metadata, images, and videos
04 / Pricing
Understand the billable unit.
These are the active public event prices checked on 2026-10-29, in USD. They describe each event, not a universal flat price for a run. Confirm your current Apify plan and run budget before starting.
| Billable event | Rate (USD) | When it applies |
|---|---|---|
ad apify-default-dataset-item | $0.01 / event | Single ad in the default dataset. $10.00 per 1,000 of this event. Other events and separate services are additional. |
- The currently configured ad event is the effective rate shown below. Earlier README claims or historical rates do not override it.
- Proxy access and source restrictions can affect coverage. Configure your run budget before broad searches.
A result limit and a spending cap are different controls. Account charges, applicable taxes, and separately billed providers or proxies must be considered where relevant. A cap setting is not a minimum invoice charge.
05 / API & automation
Use the same input from your workflow.
Test a small run in Apify Console, inspect its records and charges, then save a task or call the actor from your own application. Keep your Apify token in an environment variable. Source-specific credentials, if required, are separate from the Apify API token.
# Save the input example as input.json and set APIFY_TOKEN.
# This request starts an asynchronous, potentially billable run.
curl --request POST \
'https://api.apify.com/v2/acts/whoareyouanas~meta-ad-scraper/runs' \
--header "Authorization: Bearer $APIFY_TOKEN" \
--header 'Content-Type: application/json' \
--data @input.jsonThe response identifies the run. Wait for it to finish, inspect its status, and use its default dataset and key-value store to retrieve results. A successful run can still contain partial or failed records; check the output contract above before continuing downstream.
Coverage & interpretation
Check the result before relying on it.
- Source access, pagination, and filters determine the returned sample; no complete-inventory or accuracy percentage is guaranteed.
- Public creative data does not establish ad spend, conversions, revenue, or ROAS.
Questions
Before you build an integration.
What do I need to provide?
A direct targetUrl takes precedence over the search parameters. Without it, provide country and a keyword, Page ID, or ad ID. This older actor does not expose the newer actor's maxAds input; use Console spending controls and appropriate timeouts.
What should I check in the output?
- One dataset item represents an extracted ad. Creative links point to source hosting and may expire.
- The dataset overview selects common fields; full JSON can retain additional media and metadata.
How do I budget the run?
- The currently configured ad event is the effective rate shown below. Earlier README claims or historical rates do not override it.
- Proxy access and source restrictions can affect coverage. Configure your run budget before broad searches.
Keep exploring
Practical guides for the next step.
How to Export Meta Ads from Facebook Ads Library for Competitor Research
Learn how to export Meta Ad Library ads, organize creatives, find winning angles, and turn competitor Facebook and Instagram ads into useful strategy.
Read the guideIs That Meta Ad Still Running? Check an Ad Library ID
Look up a saved Facebook or Instagram ad, distinguish inactive ads from failed lookups, and build a status history you can trust.
Read the guideTop 7 Web Scrapers for Competitor Research in 2026
Compare the best web scrapers for competitor ad research, social listening, lead generation, and market research across Meta, Google, TikTok, Reddit, websites, and Facebook Groups.
Read the guideTop 5 Facebook Scrapers in 2026
Compare the best Facebook scrapers for Meta ads, Facebook groups, public pages, and single-ad status checks. Use the right tool for the data you actually need.
Read the guide