VOOZH about

URL: https://apify.com/dexterous_seahorse/facebook-ads-library-scraper-for-claudecode

โ‡ฑ Facebook Ads Library Scraper for ClaudeCode ยท Apify


๐Ÿ‘ Facebook Ads Library Scraper for ClaudeCode avatar

Facebook Ads Library Scraper for ClaudeCode

Pricing

from $0.01 / 1,000 results

Go to Apify Store

Facebook Ads Library Scraper for ClaudeCode

Scrapes public ads from Meta / Facebook Ads Library from Ads Library URLs, Facebook Page URLs, or keyword/page handles.

Pricing

from $0.01 / 1,000 results

Rating

0.0

(0)

Developer

๐Ÿ‘ Dexter

Dexter

Maintained by Community

Actor stats

0

Bookmarked

5

Total users

3

Monthly active users

a month ago

Last modified

Share

Apify Actor for ClaudeCode workflows that accepts the same core input contract as apify/facebook-ads-scraper and extracts public ads from Meta / Facebook Ads Library.

Input

The actor accepts both the Apify-style startUrls array and a simple single-URL API payload.

Keyword search

{
"startUrls":[
{
"url":"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=ALL&q=zara&search_type=keyword_unordered"
}
],
"resultsLimit":10,
"activeStatus":"active",
"onlyTotal":false,
"includeAboutPage":false,
"isDetailsPerAd":false,
"mode":"canonical"
}

Simple URL payload

{
"url":"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=ALL&q=zara&search_type=keyword_unordered",
"maxItems":10
}

Facebook Page scrape

{
"startUrls":[{"url":"https://www.facebook.com/zara"}],
"resultsLimit":20,
"activeStatus":"active"
}

Direct ad detail page

{
"startUrls":[{"url":"https://www.facebook.com/ads/library/?id=1234567890"}],
"resultsLimit":1,
"strictAdDetail":true
}

Count-only mode

{
"url":"betway",
"onlyTotal":true,
"strictOnlyTotal":true
}

Creative/media export mode

{
"url":"betway",
"mode":"mediaOnly",
"resultsLimit":50,
"dedupeByCreativeUrl":true,
"preferPlayableMedia":true
}

Video-first mode

{
"url":"betway",
"mode":"videoOnly",
"resultsLimit":50,
"excludePreviewOnly":true
}

Supported startUrls values:

  • Meta Ad Library search/detail URLs.
  • Facebook Page URLs.
  • Bare page handles or keywords. These are converted to Ads Library keyword searches.

Useful controls:

  • resultsLimit, maxItems, or maxAds: maximum output ads.
  • mode: canonical, raw, mediaOnly, metadataOnly, videoOnly, or imageOnly.
  • maxCards: maximum cards kept per ad before creative summary selection.
  • maxPages: maximum scroll/pagination rounds.
  • stopAfterFirstPage: collect only the initial loaded page.
  • onlyVideos, onlyImages, onlyCards: mechanical result filters.
  • dedupeByAdArchiveId: enabled by default.
  • dedupeByCreativeUrl: dedupe repeated media variants.
  • preferPlayableMedia: prefer real video URLs over preview images.
  • excludePreviewOnly: remove creatives where only a video preview image was found.
  • strictPageResolve: fail if a Facebook Page URL cannot be resolved to an exact page ID.
  • strictAdDetail: fail if a direct ad detail URL does not yield the requested adArchiveID.
  • strictOnlyTotal: fail if Meta does not expose an explicit total count.
  • includeResultsInOnlyTotal: include sample normalized ads in count-only output.

Route behavior:

  • Ads Library search URLs are treated as exact search routes.
  • Ads Library detail URLs are constrained to the requested id and do not expand into related ads.
  • Facebook Page URLs are resolved to view_all_page_id when possible.
  • If direct page resolution fails and strictPageResolve is false, the actor falls back to keyword search.
  • When fallback results expose a dominant pageID, the actor retries with view_all_page_id and marks routeConfidence as inferred or probable.
  • If no page ID can be inferred, the actor keeps keyword fallback results and marks routeConfidence as fallback.

onlyTotal output is intentionally one compact dataset item per input:

  • totalCount: explicit Meta count when found, otherwise observed ads count.
  • observedAdsCount: ads actually seen while collecting payloads.
  • isTotalCountExact: whether totalCount came from an explicit Meta count.
  • results: empty by default, unless includeResultsInOnlyTotal is enabled.

Output

Each ad item is normalized to the target actor's shape where possible:

  • inputUrl
  • pageInfo
  • sourceType, originalInputUrl, routeResolution, routeConfidence
  • pageID, pageId, pageName
  • adArchiveID, adArchiveId, adId
  • creativeSummary, creativeType, hasPlayableVideo, hasOnlyPreview
  • bestVideoUrl, bestImageUrl, previewImageUrl, destinationUrl
  • snapshot with creative text, cards, images, videos, CTA, and links
  • startDate, endDate, startDateFormatted, endDateFormatted
  • publisherPlatform, spend, currency, reachEstimate, regulation and safety fields

creativeSummary selects a deterministic representative creative:

  • HD video before SD video.
  • Real video before preview image.
  • Real image before preview image.
  • Destination-bearing cards before cards without links.
  • Earlier cards before later cards when scores are equal.

Meta changes Ads Library internals frequently. The scraper listens to browser network responses and recursively extracts ad objects from Relay/GraphQL payloads instead of depending on a single endpoint name.

You might also like

Storeleads Scraper

silentflow/storeleads-scraper

Scrape Store Leads ecommerce data. Look up Shopify, WooCommerce, BigCommerce stores by domain or search with filters. Extract traffic, sales, employees, technologies, social profiles, contact emails, and 80+ fields per store. Free preview mode available.

25

5.0

Storeleads Scraper

saswave/storeleads-scraper

Storeleads scraper. Extract companies results from a search url. Get data about social network, name, monthly sales, visits, location, product sold, employees, technologies, trustpilot reviews, follower number, keywords, description and more

Shopify Store Leads Scraper - Emails & Agency Prospects

wishful_knowledge/shopify-lead-finder

Find contactable Shopify store leads with public business emails, social profiles, product samples, tech stack gaps, agency-fit scores, and outreach offers.

13

Shopify Store Leads Scraper - Emails, Phones & Ratings

clearpath/shopify-store-leads

Scrape Shopify store leads by keyword or category. Extract emails, phone numbers, addresses, ratings, and social links. Find storeleads for B2B outreach, supplier discovery, and market research.

Shopify Store Finder - URLs, emails & more

igolaizola/shopify-store-finder

Shopify Store Finder locates Shopify stores by keyword and returns structured data: ID, title, description, URL, contact emails, earliest page date, and estimated product count range. Perfect for market research, lead generation, and competitor discovery.

๐Ÿ‘ User avatar

Iรฑigo Garcia Olaizola

294

5.0