Back to Facebook
Apify·Facebook

Facebook Ads Library Scraper

/apify/facebook-ads-scraperasync$0.0145 / result

Extract advertising data from Facebook, Instagram, WhatsApp, Threads. Get ads, publishers, prices, reach estimates, impressions, links, images, IDs, timestamps, product info, and more from Facebook Ad Library. Export ad data, schedule runs via API, and integrate with other tools or AI workflows. Runs as an Apify actor (20–120 s); results are dataset rows.

Charged per returned row plus the flat fee.

Input
  • startUrlsarrayrequired

    Add a Facebook Page URL, a brand URL from Meta Ad Library, or a Meta Ad Library search URL. You can add multiple URLs using the Bulk edit option.

  • resultsLimitinteger

    ⚠️ If you leave this field empty, you will get as many results as possible.

  • onlyTotalboolean

    When enabled, the Actor returns just the total number of ads for each page instead of scraping individual ads. Results are saved as a single dataset item per page.

  • includeAboutPageboolean

    When enabled, the Actor extracts the About tab details from each page's Ad Library profile:Managing organizations – the advertiser's business address and phone number.Primary country location – where the page's admins are based.Page history – creation date, name changes, and merges.Valuable signals

  • isDetailsPerAdboolean

    When enabled, the Actor opens each ad's detail view and adds an ad_details object with:Advertiser page info – Instagram username, follower count, and verification; page likes, category, and "About" text.Spend data – the page's ad spend and whether it's a registered political advertiser.EU audience &

  • activeStatusstring

    Filter ads by whether they're currently running. Active ads are still being shown to users, while inactive ads have stopped running but remain archived in the Meta Ad Library. Choose Active and inactive to scrape both. ⚠️ Note: if the Meta Ad Library URL you provide already specifies an active statu (default "")

    , active, inactive

  • sortingstring

    Set the order of the scraped ads: the default order, by impressions (high to low), or most recent first. ⚠️ Note: if the Meta Ad Library URL you provide already specifies sorting type, that value takes priority and this field is ignored. (default "")

    , total_impressions, relevancy_monthly_grouped

  • onlyAdsNewerThanstring

    Only scrape ads active on or after this date. Combine it with Scrape ads older than to set a closed date range. Use an absolute date (YYYY-MM-DD) or a relative value, such as 1 day, 2 months, or 3 years.

  • onlyAdsOlderThanstring

    Only scrape ads that were active during or before this date. Combine it with Scrape ads newer than to set a closed date range. Use an absolute date (YYYY-MM-DD) or a relative value, such as 1 day, 2 months, or 3 years.

  • enrichWithEcommerceDataboolean

    When enabled, the Actor detects e-commerce product pages from each ad's landing page URL and adds pricing and product details to the ad.⚠️ Note: you may get more product enrichment results than ads, because a single ad can contain multiple product URLs, each of which is enriched separately. (default false)

Run it

curl -s https://sooma.dev/v1/run \ -H "Authorization: Bearer $SOOMA_API_KEY" \ -H "Content-Type: application/json" \ -d '{"provider":"apify","endpoint":"/apify/facebook-ads-scraper","input":{"startUrls":[{"url":"https://www.facebook.com/SHEINOFFICIAL"},{"url":"https://www.facebook.com/ads/library/?active_status=active&ad_type=all&content_languages[0]=en&country=ALL&is_targeted_country=false&media_type=image&publisher_platforms[0]=instagram&publisher_platforms[1]=facebook&search_type=page&view_all_page_id=15087023444"}]}}'

Or ask your agent: it will call inspect for this schema and run it over MCP.