Meta Ads Library Scraper avatar

Meta Ads Library Scraper

Pricing

from $0.25 / 1,000 results

Go to Apify Store
Meta Ads Library Scraper

Meta Ads Library Scraper

Scrape Meta (Facebook/Instagram) Ad Library by keyword, advertiser, or Ad Library URL. Keyless GraphQL reverse-engineering — no Facebook login, no API key, no developer account.

Pricing

from $0.25 / 1,000 results

Rating

0.0

(0)

Developer

Aurenic

Aurenic

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

2

Monthly active users

2 days ago

Last modified

Categories

Share

Scrape Meta (Facebook and Instagram) Ad Library by keyword, advertiser page ID, or full Ad Library URL — keyless, no Facebook login, no API key, no developer account.

What does Meta Ads Library Scraper do?

This actor reverse-engineers the internal GraphQL endpoint that powers Meta's public Ad Library web UI. It accepts keyword searches, numeric Facebook page IDs, or full Ad Library URLs, then paginates through results using Meta's own cursor-based GraphQL pagination. It returns structured ad records including ad copy, creative URLs, CTA text, landing pages, platform placement, active status, and — where Meta publishes it — spend and reach estimates for political/issue ads.

Output fields

Standard ad record

FieldTypeDescription
ad_archive_idstringMeta's archived ad identifier
page_idstringNumeric Facebook page ID
page_namestringAdvertiser page display name
is_activebooleanWhether the ad is currently running
start_date_formattedstringAd start date (YYYY-MM-DD)
end_date_formattedstringAd end date, if stopped
publisher_platformarrayPlatforms (facebook, instagram, audience_network, messenger)
ad_creative_bodystringPrimary ad copy text
cta_textstringCall-to-action button label
cta_typestringCTA enum (SHOP_NOW, LEARN_MORE, …)
link_urlstringLanding page URL
captionstringDisplayed domain caption
image_urlsarrayCreative image URLs
video_urlsarrayCreative video URLs
spendobjectSpend range (political/issue ads only)
reach_estimateobjectReach range (political/issue ads only)
impressionsobjectImpression range (political/issue ads only)
advertiserobjectAdvertiser transparency data
collation_countintegerNumber of creative variants in this collation
source_querystringWhich input source produced this row
scraped_atstringISO timestamp

Who is it for?

  • Performance marketers running competitive ad research and creative swipe-file workflows
  • Media buyers monitoring competitor ad launches, rotation cadence, and landing page changes
  • Brand strategists tracking share-of-voice and messaging shifts across Facebook and Instagram
  • Compliance teams auditing political, housing, employment, and credit ad transparency data
  • Data teams building ad intelligence pipelines and alerting on new creatives
  • Agencies onboarding new clients by pulling their live and historical ad inventory

Pricing

Pay per result: $0.30 per 1,000 ads scraped.

You are charged only for ads actually written to the dataset. A blocked or rate-limited run that returns no ads is not billed.

How to use it

  1. Open the actor in Apify Console.
  2. Provide at least one input source: keyword queries, advertiser page IDs, or full Ad Library URLs.
  3. Set your country filter (or leave as ALL for worldwide).
  4. Choose ad status (active, inactive, or both), ad category, and media type filters.
  5. Optionally set a max results per source cap to control cost.
  6. Leave the proxy setting at the default (Apify residential proxy).
  7. Click Start and export the dataset as JSON, CSV, or Excel.

Output example

{
"ad_archive_id": "1599744897819025",
"page_id": "122105379866001758",
"page_name": "Cuidalia",
"is_active": true,
"start_date_formatted": "2026-09-01",
"end_date_formatted": null,
"publisher_platform": ["facebook", "instagram"],
"ad_creative_body": "Tu descanso merece la mejor almohada...",
"cta_text": "Comprar",
"cta_type": "SHOP_NOW",
"link_url": "https://cuidalia.org",
"caption": "cuidalia.org",
"image_urls": ["https://scontent-mad1-1.xx.fbcdn.net/..."],
"video_urls": [],
"spend": null,
"reach_estimate": null,
"impressions": null,
"advertiser": null,
"collation_count": 3,
"source_query": "cuidalia",
"scraped_at": "2026-09-28T12:00:00.000Z"
}

Technical details

  • Stack: Node.js 24, apify SDK, impit HTTP client with Chrome TLS impersonation.
  • Anti-bot: The actor handles Meta's per-session __rd_verify challenge automatically (GET → 403 with 481-byte challenge body → POST verify path → re-GET → 200). The doc_id for AdLibrarySearchPaginationQuery is harvested from the live JS bundle on each run and falls back to a known-good value.
  • Proxy: Residential proxy is required. Meta's GraphQL pagination endpoint returns HTTP 200 carrying a GraphQL rate-limit error envelope to datacenter IPs. The default proxy configuration is Apify residential.
  • Pagination: Cursor-based via page_info.end_cursor, up to 60 pages per source. 1.2–3 second randomized delay between pages.
  • Extraction: Direct GraphQL response parsing — no HTML scraping of rendered results.

Known limits

  • Commercial ad spend and reach are not available. Meta publishes spend, impressions, and audience demographics only for political/issue ads and EU DSA-covered ads. No scraper can retrieve these for standard commercial ads.
  • Residential proxy bandwidth is billed separately by Apify at the platform's standard residential rate. This is in addition to the per-result actor price.
  • The 60-page cap per source is imposed by this actor to bound run cost; Meta's own pagination may go deeper.
  • Sorting by true ad launch time is not reliable. Meta's start_date field reflects impression delivery windows, not the actual date the ad first went live. The Ad Library API does not expose a sortable launch timestamp.
  • Meta rotates the GraphQL doc_id periodically. The actor harvests it live, but a rotation between harvest and pagination can force a fallback value that may be stale.

FAQ

Do I need a Facebook account or API key? No. The actor uses the same public GraphQL endpoint the Ad Library web UI calls. No login, no token, no developer account, no App Review.

Why is residential proxy required? Meta's /api/graphql/ pagination endpoint applies a stricter per-IP rate limit than the public search page. A datacenter IP gets an HTTP 200 with a Rate limit exceeded GraphQL error envelope on the first pagination request. Residential exits clear this.

Can I get spend and impressions for commercial ads? No — and no other scraper can either. Meta publishes those fields only for political/issue ads and EU DSA ads. Any actor claiming otherwise for commercial ads is fabricating data.

How many ads can I get per run? Up to 60 pages × 30 ads = 1,800 ads per source, capped by maxResultsPerSource if set. Multiple sources run sequentially.

Does it support Instagram ads? Yes. Meta's Ad Library covers Facebook, Instagram, Audience Network, and Messenger. The publisher_platform field on each ad tells you where it ran.

What if the run returns zero ads? Check that your proxy is residential. If you overrode the proxy field, ensure RESIDENTIAL is still in the groups. Datacenter proxies will silently produce empty runs.

Support

Open an issue on the Actor's page for bugs or feature requests.

Changelog

0.1 — 2026-09-28

  • Initial build. Keyless GraphQL reverse-engineering of Meta Ad Library.
  • __rd_verify challenge handling (GET → POST → re-GET).
  • Live doc_id harvest with fallback.
  • Cursor-based pagination via AdLibrarySearchPaginationQuery.
  • Residential proxy default.
  • Input modes: keyword queries, advertiser page IDs, full Ad Library URLs.
  • Filters: country, active status, ad category, media type, sort mode.
  • Output schema with 22 fields including creative URLs, CTA, platform placement, and political-ad spend/reach.