Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Pricing

from $3.00 / 1,000 ad scrapeds

Go to Apify Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

Scrape Meta (Facebook) Ad Library for competitor ads by search terms. Extract ad text, CTAs, media, platforms, and dates for competitive intelligence and GTM agents.

Pricing

from $3.00 / 1,000 ad scrapeds

Rating

0.0

(0)

Developer

Harsh

Harsh

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Share

What does Facebook Ads Library Scraper do?

Facebook Ads Library Scraper extracts public competitor ads from the Meta Ad Library by search term and country. It returns structured fields such as ad text, CTA, platforms, media URLs, page info, and library links — ready for daily competitive intel, GTM agents, and creative research workflows.

Run it on the Apify platform for scheduling, API access, proxy rotation, monitoring, and integrations with Make, Zapier, n8n, and your own agents.

Why use Facebook Ads Library Scraper?

  • Competitive intelligence — Monitor what rivals run on Facebook and Instagram without a Meta Business login for public library data.
  • Creative research — Collect ad copy, CTAs, and creative media URLs for inspiration and messaging analysis.
  • GTM & product agents — Feed structured ad datasets into AI agents that track market positioning daily.
  • Multi-market coverage — Search the same brand across countries (US, GB, DE, …) in one run.
  • Automation-ready — JSON dataset export, pay-per-event pricing, and Apify schedules.

How to use Facebook Ads Library Scraper

  1. Open the Actor in Apify Console and click Try for free.
  2. Enter one or more search terms (brand name, product keyword, or Page name).
  3. Optionally set countries, ad type (all / political / housing), and max ads.
  4. Keep proxy enabled (residential recommended) for reliable Meta access.
  5. Click Start and download results as JSON, CSV, Excel, or HTML.

Input

Configure inputs in the Input tab. Main fields:

FieldTypeDescription
searchTermsstring[]Keywords / brand names to search (required)
countriesstring[]ISO country codes (default ["US"]). Use ALL for unfiltered
adTypestringall, political, or housing
maxAdsintegerCap on unique ads (0 = unlimited)
maxConcurrencyintegerParallel requests (keep low, default 2)
maxRequestRetriesintegerRetries for failed / blocked pages
requestDelayMsintegerDelay between requests to reduce blocks
proxyConfigurationobjectApify Proxy settings

Example:

{
"searchTerms": ["Nike", "Shopify"],
"countries": ["US"],
"adType": "all",
"maxAds": 20,
"proxyConfiguration": { "useApifyProxy": true }
}

Output

Each dataset item is one ad (or a search-level error row). You can download the dataset in JSON, HTML, CSV, or Excel.

{
"adId": "123456789012345",
"pageName": "Nike",
"pageId": "987654321",
"pageUrl": "https://www.facebook.com/nike",
"adText": "Just Do It. New collection available now.",
"ctaText": "Shop Now",
"startDate": "2024-01-01T00:00:00.000Z",
"endDate": null,
"platforms": ["FACEBOOK", "INSTAGRAM"],
"mediaUrls": ["https://scontent.xx.fbcdn.net/v/nike-orig.jpg"],
"adSnapshotUrl": "https://www.facebook.com/ads/library/?id=123456789012345",
"libraryUrl": "https://www.facebook.com/ads/library/?id=123456789012345",
"status": "active",
"searchTerm": "Nike",
"country": "US",
"scrapedAt": "2026-07-20T12:00:00.000Z",
"error": null
}

A run summary is stored in the key-value store under OUTPUT.

Data table

FieldDescription
adIdMeta ad archive ID
pageNameAdvertising Page name
pageIdFacebook Page ID
pageUrlPage URL when available
adTextPrimary ad body / creative text
ctaTextCall-to-action label
startDateDelivery start (ISO)
endDateDelivery end (ISO) when present
platformse.g. FACEBOOK, INSTAGRAM, MESSENGER, AUDIENCE_NETWORK
mediaUrlsImage / video URLs from the creative snapshot
adSnapshotUrlSnapshot / deep link for the ad
libraryUrlAd Library URL for the ad
statusactive / inactive when detectable
searchTermQuery that produced the ad
countryCountry filter used
scrapedAtISO timestamp
errorError message when the row is a failure record

Pricing / Cost estimation

How much does it cost to scrape Facebook Ads Library?

This Actor uses pay-per-event (PPE) pricing at about $0.003 per ad written to the default dataset (apify-default-dataset-item), plus a tiny actor-start fee. Approximate examples:

Ads scrapedEst. event cost
100~$0.30
1,000~$3.00
10,000~$30.00

Platform compute and proxy (especially residential) are billed separately by Apify. Use maxAds to cap spend.

Tips and advanced options

  • Prefer residential proxies — Meta often blocks bare datacenter IPs on Ad Library.
  • Keep maxConcurrency at 1–3 and requestDelayMs ≥ 1500 for fewer checkpoints.
  • Start with a known brand (Nike, Apple) and maxAds: 10 to validate connectivity.
  • The Actor uses Cheerio with multi-strategy parsing of embedded JSON (ad_archive_id, Relay / ServerJS blobs, regex fallback). Heavily JS-gated responses may return fewer fields; retries and proxies improve success.
  • Schedule daily runs for continuous competitor monitoring.

FAQ, disclaimers, and support

Is scraping the Ad Library legal?
Meta publishes the Ad Library for transparency. You are responsible for complying with Meta’s Terms, applicable laws, and your own use-case policy. This Actor only targets public library pages.

Why are some fields null?
Meta’s HTML varies by region and experiment. The scraper fills what it can from embedded JSON and falls back gracefully.

Why zero ads?
Possible causes: captcha/checkpoint, no matching active ads, or temporary blocks. Check the error field and enable residential proxy.

Support
Open an issue on the Actor’s Issues tab in Apify Console. Custom enterprise scrapers and agents are available on request.