Meta Ad Library

Meta Ad Library API

Facebook, Instagram, Messenger, Threads and Audience Network ads from Meta's public Ad Library, as JSON. Ads shown in the EU come with reach per country, targeting, payer and beneficiary.

Coverage
Meta's library is global: you can search any country or all countries at once. The EU transparency fields exist only for ads shown in the EU; ads shown in the UK carry Meta's UK figures in extra.uk_transparency. Spend and impressions exist only for political and issue ads.
Price
1 credit per ad. 1 credit per delivered ad. A live search page costs at most 5 credits, however many ads it returns. Ads last shown more than 12 months ago cost double. Empty, cached and failed results are free.
Status
Meta publishes whether an ad is active, so status is active or inactive. Filter with status=active or status=inactive.

Find ads by

  • Keyword in the ad text (q); a fully quoted query matches the exact phrase
  • Page name (advertiser=Nike), matched to the best page
  • Page id (advertiser=meta:15087023444), optionally with a keyword
  • Landing domain (domain=nike.com): ads whose links point to the domain or a subdomain
  • Ad id (GET /v1/ads/meta:{id}), also for ads that are no longer active
  • Our archive (source=history), including ads Meta no longer shows

Filters

  • country: any ISO country; means the ad was delivered there
  • from / to: the ad's delivery period overlaps the range
  • format: image, video, text or carousel
  • status: active, inactive or all
  • political=true: only political and issue ads (Meta is the only platform that labels them)

What you get for each ad

The same fields as every other platform, in one schema. What Meta publishes is filled in; what it does not stays null.

Ad and advertiser

id
meta:<ad archive id>
advertiser.id, advertiser.name
The Facebook page that ran the ad
advertiser.verified
Page verification, on the ad detail
status
active or inactive, from Meta's own flag
first_shown, last_shown
Delivery start and end date, day precision
political
true for political and issue ads, false otherwise

Creative

formats
image, video, carousel or text
creatives[]
One per card: text, headline, cta, landing_url and media
placements
facebook, instagram, messenger, threads, audience_network
countries
Where the ad was delivered: the countries Meta lists, or the country you searched; the ad detail adds the countries of the EU and UK reach breakdown

Political and issue ads

spend_range
Spend range with currency
impressions_range
Impressions range

Meta extras

extra.page_like_count, extra.page_categories
Page size and category
extra.collation_id, extra.collation_count
Meta's grouping of near-identical ads
extra.eu_details_available
Whether Meta has EU transparency data for the ad
extra.ig_username, extra.ig_followers
Linked Instagram account, on the ad detail

Only for ads shown in the EU

Published under the Digital Services Act; see EU reach.

  • eu_data.reach_total: accounts reached in the EU
  • eu_data.reach_by_country: reach per EU country, the sum of Meta's published age and gender buckets
  • eu_data.targeting.ages, genders, locations; excluded locations in eu_data.targeting.other.excluded_locations
  • eu_data.payer and eu_data.beneficiary
  • These come with the ad detail (GET /v1/ads/{id} or a batch), not in search results
  • reach in GET /v1/ads/{id}/history: EU reach per measurement day

What Meta does not publish

  • Spend and impressions for commercial ads: spend_range and impressions_range stay null
  • Interest and detailed targeting: only age, gender and locations are public
  • A website for the page: advertiser.domain is null; resolve links pages to domains through their ads' landing URLs

Try it

Active video ads in Germany that mention running shoes. Fetch one with GET /v1/ads/{id} for its EU reach and targeting.

Media: Images and videos of every card, with a preview image for videos. Meta's media links expire; images are copied to media.adlibapi.com under stable URLs, and videos are archived for advertisers on a watchlist.

curl "https://api.adlibapi.com/v1/search?platform=meta&q=running%20shoes&country=DE&status=active&format=video" \
  -H "X-API-Key: $ADLIB_API_KEY"

What to do with it

  • Watch a competitor's pages and get an alert when they launch, stop, change or remove an ad.
  • Track EU reach of an ad over time to see which creatives keep getting budget.
  • Search political and issue ads on a topic with political=true, with spend and impressions ranges.

Limits

  • EU reach, targeting and payer need the ad detail: one GET /v1/ads/{id} per ad, or a batch.
  • countries in search results is often just the country you searched, because Meta rarely lists them there.
  • Domain search runs a keyword search for the domain and keeps ads that link to it, so it finds ads that mention or link the domain, not every ad of the brand. Resolve the domain and search by page id for complete results.

Questions

Can I see ad spend on Meta?
Only for political and issue ads, as a range in spend_range. Meta publishes no spend for commercial ads. For ads shown in the EU, eu_data.reach_total and eu_data.reach_by_country are the closest public number.
Can I get inactive ads from the Meta Ad Library?
Yes. Search with status=inactive, or fetch an ad by id with GET /v1/ads/meta:{id}, which also works for ads that stopped. Ads Meta later removes from its library stay in AdLib with removed_from_library_at.
How do I find a Facebook page id from a domain?
Call GET /v1/advertisers/resolve?domain=nike.com. Meta publishes no website for a page, so AdLib links a page to a domain when its ads link there, and returns a score from 0 to 1.
Does the Meta Ad Library show targeting?
For ads shown in the EU, yes: age range, gender and locations, in eu_data.targeting. Interest targeting is not public.

Read more

Other platforms

Questions about Meta data? [email protected]