{"uid":"cap_PVawPs7hIZzYybDfU3K_G","slug":"apify-facebook-ads-library-scraper-via-stableapify-52ed4ba0","name":"Apify Facebook Ads Library Scraper (via StableApify)","description":"Search Apify Store actors, start actor runs, and fetch results over x402 and MPP.","url":"https://stableapify.dev/api/actors/curious_coder/facebook-ads-library-scraper/call","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"input":{"type":"object","required":["urls","scrapePageAds.period","scrapePageAds.activeStatus","scrapePageAds.sortBy","scrapePageAds.countryCode"],"properties":{"urls":{"type":"array","items":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri"},"method":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"payload":{"type":"string"},"userData":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"description":"List of facebook ads search URLs or Page URLs to scrape ads from"},"count":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991,"description":"Leave this field empty if you want to limit number of ads scraped"},"proxy":{"type":"object","properties":{"proxyUrls":{"type":"array","items":{"type":"string"}},"useApifyProxy":{"type":"boolean"},"apifyProxyGroups":{"type":"array","items":{"type":"string"}},"apifyProxyCountry":{"type":"string"}},"description":"You can use this option to customise the proxy country","additionalProperties":{}},"runTag":{"type":"string","description":"Add this value to 'runTag' column in the output"},"limitPerSource":{"type":"integer","maximum":9007199254740991,"minimum":-9007199254740991,"description":"Limit number of ads scraped per input URL. Leave it blank to scrape all available ads ℹ️ Actual number might exceed the given limit by upto 30"},"scrapeAdDetails":{"type":"boolean","description":"Enable this option to scrape ads details such as EU Reach info"},"scrapePageAds.period":{"enum":["","last24h","last7d","last14d","last30d"],"type":"string","default":"","description":"Search ads in given date range"},"scrapePageAds.sortBy":{"enum":["impressions_desc","most_recent"],"type":"string","default":"impressions_desc","description":"Sort by impressions or date. Default: Impressions"},"scrapePageAds.countryCode":{"type":"string","default":"ALL","description":"2-letter ISO country code (ISO 3166-1 alpha-2). This should be the official uppercase country code, such as `IN` for India, `US` for United States, etc. Use `ALL` for targeting all countries"},"scrapePageAds.activeStatus":{"enum":["all","active","inactive"],"type":"string","default":"all"}},"description":"Normalized actor input. See field descriptions for the simplified shape; native Apify input also accepted (passed through).","additionalProperties":{}},"options":{"type":"object","properties":{"build":{"type":"string","maxLength":100,"minLength":1},"memory":{"type":"integer","maximum":32768,"minimum":128},"maxItems":{"type":"integer","maximum":100000,"minimum":1}},"description":"Optional Apify run options.","additionalProperties":false}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_j_0cxXQpyzthZSJW48-ar","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Scrapes Facebook Ads Library for ads associated with specific pages or search URLs, returning structured ad data including creatives, targeting, and impressions.","exampleAgentPrompt":"Scrape the last 30 days of active Facebook ads for Nike's page sorted by impressions in the US — get up to 50 ads and include EU reach details.","exampleUseCases":[{"title":"Competitor ad intelligence research","prompt":"Pull all active Facebook ads from Coca-Cola's page for the last 7 days, sorted by impressions, targeting the US — I want to see what creatives they're running right now."},{"title":"Ad library audit by country","prompt":"Scrape all Facebook ads from this search URL for the German market over the last 30 days, sorted by most recent, and limit it to 100 ads total."},{"title":"Marketing campaign monitoring","prompt":"Get the Facebook Ads Library ads for my brand's page at facebook.com/MyBrandPage — fetch everything from the last 14 days sorted by impressions, including EU reach info, for the UK."}],"resultDescription":"Returns a dataset of Facebook ads scraped from the Ads Library, including ad creatives, active/inactive status, impressions, date ranges, page name, country targeting, and optionally EU reach information. Each ad is a structured record with metadata fields.","failureModes":["Invalid or inaccessible Facebook URL returns empty results or scraping error","Missing required fields (urls, period, activeStatus, sortBy, countryCode) causes schema validation failure","Rate limiting or Facebook anti-bot measures may result in incomplete results","Invalid country code returns no results or an error","Payment failure over x402/MPP prevents the run from starting"],"whenToPreferThis":"Use this endpoint when you need structured Facebook Ads Library data at scale, especially for competitive ad intelligence, brand monitoring, or market research. Prefer this over manual browsing when you need bulk data, filtering by country/date, or automated periodic scraping via an agent pipeline.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:55:40.259Z","isFirstParty":false}