Facebook

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.

FieldDescriptionType
pageNameAdvertisertext
adTextAd Texttext
adTitleHeadlinetext
ctaTextCTAtext
linkUrlLanding Pagelink
isActiveActiveboolean
startDateStarteddate
endDateEndeddate
publisherPlatformsPlatformsarray
displayFormatFormattext
adLibraryUrlAd Library URLlink

Input parameters

Generated from the Actor’s input schema — the same fields the Apify console shows.

ParameterTypeRequiredDescription
searchTermsarrayOptionalKeywords to search the Ad Library for. Each keyword is searched separately and returns up to the maximum number of ads below.
pageIdsarrayOptionalNumeric 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=…).
startUrlsarrayOptionalFacebook 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.
countrystringOptionalTwo-letter country code of the Ad Library region to search (for example US, GB, DE). The Ad Library returns ads shown in that country.
adActiveStatusstringOptionalWhether to return ads that are currently running, ads that have stopped, or both.
adTypestringOptionalRestrict 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.
mediaTypestringOptionalReturn only ads whose creative is of this type. "No image or video" returns text-only ads.
publisherPlatformsarrayOptionalReturn 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.
dateFromstringOptionalKeep 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.
dateTostringOptionalKeep 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.
maxItemsintegerOptionalMaximum number of ads to scrape for each keyword, advertiser page ID or start URL — not for the run as a whole.
proxyConfigurationobjectOptionalProxy 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.

Inputjson
{}
REST — run and get resultsbash
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 '{}'
JavaScript — apify-clientjavascript
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)
Python — apify-clientpython
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

99.4% run success rate

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.

Field and input tables are generated from this Actor's published schemas. Usage figures measured 2026-08-24 from the Apify listing.