← API Catalog
Apify·Async

Meta Ad Library Scraper - Facebook Ads, Days Running & Changes

Social$0.019 / Ad Scraped

What it does

Scrape Meta Ad Library by keyword and get what other scrapers skip: exact days each ad has been running, AFINN sentiment on the copy, advertiser Page likes, per-carousel-card creatives, and a new-vs-changed flag across scheduled runs. Facebook, Instagram, Messenger, Threads. 249 countries.

Returns: Scrape Meta Ad Library by keyword and get what other scrapers skip: exact days each ad has been running, AFINN sentiment on the copy, advertiser Page likes, per-carousel-card creatives, and a new-vs-changed flag across scheduled runs. Facebook, Instagram, Messenger, Threads. 249 countries.

Parameters

ParameterTypeRequiredDescription
adTypeselectNoFilter by ad category
maxAdsnumberNoHow many ads to return per search query. Total ads = this number x number of queries. Each delivered ad is billed, so keep this in line with your run cost limit.
countryselectNoCountry whose Ad Library to search. Meta returns only ads shown in this country.
sortModeselectNoWhich of Meta's two sort orders to request. 'Newest first' returns recently created ads - ideal for finding fresh leads each run. 'Most impressions' returns high-reach ads first - better for competitive research, and is Meta's own default order.
mediaTypeselectNoFilter by media type
useProxiesbooleanNoKeep this on. Meta blocks datacenter traffic to the Ad Library; residential proxies are what make the run succeed.
proxyGroupsselectNoApify proxy groups to route through. RESIDENTIAL is required for Meta in practice.
activeStatusselectNoWhich ads to include. Active ads are currently running; 'All ads' also returns ads that already stopped (best when a search returns nothing).
trackChangesbooleanNoTrack changes across scheduled runs. Identifies new ads and changes to existing ads.
searchQueriesarrayYesKeywords or brand names to look up in the Meta Ad Library. One entry per search. Tip: search in the advertiser's own language - Meta indexes ad text, so an Arabic brand usually only matches its Arabic spelling.
analyzeSentimentbooleanNoAnalyze sentiment of ad copy using AFINN-165 NLP. Adds sentiment_score and sentiment_label to output.

Endpoints

GET/v1/agents/resources/inspect/apify.webdatalabs.meta-ad-library-scraperPublic
POST/v1/agents/resources/estimate/apify.webdatalabs.meta-ad-library-scraperPublic
POST/v1/agents/resources/run/apify.webdatalabs.meta-ad-library-scraperAgent key
GET/v1/agents/resources/runs/{run_id}Agent key

Quick start

Run it with one Agent One Key over the OpenAI-compatible resource rail.

curl -X POST https://api.deva.me/v1/agents/resources/run/apify.webdatalabs.meta-ad-library-scraper \
  -H "Authorization: Bearer deva_your_key_here" \
  -H "Content-Type: application/json" \
  --data '{
    "params": {}
  }'

Related in Social

Instagram Scraper
Extract Instagram posts, reels, profiles, places, hashtags, carousels, and comments. Get data from Instagram using one or more Instagram URLs or search queries: content, context, metrics, metadata. Export scraped data, run the scraper via API, schedule and monitor runs or integrate with other tools.
Tweet Scraper V2 - X Scraper / Twitter Scraper / X.com Scraper
Lightning-fast search, URL, list, and profile scraping, with customizable filters. At $0.40 per 1000 tweets, and 30-80 tweets per second, it is ideal for researchers, entrepreneurs, and businesses! Get comprehensive insights from Twitter (X) now!
TikTok Scraper
Extract data from TikTok videos, hashtags, and users. Use URLs or search queries to scrape TikTok profiles, hashtags, posts, URLs, shares, followers, hearts, names, video, and music-related data. Export scraped data, run the scraper via API, schedule and monitor runs or integrate with other tools.
Instagram Profile Scraper
Scrape all Instagram profile info. Just add Instagram usernames, IDs or URLs and extract name, join date, number of followers, location, bio, website, related profiles, video&post count, latest posts. Export scraped data, schedule scraper via API, and integrate with other tools or AI workflows.
Instagram Post Scraper
Scrape Instagram posts. Just add one or more Instagram usernames and get your data in seconds including caption, metrics, images, mentions, coauthors, recent comments, sponsored status, video duration, views. Export scraped data, schedule scraper via API, integrate with other tools or AI workflows.
Facebook Posts Scraper
Extract posts, videos, and engagement metrics from Facebook pages. Get text captions, reactions, video transcripts, images, external links, collaborators, and more from Facebook pages and profiles. Export ad data, schedule runs via API, and integrate with other tools or AI workflows.