Meta Ads Library Scraper (Optimized for Developers) avatar

Meta Ads Library Scraper (Optimized for Developers)

Under maintenance

Pricing

from $2.99 / 1,000 ads

Go to Apify Store
Meta Ads Library Scraper (Optimized for Developers)

Meta Ads Library Scraper (Optimized for Developers)

Under maintenance

Scrape ads from Facebook Ad Library without cookies or authentication. Search by keywords or page names, filter by country, ad status, ad type, and media type. Extracts ad text, page info, media URLs, dates, CTA, landing page links, and more.

Pricing

from $2.99 / 1,000 ads

Rating

0.0

(0)

Developer

w3crawler

w3crawler

Maintained by Community

Actor stats

0

Bookmarked

3

Total users

3

Monthly active users

20 days ago

Last modified

Categories

Features

Limited permissions

Share

Facebook Ads Library Scraper collects normalized records from the public Meta Ad Library. It searches by keyword or advertiser, accepts public Ad Library URLs, preserves the ad's creative and advertiser context, and follows a bounded amount of the page's public load-more behavior. It does not use login state, private APIs, CAPTCHA solving, stealth, or access-control bypasses.

Get started

  1. Open the Actor Store page and select Try for free or open the Input tab.
  2. Enter a query and country, or supply queries or public Ad Library startUrls for additional targets.
  3. Set maxPages, maxItems, and the status, ad-type, media, and platform filters for the data you need. Keep the limits small for the first run.
  4. Start the Actor, open the dataset, and export the saved records as JSON, CSV, or Excel. Open Run summary (OUTPUT) to check the outcome and counts.

Input

All fields are optional; the defaults below are ready to use. Unsupported field names and out-of-range values are rejected before requests start.

FieldTypeRequired?DefaultMeaning
querystringOptionalNikeOne public keyword or advertiser search term. Use this, queries, or startUrls. up to 200 characters.
queriesstring arrayOptionalNot suppliedOptional additional public keyword or advertiser searches. At most 10 searches are run with the shared maxItems limit. up to 10 items.
startUrlsobject arrayOptionalNot suppliedOptional existing public facebook.com/ads/library URLs. Only Meta Ad Library URLs are accepted; no external detail or private URLs are followed. up to 10 items.
countrystringOptionalUSTwo-letter ISO 3166-1 country code used by the public Ad Library search.
maxItemsintegerOptional50Maximum number of unique public ad records across all queries or URLs. 1–1000.
maxPagesintegerOptional10Maximum number of bounded list/load-more passes per search page. 1–20.
activeStatusstring enumOptionalallPublic Ad Library status filter. Allowed values: "all", "active", "inactive".
adTypestring enumOptionalallPublic Ad Library ad-type filter. Allowed values: "all", "political", "commercial".
mediaTypestring enumOptionalallPublic Ad Library media filter. Allowed values: "all", "image", "video".
platformstring enumOptionalallPublic publisher-platform filter used by the Ad Library URL. Allowed values: "all", "facebook", "instagram", "audience_network", "messenger".
includeDetailsbooleanOptionaltrueInclude public page metadata, categories, carousel cards, transparency fields, and other detail fields when exposed.
includeMediabooleanOptionaltrueInclude public image, video, preview, and media URL fields exposed in the page response.
includeRatingsbooleanOptionalfalseRead public rating/review fields only if Meta exposes them in the current Ad Library response; absent fields are omitted.
maxConcurrencyintegerOptional1Maximum number of public search pages processed at once. 1–3.
delayMsintegerOptional1500Bounded delay after page settling and list advancement. 0–5000.
maxRequestRetriesintegerOptional2Bounded Crawlee retries for a public page request. Access-denial pages are stopped, not retried to bypass the restriction. 0–5.
navigationTimeoutSecsintegerOptional120Maximum public page navigation time in seconds. 30–180.
requestHandlerTimeoutSecsintegerOptional600Maximum time allowed for one bounded public page handler. 60–900.
proxyConfigurationobjectOptional{}Optional Apify proxy configuration for permitted public traffic. A proxy is never used to bypass an access challenge; challenged pages fail closed.

Full default input:

{
"query": "Nike",
"country": "US",
"maxItems": 50,
"maxPages": 10,
"activeStatus": "all",
"adType": "all",
"mediaType": "all",
"platform": "all",
"includeDetails": true,
"includeMedia": true,
"includeRatings": false,
"maxConcurrency": 1,
"delayMs": 1500,
"maxRequestRetries": 2,
"navigationTimeoutSecs": 120,
"requestHandlerTimeoutSecs": 600,
"proxyConfiguration": {}
}

The Actor reads public data from Facebook. It uses one default query unless queries or startUrls supplies additional targets. Each startUrls entry is an object with a required url string pointing to a public facebook.com/ads/library URL. Optional proxyConfiguration uses the standard Apify Proxy settings and is never used to bypass a challenge.

Output

The dataset contains one row per saved public ad. The schema declares no required fields; optional information appears only when Meta publishes it in the current public Ad Library response, and missing values are omitted rather than inferred. No diagnostic or placeholder rows are written.

FieldTypeAvailabilityMeaning
urlstringWhen a Library ID is availableCanonical public Ad Library URL for the ad, constructed from its observed Library ID when available.
libraryIdstringWhen publishedMeta Ad Library ID shown on the public result card.
adIdstringWhen publishedPublic ad identifier when exposed in the structured response.
collationCountintegerWhen publishedNumber of ads grouped with this creative when exposed.
collationIdstringWhen publishedPublic creative-collation identifier when exposed.
pageIdstringWhen publishedPublic advertiser/page identifier.
pageNamestringWhen publishedAdvertiser or Facebook Page name shown with the ad.
pageUrlstringWhen publishedPublic advertiser/Page URL associated with the ad.
pageProfilePictureUrlstringWhen publishedAdvertiser profile image URL when the public ad snapshot exposes it.
pageLikeCountintegerWhen publishedPublic advertiser Page like count when exposed.
pageCategoriesstring arrayWhen publishedPublic advertiser Page categories.
categoriesstring arrayWhen publishedAd Library categories exposed for the ad.
adTextstringWhen publishedFull public primary text/body of the ad.
titlestringWhen publishedPublic creative title when exposed.
descriptionstringWhen publishedPublic link description or creative description.
captionstringWhen publishedPublic media caption or destination label.
linkUrlstringWhen publishedPublic destination URL exposed by the creative.
ctaLinkstringWhen publishedPublic call-to-action destination URL.
ctaTextstringWhen publishedPublic call-to-action label.
ctaTypestringWhen publishedPublic call-to-action type code when exposed.
displayFormatstringWhen publishedPublic creative format such as IMAGE, VIDEO, or CAROUSEL.
statusstringWhen publishedBusiness status shown by Ad Library, such as Active or Inactive.
isActivebooleanWhen publishedWhether the public structured response marks the ad active.
startDatestringWhen publishedISO timestamp for the observed ad start date.
endDatestringWhen publishedISO timestamp for the observed ad end date when exposed.
startDateTimestampintegerWhen publishedSource start-date Unix timestamp when exposed.
endDateTimestampintegerWhen publishedSource end-date Unix timestamp when exposed.
publisherPlatformsstring arrayWhen publishedPublic platforms on which the ad is shown.
impressionsIndexnumberWhen publishedPublic impressions index value when exposed; it is not an impression count.
impressionsTextstringWhen publishedPublic impressions label when exposed.
gatedTypestringWhen publishedPublic delivery eligibility code when exposed.
hideDataStatusstringWhen publishedPublic data-visibility status from the ad snapshot.
isAaaEligiblebooleanWhen publishedPublic AAA eligibility flag when exposed.
containsDigitalCreatedMediabooleanWhen publishedPublic flag indicating digitally created media when exposed.
containsSensitiveContentbooleanWhen publishedPublic sensitive-content flag when exposed.
pageIsDeletedbooleanWhen publishedPublic flag indicating whether the advertiser page is deleted.
isResharedbooleanWhen publishedPublic creative resharing flag when exposed.
disclaimerLabelstringWhen publishedPublic disclaimer label attached to the creative.
mediaUrlstringWhen publishedFirst valid image or video URL belonging to the ad creative.
imageUrlsstring arrayWhen publishedDeduplicated public image URLs belonging to the ad snapshot or its cards.
videoUrlsstring arrayWhen publishedDeduplicated public video or preview URLs belonging to the ad snapshot or its cards.
cardsobject arrayWhen publishedBounded public carousel-card creative data when exposed and requested.
regionalRegulationDataobjectWhen publishedPublic regional delivery/regulation flags when exposed.
targetedOrReachedCountriesobject arrayWhen publishedPublic country objects or codes associated with targeting/reach when exposed.
brandedContentobject | array | string | number | booleanWhen publishedPublic branded-content data when exposed; shape varies by creative.
ratingsobjectWhen publishedPublic advertiser/ad rating evidence only when requested and exposed.
platformstringWhen a row is savedRequested publisher-platform filter.
querystringWhen a row is savedKeyword or advertiser query that produced the record.
countrystringWhen a row is savedTwo-letter Ad Library country filter.
sourceUrlstringWhen a row is savedGenerated or supplied Ad Library search URL that produced the record.
searchUrlstringWhen a row is savedAlias for the producing Ad Library search URL.
sourcePageUrlstringWhen a result page is renderedRendered public result-page URL used for extraction and pagination provenance.
resultCountintegerWhen publishedPublic total result count reported by the search connection when exposed.
hasNextPagebooleanWhen publishedPublic search connection flag indicating more result data may be available.
pageNumintegerWhen a row is savedBounded page/load pass number in this Actor run.
positionintegerWhen a row is savedStable one-based output position across the run.
itemPositionintegerWhen a row is savedOne-based item position in the emitted run result set.
scrapedAtstringWhen a row is savedUTC time when the Actor normalized the record.

No current-schema ad rows are stored in the Actor's default local dataset, so the example is an empty array rather than an invented ad record:

[]

When rows are saved, only fields exposed by the current public Ad Library response are present. Requested filters and provenance fields such as query, country, platform, pageNum, position, and scrapedAt appear on produced records; an absent creative field is not replaced with a placeholder.

Run summary

Run summary is stored separately from the dataset in the run's key-value store under OUTPUT.

FieldMeaning
recordTypeSummary discriminator; always facebook-ads-library-run-summary.
idRun-summary identifier derived from the requested Ad Library search.
statusActor process outcome: SUCCEEDED or FAILED.
runStatusCanonical run status; matches status.
dataStatusCompleteness of the saved ads: COMPLETE, PARTIAL, NO_RESULTS, or FAILED.
queryCountNumber of keyword, advertiser, or URL targets processed.
itemCountUnique ad records saved to the dataset.
datasetItemsDataset rows written, matching itemCount for ad records.
diagnosticItemsDiagnostic dataset rows; always zero because diagnostics stay in the summary and logs.
diagnosticCountOperational issues recorded for the run.
blockedCountPublic responses that were blocked or presented an access-denial page.
pagesProcessedBounded public list or load-more passes processed.
dataAvailableWhether at least one source-backed ad was saved.
proxyConfiguredWhether an Apify Proxy configuration was supplied.
scrapedAtTime the summary was written, in ISO UTC.

No current-schema OUTPUT snapshot is stored in the Actor's default key-value store, so the summary table is shown without a value example. When present, OUTPUT uses the fields above and the statuses below.

StatusData statusMeaning
SUCCEEDEDCOMPLETEEligible ads were saved without an extraction problem.
SUCCEEDEDPARTIALSome ads were saved, but a later page or detail failed. Saved rows remain available.
SUCCEEDEDNO_RESULTSThe Ad Library search completed cleanly and returned no matching ads.
FAILEDFAILEDA fatal error occurred before any usable ad was saved.

Coverage and limitations

The Actor reads public data from the Meta Ad Library. It does not log in, use cookies, call private APIs, solve CAPTCHAs, or bypass access controls. Each run uses one default keyword unless queries adds searches or startUrls supplies Ad Library URLs; all targets share maxItems. maxPages bounds list and load-more passes, and activeStatus, adType, mediaType, and platform narrow the public result set.

Creative fields, advertiser details, carousel cards, media URLs, ratings, and regional transparency data appear only when the current public response exposes them and the corresponding include* option permits them. impressionsIndex is an index value, not an impression count. Access-denied or blocked pages are reported in OUTPUT and logs and are never retried to bypass the restriction. Optional proxyConfiguration is used only for permitted public traffic.

Usage and support

More page passes, larger item limits, media arrays, retries, and detail fields increase compute and runtime. Start with small item and page limits, inspect the dataset and run summary, then scale gradually. See the Actor's Pricing tab for current account rates. Use the Actor Issues page to report a problem. Include the run ID, the input used, and the run summary; do not include tokens, cookies, or private data. This Actor is not affiliated with Meta or Facebook. Use it only for public data and in accordance with the source's terms, robots guidance, and applicable law. Public pages can contain personal information; use the output only for lawful purposes.