Facebook Ads Library Scraper avatar

Facebook Ads Library Scraper

Pricing

from $1.40 / 1,000 ads

Go to Apify Store
Facebook Ads Library Scraper

Facebook Ads Library Scraper

Collects public ads from Facebook Ads Library by URL, keyword, or advertiser page ID. Returns ad copy, platforms, dates, and optional advertiser details.

Pricing

from $1.40 / 1,000 ads

Rating

0.0

(0)

Developer

Scraptivo

Scraptivo

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Categories

Share

Facebook Ads Library Scraper collects public ads from the Facebook Ads Library and turns them into structured records for competitive research, creative monitoring, and advertiser discovery. Provide an Ads Library URL, a keyword such as Nike, or advertiser page IDs, then export page name, ad text, CTA, platforms, dates, and destination links to JSON, CSV, Excel, or your preferred integration. Use it to archive live and inactive creatives, compare campaigns across Facebook and Instagram, and schedule recurring keyword scans. Pricing starts at $1.70 per 1,000 ads, with optional ad details at $1.50 per 1,000.

What can you automate with Facebook Ads Library Scraper?

  • Build a searchable ad archive — Collect live and inactive ads for any keyword, country, or advertiser page and keep creatives, copy, and landing pages in one dataset.
  • Compare creatives across platforms — See where each ad ran on Facebook, Instagram, Messenger, Audience Network, and Threads, plus format, CTA, and destination URL.
  • Monitor competitors on a schedule — Re-run the same query weekly or daily to spot new creatives, status changes, and impression windows without opening Ads Library by hand.
  • Enrich selected ads with advertiser context — Turn on Include ad details to add advertiser about text, Instagram handle, page verification, spend signals, and creative variants.
  • Discover companies in a niche — Switch to Unique advertisers only to return one row per company instead of every creative, then export the advertiser list to a sheet or CRM.
  • Feed reporting and research pipelines — Export JSON, CSV, or Excel, or push completed runs into Google Sheets, a warehouse, or a webhook.

Who is this scraper for?

TeamWorkflow
Media buyers and performance marketersTrack competitor creatives, CTAs, and landing pages for a keyword or brand.
Agencies and creative strategistsArchive ads by country, category, and platform to brief new campaigns.
Ad resellers and lead researchersUse unique-advertiser mode to list companies running ads in a niche.
Brand and market researchersMeasure who is active, which formats they use, and how copy changes over time.

What data can you collect from Facebook Ads Library?

Data groupExample fieldsHow it helps
Advertiser identitypage_name, page_id, page_profile_url, page_like_count, page_categoriesIdentify the page behind each ad and deduplicate companies with page_id.
Ad copy and CTAbody_text, title, caption, link_description, cta_text, cta_typeCompare messaging and calls to action without opening each creative.
Mediadisplay_format, images, videos, cardsReview image, video, and carousel assets in the dataset.
Platforms and schedulepublisher_platforms, is_active, start_date, end_date, total_active_timeSee where the ad ran and how long it has been active.
Reach and linksimpressions, targeted_countries, reach_estimate, spend, link_url, ads_library_urlQualify volume and open the Ads Library permalink or destination URL.
Ad details (optional)advertiser_about, ig_username, ig_followers, page_verification, variant_count, variant_adsEnrich a shortlist when Include ad details is enabled.
Unique advertisers (optional)record_type, page_id, ad_count, ads_library_urlOne company row per page when Unique advertisers only is enabled.

Listing fields come from the Ads Library results. Detail fields appear only when Include ad details is on. Unique-advertiser rows replace per-ad records and do not include full creative copy. Some values are empty when Ads Library does not publish them.

How to use Facebook Ads Library Scraper

  1. Open the Facebook Ads Library Scraper on Apify.
  2. Paste one or more Ads Library URLs, or enter Search queries such as Nike with a country and filters.
  3. Set Max ads / advertisers and optional switches — Include ad details, Unique advertisers only, category, platforms, dates, or media type.
  4. Run the Actor — it collects matching public Ads Library records.
  5. Export the dataset or connect it to your workflow.
{
"searchQueries": ["Nike"],
"country": "US",
"activeStatus": "active",
"maxItems": 50,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}

Example workflow

Build a weekly competitor creative archive for a brand keyword

  1. Schedule a Monday run with searchQueries = ["Nike"], country = US, and activeStatus = active.
  2. Keep Include ad details off for a high-volume creative snapshot, or enable it on a smaller maxItems run when you need Instagram handles and variants.
  3. Send new records to Google Sheets or a reporting warehouse through a webhook after each run.
  4. Deduplicate user-side on ad_archive_id for ads, or on page_id when Unique advertisers only is enabled.
  5. Compare body_text, cta_text, publisher_platforms, and start_date in your own sheet to spot new creatives.

The Actor returns structured Ads Library records. Filtering, scoring, and outreach happen in the tools you already use.

Automate and integrate your results

  • Schedules — Ads Library creatives change often. Run daily for active brand keywords and weekly for broader category scans. Create a separate schedule per query and country (for example "Nike — US" and "insurance — GB") so each task keeps its own dataset.
  • Webhooks — Fire a webhook on run completion to push fresh ads into Google Sheets, Slack, a CRM, or a warehouse.
  • Exports and API — Download JSON, CSV, or Excel from the Apify Console, or start a run from the API:
curl "https://api.apify.com/v2/acts/scraptivo~facebook-ads-scraper/runs?token=YOUR-APIFY-TOKEN" \
-H "Content-Type: application/json" \
-d '{
"searchQueries": ["Nike"],
"country": "US",
"activeStatus": "active",
"maxItems": 50,
"proxyConfiguration": {
"useApifyProxy": true,
"apifyProxyGroups": ["RESIDENTIAL"]
}
}'
  • Deduplication — Each run appends a new dataset. Use ad_archive_id as the stable key for ads and page_id for unique-advertiser rows. Cap volume with maxItems.

Input reference

FieldTypeRequiredDefaultWhat it controls
startUrlsArray of URLsNo*Facebook Ads Library search URLs. Filters encoded in the URL are used as-is.
searchQueriesArray of stringsNo*Keywords to search when you are not relying only on a pasted URL. Each query is a separate search.
searchTypeStringNokeyword_unorderedHow keywords are matched: keyword_unordered, keyword_exact, or page. Page search is used automatically when advertiser page IDs are provided.
pageIdsArray of stringsNo*Facebook page IDs for a specific advertiser (Ads Library view_all_page_id).
countryStringNoUSAds Library country dropdown, including ALL.
categoryStringNoallall, political (issues, elections or politics), housing, employment, or financial.
activeStatusStringNoallall, active, or inactive.
mediaTypeStringNoallall, image, meme (images and memes), or video.
publisherPlatformsArray of stringsNofacebook, instagram, messenger, audience_network, threads. Empty = all platforms.
sortByStringNomost_recentmost_recent or impressions (high to low).
startDateDateNoOnly include ads that started running on or after this date.
endDateDateNoOnly include ads that started running on or before this date.
impressionWindowStringNoanyAudience window: any, last_7_days, last_30_days, or last_90_days.
isTargetedCountryBooleanNofalseMatch Ads Library's targeted-country flag.
includeAdDetailsBooleanNofalseOpen each ad's detail pane for advertiser profile, Instagram, spend, transparency, and creative variants. Charged as ad-details.
detailsConcurrencyIntegerNo8How many ad-detail requests run at once (1–20). Used only when Include ad details is on.
uniqueAdvertisersOnlyBooleanNofalseReturn one row per company instead of every ad. Charged as Unique Ads (filter-run) once per ad scraped, including collapsed repeats.
maxItemsIntegerNo0Maximum ads (or unique advertisers) to write. 0 = unlimited.
proxyConfigurationProxy objectNoApify proxy, RESIDENTIALProxy settings. Residential proxies are recommended.

* Provide at least one Ads Library URL, search query, or advertiser page ID.

Which source should I use?

Paste startUrls when you already have an Ads Library search open and want those URL filters used as-is. Use searchQueries plus country and filters when you want the Actor to build the search. pageIds scrape a specific advertiser. You can combine sources: each URL and each query becomes its own search. Explicit filter fields overlay values parsed from a URL.

How does Unique advertisers only charge?

The Actor still opens every matching ad to build the company list. Unique Ads (filter-run) is charged per ad scraped, not per row written. If 100 ads collapse to 70 companies, you get 70 dataset rows and 100 filter-run events. maxItems caps the number of advertiser rows written, not the ads walked to produce them.

What does Include ad details add?

When includeAdDetails is true, each ad can include advertiser about text, Instagram username and followers, page verification, spend signals when present, and variant_ads / variant_count. This adds an ad-details charge on top of the listing charge. Unique-advertiser mode returns company rows instead of creatives, so detail enrichment applies to normal ad runs.

Output example

Each dataset item is one ad (record_type: ad). A listing record looks like this:

{
"record_type": "ad",
"ad_archive_id": "2895769867482327",
"page_name": "Alli Hanson",
"page_id": "101900028661031",
"body_text": "Nike Ja 3 Kool-Aid men’s size 9 - $85.00",
"title": "Nike Ja 3 Kool-Aid men’s size 9",
"cta_text": "Contact us",
"display_format": "IMAGE",
"is_active": true,
"start_date": "2026-08-31",
"publisher_platforms": ["FACEBOOK", "INSTAGRAM"],
"impressions": "<100",
"link_url": "https://facebook.com/marketplace/item/1046035275085979/",
"ads_library_url": "https://www.facebook.com/ads/library/?id=2895769867482327"
}

When Unique advertisers only is enabled, each row is record_type: advertiser with page_id, page_name, ad_count, and the advertiser Ads Library URL.

How much does it cost to scrape Facebook Ads Library?

The Actor uses pay-per-event pricing. A one-time Actor Start (apify-actor-start) of $0.00005 is charged at the beginning of each run. Result events:

  • Ad (dataset-item) — $1.70 / 1,000 ads for each ad written in a normal run.
  • Ad Details (ad-details) — $1.50 / 1,000 for each ad opened when Include ad details is enabled.
  • Unique Ads (filter-run) — $1.70 / 1,000 ads scraped in Unique advertisers only mode, including ads collapsed as repeats.

A listing-only run of 100 ads costs about $0.17 plus the start fee. 1,000 ads cost $1.70; the same 1,000 ads with details cost $3.20. In unique-advertiser mode, 100 ads that collapse to 70 rows still charge 100 Unique Ads events ($0.17), not 70. Apify paid-plan discounts apply: ads and unique ads are $1.60 / $1.50 / $1.40 per 1,000 on Bronze / Silver / Gold; ad details are $1.40 / $1.30 / $1.20 per 1,000. Residential proxy traffic is billed through your Apify proxy usage. When an event spending limit is reached, the run stops and the log reports which limit was hit.

Reliability and responsible use

  • Proxy requirement — The Actor defaults to the Apify proxy with the RESIDENTIAL group. Residential proxies are recommended for Ads Library.
  • Partial failures — One failed ad or search does not stop the run; remaining searches continue.
  • Conditional fields — Detail fields appear only when Include ad details is enabled. Unique-advertiser rows omit per-ad creative fields. Ads Library also leaves some values unset.
  • Public data — The Actor collects publicly visible Ads Library listings and optional public detail fields.
  • Responsible use — Use collected data in ways that comply with Meta's terms and applicable law. This Actor does not access private account data.

Frequently asked questions

Can I scrape ads from Facebook Ads Library by keyword or page ID?

Yes. Enter keywords in searchQueries (for example Nike) with a country and filters, paste Ads Library URLs in startUrls, or pass pageIds to collect ads for a specific advertiser. At least one of those sources is required.

Can I schedule Facebook Ads Library Scraper to run automatically?

Yes. Open the Scheduler in Apify Console and set a daily or weekly cadence. Create separate schedules per keyword and country so each run stays focused and easier to deduplicate.

What counts as one result?

In a normal run, each ad written to the dataset is one Ad (dataset-item) event at $1.70 per 1,000. Include ad details adds one Ad Details event per enriched ad at $1.50 per 1,000. In Unique advertisers only mode, Unique Ads (filter-run) counts each ad scraped at $1.70 per 1,000, even when those ads collapse into fewer company rows.

Why are some fields empty?

Advertiser about, Instagram, verification, spend, and variants are collected only when Include ad details is on. Unique-advertiser rows do not include full ad copy. Ads Library also omits impressions, spend, end date, or media for some listings, so a null value usually means the library has no data for that field.

How do I avoid duplicate records?

The Actor appends results on every run and does not deduplicate across runs. Merge on ad_archive_id for ads and page_id for unique advertisers. Set maxItems to cap each run.

Do I need a proxy?

Residential proxies are recommended and are the default proxyConfiguration. If a run returns unusually few ads, confirm the RESIDENTIAL group is selected, then widen tight filters such as inactive + a rare keyword.

Support and custom workflows

Need a different field, source, or delivery workflow? Contact Scraptivo at scraptivo@gmail.com. Include the Actor name, sample URL, required fields, and expected volume so we can assess the request.