Facebook Ads Library Scraper
Scrape the public Facebook Ad Library without logging in: ad copy, titles, images and videos, CTA buttons, landing page links, run dates, platforms and advertiser details, by keyword or advertiser page ID in any country.
What it extracts
Every field below comes from the Actor’s published dataset schema.
| Field | Description | Type |
|---|---|---|
pageName | Advertiser | text |
adText | Ad Text | text |
adTitle | Headline | text |
ctaText | CTA | text |
linkUrl | Landing Page | link |
isActive | Active | boolean |
startDate | Started | date |
endDate | Ended | date |
publisherPlatforms | Platforms | array |
displayFormat | Format | text |
adLibraryUrl | Ad Library URL | link |
Input parameters
Generated from the Actor’s input schema — the same fields the Apify console shows.
| Parameter | Type | Required | Description |
|---|---|---|---|
searchTerms | array | Optional | Keywords to search the Ad Library for. Each keyword is searched separately and returns up to the maximum number of ads below. |
pageIds | array | Optional | Numeric Facebook page IDs to pull every ad from one advertiser. Find a page ID in the Ad Library URL of an advertiser's ads (view_all_page_id=…). |
startUrls | array | Optional | Facebook Ad Library search URLs, pasted straight from the browser — for example https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=GB&q=running%20shoes. Country and filters in the URL override the ones set below. |
country | string | Optional | Two-letter country code of the Ad Library region to search (for example US, GB, DE). The Ad Library returns ads shown in that country. |
adActiveStatus | string | Optional | Whether to return ads that are currently running, ads that have stopped, or both. |
adType | string | Optional | Restrict the search to one of the Ad Library's special categories. Political and issue ads are the only category that discloses impressions and spend ranges. |
mediaType | string | Optional | Return only ads whose creative is of this type. "No image or video" returns text-only ads. |
publisherPlatforms | array | Optional | Return only ads that ran on at least one of the selected platforms. Leave empty for all platforms. Facebook decides which platforms it lists for an ad, so a few results can come back without the platform you picked. |
dateFrom | string | Optional | Keep only ads that were running on or after this date (YYYY-MM-DD). This is the Ad Library's own date filter: it matches ads whose run overlaps the window, so an older ad still running in the window is included. |
dateTo | string | Optional | Keep only ads that were running on or before this date (YYYY-MM-DD). Combine with the field above for a window, or use either on its own. |
maxItems | integer | Optional | Maximum number of ads to scrape for each keyword, advertiser page ID or start URL — not for the run as a whole. |
proxyConfiguration | object | Optional | Proxy configuration. Defaults to Apify residential proxies, which is what the Ad Library was measured working through; it refuses unrecognised clients until they pass a verification check. |
API access
Run this Actor from your own code over the Apify API.
{}curl -X POST \
"https://api.apify.com/v2/acts/logical_scrapers~facebook-ads-library-scraper/run-sync-get-dataset-items?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'import { ApifyClient } from 'apify-client'
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' })
const run = await client.actor('logical_scrapers~facebook-ads-library-scraper').call({})
const { items } = await client.dataset(run.defaultDatasetId).listItems()
console.log(items)from apify_client import ApifyClient
client = ApifyClient("YOUR_API_TOKEN")
run = client.actor("logical_scrapers~facebook-ads-library-scraper").call(run_input={})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)Runs are executed on Apify. Create an API token in your Apify account, then call the Actor over REST or with the official client for your language. The same input object works in the Apify console, so you can test interactively before automating.
Pricing
Data not currently verified. This Actor's pricing model is not declared in our source repository.
Current rates are published on the Apify listing and can change, so they are not duplicated here. See pricing on Apify
Reliability
Measured across all public Goldmine Actors on Apify, 2026-08-24. This is an account-level figure, not a per-Actor benchmark — per-Actor speed and completeness benchmarks are not yet published. Source.