Facebook & Instagram Ad Library Scraper (Meta) avatar

Facebook & Instagram Ad Library Scraper (Meta)

Pricing

from $6.00 / 1,000 ads

Go to Apify Store
Facebook & Instagram Ad Library Scraper (Meta)

Facebook & Instagram Ad Library Scraper (Meta)

Search every ad running on Facebook, Instagram, Messenger and Audience Network via Meta's official Ad Library API. Filter by keyword, page, country, date, platform and media type. Political ads include spend and impressions.

Pricing

from $6.00 / 1,000 ads

Rating

0.0

(0)

Developer

Dev D

Dev D

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Share

Meta Ad Library Scraper (Facebook & Instagram Ads)

Every ad running on Facebook, Instagram, Messenger and Audience Network, from Meta's official Ad Library API.

Most Meta ad scrapers scrape the Ad Library website and break whenever Meta changes it. This one uses the sanctioned API — the same source Meta publishes for DSA compliance — so it returns stable JSON instead of fighting anti-bot measures.

What you get

FieldDescription
page_name / page_idThe advertiser
ad_body / ad_title / ad_description / ad_captionThe creative copy
creative_countHow many creative variations the ad carries
delivery_start / delivery_stop / is_activeWhen it ran, and whether it still is
platformsFacebook, Instagram, Messenger, Audience Network
languages / target_ages / target_gender / target_locationsTargeting as disclosed
eu_total_reachPeople reached in the EU
snapshot_url / ad_library_urlSee the ad itself
spend_lower / spend_upper, impressions_*, demographic_distributionPolitical & issue ads only

You need a Meta access token

Meta restricts the Ad Library API to verified developer accounts:

  1. Create an app at developers.facebook.com
  2. Complete Meta's identity verification (one-off, can take a day or two)
  3. Copy a token from the Graph API Explorer and paste it into accessToken

The token is stored as a secret and is only ever sent to Meta. Tokens expire — regenerate if you see an auth error.

Input

{
"accessToken": "<your token>",
"searchTerms": ["nike", "adidas"],
"countries": ["US", "GB"],
"adActiveStatus": "ACTIVE",
"maxResults": 500
}
OptionDefaultNotes
accessTokenRequired. Your own Meta token
searchTerms["nike"]Searched separately; results split evenly
pageIdsSearch specific advertiser pages instead of keywords
countries["US"]Required by Meta — the country the ad reached
adTypeALLOr the regulated verticals: political, housing, employment, credit
adActiveStatusALLACTIVE for currently-running ads only
mediaTypeALLImage, video, meme, or none
languagese.g. en, es
deliveryDateMin / MaxYYYY-MM-DD
includeSpendAndImpressionsfalseSee below
maxResults100Split across search terms

Notes

  • Spend, impressions and demographics exist only for political & issue ads. That is Meta's rule, not ours. Turn on includeSpendAndImpressions and set adType to POLITICAL_AND_ISSUE_ADS together — asking for those fields on a general search makes Meta reject the request.
  • countries is mandatory: Meta's archive is indexed by the country an ad reached.
  • If a run returns nothing, widen the date range or set adActiveStatus to ALL — stopped ads are excluded by some filters.
  • Large runs should raise maxResults and the run timeout together. If the run would exceed its timeout, the Actor stops cleanly and keeps everything collected so far rather than failing.

Pricing

Pay per event: ad — one ad from the archive.