Ad Library API
The Ad Library API is Meta's developer interface for running custom searches of the Meta Ad Library. It returns two kinds of ads: ads about social issues, elections or politics delivered anywhere in the past seven years, and ads of any type delivered to the UK or EU in the past year. Ordinary commercial ads shown only elsewhere are not in it.
What does the Ad Library API cover?
Meta's API page says the API "helps you perform customized searches" for:
- "Ads about social issues, election or politics that were delivered anywhere in the world during the past 7 years"
- "Ads of any type that were delivered to the United Kingdom (UK) or European Union during the past year"
The same page then sends everyone else back to the website: "To search for all ads currently running across Meta technologies, please use the Ad Library."
What data does the API return per ad?
Less for commercial ads than people expect. Meta's page lists three tiers:
| Ads | What the API returns |
|---|---|
| All available ads | Library ID, the ad creative, Page name and ID, delivery dates, and where the ad appeared |
| Ads about social issues, elections or politics | Also "Total amount spent (range)", "Total impressions received (range)" and reach demographics |
| Ads delivered to the UK and EU | Also estimated UK and EU impressions, targeting and reach demographics, and "Advertiser and payer information (EU Only)" |
Spend and impressions come back as ranges, not values. For an ordinary commercial ad outside the UK and EU, the API returns no performance data at all.
How do I get access to the Ad Library API?
It is not a sign-up-for-a-key API. Meta's page lists the steps:
- "Go to Facebook.com/ID and follow the confirmation process required to run ads about social issues, elections or politics. It can take a few days to confirm the information you submit."
- Create a Meta for Developers account, agreeing to Meta's Platform Policy.
- Create an app, then query the
ads_archiveendpoint through the Graph API.
Which parameters trip people up?
ad_reached_countriesis required. Its note on the page still reads: "Ads that did not reach any location in the EU will only return if they are about social issues, elections or politics." That leaves out the UK coverage the page's own summary lists.ad_active_statushas two documented defaults. The parameter table says it "Defaults to ACTIVE". Meta's release notes say the default changed toALL, as the API post found. Set it explicitly.ad_typefilters special categories, such asPOLITICAL_AND_ISSUE_ADS,HOUSING_ADSandEMPLOYMENT_ADS. It does not widen what the API covers.
What it means for your ads
- Political, issue, UK or EU ads: the API is the right tool. Seven years of political history, with spend and impression ranges, plus reach demographics.
- US-only commercial competitors: use the website. The API has nothing on them, and the Meta Ad Library website keeps their ads only while they run.
- Budget for identity confirmation. Plan around "a few days" before your first query.
- Don't expect a CPM. Spend and impression ranges can only bracket one loosely, and commercial ads return no spend at all.
Common mistakes
- Building a competitor tracker on it. For most commercial advertisers the result set is empty by design.
- Reading an empty result as a bug. A domestic, non-political advertiser returning nothing is the correct answer.
Sources
- Meta Ad Library API — Meta: the two coverage buckets, "please use the Ad Library", the access steps and the few-days confirmation, the per-tier fields, and the
ad_active_status,ad_reached_countriesandad_typeparameter notes (rendered in a browser, accessed 2026-10-16) - Ad Library API release notes — Meta: the
ad_active_statusdefault change toALL(accessed 2026-09-15, for the linked post) - Graph API Reference: Ads Archive — Meta for Developers: the
ads_archiveendpoint and range buckets (accessed 2026-09-15, for the linked post)
The API landing page is client-rendered and was read in a real browser on 16 October 2026; the release notes and Graph API reference were read for the linked post on the date shown. Meta revises these without notice, so confirm against the current docs before building on any of it.
Terrads makes new image and video ads in your brand, so research ends in creative you can run rather than a spreadsheet of other people's ads.