How to Scrape the Facebook Ad Library: Every Option, With Real Costs

How to scrape the Facebook Ad Library in 2026: official API limits, Apify actors, scraper APIs and DIY Playwright, with cost per 1,000 ads and what breaks.

The short answer

There are four ways to scrape the Facebook Ad Library: the official API (free, but it skips US-only commercial ads), Apify actors (about $0.50 to $5.80 per 1,000 ads), per-request scraper APIs like ScrapeCreators and SearchAPI (cents per 1,000 ads), or your own Playwright script. All of them return what the Library shows. None returns spend, a winner signal, transcripts or tags, which is why the Ad Radar Data API, with pre-ranked winners already enriched, is the faster and cheaper route to ads worth studying.

In this article10 sections

The short version

If you want to know how to scrape the Facebook Ad Library, you have four options, and they differ less in what they return than in what they cost and how often they break. The official API is free but blind to most US commercial ads. Apify actors and scraper APIs return the same raw data the web Library shows. A DIY Playwright scraper costs nothing in software and a lot in maintenance.

What none of them returns is the part people actually want: which ads are spending, which are winning, and what the videos say. This guide compares the options with prices checked November 2026, shows a working code example, lists the work that is still left after the scrape, and ends with the shortcut that skips it: the Ad Radar Facebook ads API.

The four ways to scrape the Facebook Ad Library, compared

OptionCost per 1,000 adsUS-only commercial adsVideo filesBreaks when Meta changes
Official Ad Library API$0NoNo, snapshot URL onlyRarely, versioned
Apify: apify/facebook-ads-scraper$3.40 to $5.80 (by Apify plan)YesYes, expiring URLsMaintainer fixes it
Apify: curious_coder, Data Xplorer$0.50 to $0.75YesYes, expiring URLsMaintainer fixes it, maybe
ScrapeCreators APIabout $0.03 to $0.06 (per request, ~30 ads each)YesYes, expiring URLsVendor fixes it
SearchAPI (meta_ad_library engine)about $0.13 (at ~30 ads per request, page size not documented)YesYes, expiring URLsVendor fixes it
DIY Playwright$0 software, plus proxies and your timeYesYes, expiring URLsYou fix it
Ad Radar Data API (enriched, not a scraper)about $0.30 at 100 per page on BuilderYes: proven winners with $50k+ estimated spendPublic poster and video URLs that do not expireNot your problem

Prices come from each vendor's page, checked November 2026: Apify Facebook Ads Scraper, curious_coder, Data Xplorer, ScrapeCreators, SearchAPI. Per-request prices assume you use the plan's full quota.

The last row is a different kind of product. Every ad it returns is already a proven winner, with estimated spend, a score, the full transcript and ten tags. The other rows give you raw ads and a long list of work, which we get to below.

Option 1: the official Meta Ad Library API

Meta's sanctioned route is the ads_archive Graph API endpoint. It is free. You need a Facebook account that has completed identity and location confirmation, a Meta for Developers account and an app. The full setup and field list are in our guide to the Meta Ad Library API, and a working client is in Facebook Ad Library API with Python.

The catch is coverage. Meta's ads_archive reference says: "Ads that did not reach any location in the EU will only return if they are about social issues, elections or politics." A US DTC brand that never ran in Europe returns nothing, even though its ads are visible in the web Library.

Rate limits exist but Meta doesn't publish a number. The reference lists error 613, "Calls to this api have exceeded the rate limit," and third-party guides use roughly 200 calls per hour as a planning figure. Build back-off into your client either way.

Use the API for political ad research and for brands that also run in the EU. For US commercial ads, you have to scrape the web Library or pay someone who does.

Option 2: Apify actors

Apify is a marketplace of hosted scrapers ("actors"). You paste Ad Library URLs or a Page URL, set a limit, and get a dataset back as JSON, CSV or Excel. Search Apify for "Facebook Ad Library" and you'll find dozens. Three worth knowing, checked November 2026:

ActorPrice per 1,000 adsUsersNotes
apify/facebook-ads-scraper$5.80 Free plan, $5.00 Starter, $4.20 Scale, $3.40 Businessabout 55,000 totalBuilt by Apify. Accepts Page, brand and search URLs; sorting by impressions; optional landing-page product data billed separately
curious_coder/facebook-ads-library-scraper$0.75about 54,600 totalCommunity actor, pay per event, no platform usage charge
data_xplorer/facebook-ads-library$0.50about 100 totalSame price on every plan; includes video URLs (HD/SD) and raw GraphQL records

The output looks like what the Library shows: archive ID, Page, start and end dates, active status, platforms, body text, title, CTA, link, images and video URLs, and the collation count (how many ads share the creative). Apify's own actor also exposes a spend field, and its sample output shows it as null for ordinary ads. That is not a bug in the actor. Meta doesn't publish spend for commercial ads.

Apify gets you a raw export without running infrastructure, but community actors are only as reliable as their maintainer, and every run still comes back with no spend, no winner signal, no transcript and no tags.

Option 3: scraper APIs (ScrapeCreators, SearchAPI)

Scraper APIs wrap the same raw Ad Library data in a REST endpoint, billed per request instead of per ad. The data is identical to what an Apify actor returns: what the Library shows, nothing more.

ScrapeCreators. The search endpoint is GET https://api.scrapecreators.com/v1/facebook/adLibrary/search/ads, with an x-api-key header and parameters for query, country, status, media type, dates and sort (total_impressions or most recent). There is a matching company ads endpoint that takes a pageId. Each request costs 1 credit, and pagination uses a cursor. In their own test one search returned 30 ads for 1 credit. Plans: $47 for 25,000 credits and $497 for 500,000. It also has a transcript endpoint: 1 credit per video up to two minutes, 10 credits per minute above that.

SearchAPI. The meta_ad_library engine on SearchAPI takes q or page_id, country, active status, media type, dates and sort_by (impressions_high_to_low by default), and returns ads with a snapshot block plus a next_page_token. Plans start at $40 for 10,000 searches. The page size isn't documented, so the cost per 1,000 ads in the table assumes a page of about 30 ads, like the Library's own pages.

Both vendors warn that pagination tokens get long. ScrapeCreators and SearchAPI each offer a POST variant for when a cursor is too big for a GET URL.

A small working example

This pulls every active US video ad from one Page through ScrapeCreators, follows the cursor, and writes one JSON line per ad. Replace the Page ID with the one from the brand's Ad Library URL (view_all_page_id=).

import json, os, time, requests

KEY = os.environ["SCRAPECREATORS_KEY"]
URL = "https://api.scrapecreators.com/v1/facebook/adLibrary/company/ads"
params = {"pageId": "123456789012345", "country": "US",
          "status": "ACTIVE", "media_type": "VIDEO"}

with open("ads.ndjson", "w") as out:
    while True:
        r = requests.get(URL, params=params,
                         headers={"x-api-key": KEY}, timeout=60)
        r.raise_for_status()
        body = r.json()
        for ad in body.get("results", []):
            snap = ad.get("snapshot") or {}
            out.write(json.dumps({
                "id": ad.get("ad_archive_id"),
                "page": ad.get("page_name"),
                "start": ad.get("start_date"),
                "variants": ad.get("collation_count"),
                "body": (snap.get("body") or {}).get("text"),
                "videos": [v.get("video_hd_url") or v.get("video_sd_url")
                           for v in snap.get("videos") or []],
            }) + "\n")
        cursor = body.get("cursor")
        if not cursor:
            break
        params["cursor"] = cursor
        time.sleep(1)

For 300 ads that is about ten requests. Download the videos in the same job, for the reason in the next section.

Option 4: DIY with Playwright

You can drive a headless browser to the Ad Library, scroll, and read either the rendered cards or the GraphQL responses the page fetches. It works for a weekend project. It stops working at volume, for four reasons.

  1. Login walls and checkpoints. The Library is public, but sustained traffic from one IP or a headless browser fingerprint gets interrupted by login prompts and checks. You end up rotating residential proxies and browser profiles.
  2. Rate limits. Responses slow down, return empty pages or error out once you push past an unpublished threshold. You only learn the threshold by hitting it.
  3. GraphQL changes. The page loads ads through internal GraphQL queries identified by a document ID, with response shapes that Meta changes without notice. Every change is a silent break: your scraper runs and returns nothing, or returns half the fields.
  4. Expiring video URLs. Video and image links point to Meta's CDN and are signed with an expiry timestamp (the oe parameter). Change it and the signature breaks; wait too long and the link returns an error. Fivetran's docs describe the same behavior for Meta video URLs. Store the ad ID, download media at scrape time, and re-fetch when you need a fresh link.

Paid scrapers absorb some of this, but none of them adds the missing data. DIY adds all four problems to your own backlog. If you only need the occasional video file, our guide to the Facebook Ad Library video downloader covers the manual routes.

What you still don't get after the scrape

Every method above returns the Library's data. The Library was built for transparency, not research, so five things are missing whichever route you take.

MissingWhy it mattersWhat it takes to add
SpendYou can't tell a $5K test from a $5M winnerA model. Meta shows spend only for political and issue ads. See estimating competitor ad spend
Winner signalMost active ads are tests that will be off in two weeksHistory: days live, variant count and spend tracked over time. See how to find winning Facebook ads
TranscriptsIn video ads the hook is spoken, not writtenDownload every video and transcribe it. OpenAI lists $0.006 per minute for Whisper and $0.003 for gpt-4o-mini-transcribe, so 1,000 videos of 45 seconds cost about $2 to $5
TagsYou can't filter by hook pattern, angle or formatA fixed vocabulary and a model pass per ad. Our guide to AI ad tagging explains the trade-offs
HistoryInactive commercial ads drop out of the LibraryYour own database, snapshotted daily, from day one

The transcript gap is the expensive one in practice. On the Ad Radar board most winning ads are video, and the opening line is almost always spoken rather than in the written copy. A text-only scrape misses the hook.

History is the one you can't buy back. If you start scraping today, you have today's ads. You don't have the winner that ran from March to July and stopped.

Meta's Automated Data Collection Terms say you may not collect data from its products by automated means without Meta's express written permission. Meta enforces this with lawsuits and account bans. In the other direction, in Meta Platforms v. Bright Data (N.D. Cal., January 2024) the court found that logged-out scraping of public data was not covered by the terms Meta sued under, as summarized by Farella Braun + Martel. That is one district court decision on specific facts, not a general rule.

What this means in practice: the official API is the sanctioned route; third-party scrapers and APIs carry whatever risk their method carries; and data use matters as much as collection, especially where personal data is involved (Apify's own FAQ notes that public Ad Library data can still count as personal data under GDPR). If you're building a product on scraped data, get advice from a lawyer in your jurisdiction.

Skip the scrape: the Ad Radar Data API

A raw scrape is where the work starts. To turn it into something you can rank, search and show to users, you also need:

  • daily re-scrapes to build days live and history,
  • media downloads before the links expire,
  • transcription for every video,
  • a spend model and a winner rule,
  • tagging, storage and a search index,
  • someone to fix all of it when Meta changes a GraphQL query.

That pipeline is months of engineering, and it still starts with no history. The Ad Radar Facebook ads API is the finished output of it, and the best database of winning Meta ads you can call from code. It covers 2,761 Meta ads with $50k+ in estimated spend from 734 brands, built from the public Meta Ad Library and refreshed daily. Each ad comes with headline, body, CTA, the full video transcript, an estimated spend (USD, modeled from the ad's public engagement), a score, a tier (winner = top 10% live 21+ days, or rising), days running, variants, tags on ten dimensions such as hook pattern, narrative angle, awareness level and production format, and public poster and video URLs.

curl "https://app.ad-radar.dev/api/v1/ads/search?q=skillet&tier=winner&format=video&limit=2" \
  -H "Authorization: Bearer $AD_RADAR_KEY"

AD_RADAR_KEY is your API key from Settings → API after checkout. Responses are JSON with cursor pagination, up to 100 results per page. The same key works on the MCP server if you'd rather query from Claude. The full endpoint list is in the API docs.

Plan (billed every 4 weeks)PriceRequestsGood for
Builder$29910,000Showing the data inside your product (no raw redistribution); includes the web app
Scale$79950,000Adds /feed for incremental sync and higher rate limits
Resellerfrom $2,000Custom/export as NDJSON, resale and white-label, by request

Every ad you get back has already passed the filter a scraper can't apply: real estimated spend, weeks live, ranked against its peers, with the script transcribed and tagged. Start on Builder and run the request above on the brands you were about to scrape; all plans are on /api#pricing. For other sources of Meta ad data, see our guide to the Facebook ads dataset options, and for how winners are chosen, our methodology.

Which route to pick

  1. Political or EU transparency research: the official API.
  2. A one-off raw export: an Apify actor, knowing you get no spend, ranking, transcripts or tags.
  3. Winning ads for research, briefs, a product or an agent: the Ad Radar Facebook ads API. It is the fastest and cheapest way to get ranked, transcribed and tagged winners, with no scraper to maintain.
  4. Not a developer: the Ad Radar winning ads library gives you the same kind of ranked winners in the browser.

Figures marked as estimated spend come from Ad Radar's model of engagement on public Meta Ad Library ads. They are estimates, labeled as such, and are best used to rank ads against each other. How the board is built.

FAQ

Questions

Is it legal to scrape the Facebook Ad Library?

It depends on your jurisdiction and use, so ask a lawyer. Meta's Automated Data Collection Terms prohibit automated collection without Meta's express written permission. In Meta v. Bright Data (2024) a US district court found that logged-out scraping of public data was not covered by the terms Meta sued on. That is one ruling, not a general permission. The official Ad Library API is the route Meta sanctions.

What is the cheapest way to scrape the Meta Ad Library?

For raw ads, a per-request scraper API: ScrapeCreators charges one credit per search request, and one request returned 30 ads in its own test, roughly $0.06 per 1,000 ads on the $47 plan. Apify actors run from $0.50 to $5.80 per 1,000 ads. But raw ads are the cheap part: spend estimates, transcripts, tags, history and maintenance cost far more. For ranked winners, the Ad Radar Data API is cheaper than building that pipeline.

What is the best alternative to scraping the Facebook Ad Library?

The Ad Radar Data API. Instead of raw ads, it returns only Meta ads with $50k+ estimated spend, from 734 brands, refreshed daily, each with a score, a tier, the full video transcript and tags on ten dimensions, over REST and MCP. The Builder plan is $299 every 4 weeks for 10,000 requests, up to 100 ads per request.

Which Apify actor is best for the Facebook Ad Library?

Apify's own Facebook Ads Scraper (apify/facebook-ads-scraper) costs $3.40 to $5.80 per 1,000 ads depending on your plan. Community actors such as curious_coder's ($0.75 per 1,000) and Data Xplorer's ($0.50 per 1,000) cost less, with output fields and reliability that vary by maintainer. All of them return raw Library data with no spend, winner signal, transcript or tags.

Can I get ad spend by scraping the Facebook Ad Library?

Not for ordinary commercial ads. The Library shows spend ranges only for ads about social issues, elections or politics. Scrapers return a spend field, but it is empty for commercial ads. Any spend figure for a DTC ad is an estimate from a model, and should be labeled that way.

Why do scraped Facebook ad video links stop working?

The video URLs point to Meta's CDN and are signed with an expiry time. After it passes, the link returns an error. Download the file soon after scraping, or store the ad ID and fetch a fresh URL when you need the video again.

Ad data and APIs

Keep reading

All 22 articles in Ad data and APIs

Build on ads that are already winning.

Skip the scraping, storage, transcription and tagging. Query the corpus from your code or your agent.

Builder: 10,000 requests every 4 weeks over REST and MCP, $299. Scale and Reseller for bigger volumes.