The Meta Ad Library API is Meta's official way to search the Ad Library with code. It covers ads about social issues, elections or politics delivered anywhere in the past 7 years, plus ads of any type delivered to the UK or EU in the past year. US commercial ads that never reached the EU don't come back, and spend and impressions are only returned for political and issue ads.
This guide is for marketers, analysts and developers who want Meta ad data in a spreadsheet, a dashboard or an AI tool. Everything below was checked against Meta's own API page and developer reference on October 28, 2026.
What is the Meta Ad Library API?
The Meta Ad Library API is a read-only endpoint on Meta's Graph API called ads_archive. You send a search, such as a keyword, a country and an ad type, and it returns matching ads as JSON. Meta describes it as a way to perform customized searches of the Ad Library.
Meta's Ad Library API page saying it covers ads about social issues, elections or politics from the past 7 years and ads of any type delivered to the UK or EU during the past year
Meta's page is clear about who it's for. It says it helps to be a little familiar with programming, points simpler research to the Ad Library report, and sends anyone who wants all ads currently running across Meta to the Ad Library website itself.
Why the Ad Library API matters (and who uses it)
The API was built for transparency. Researchers, journalists and campaigns use it to study political and issue advertising at scale: who paid for an ad, how much was spent and who saw it.
For marketers, it matters for a narrower reason. If you advertise in the UK or EU, you can pull every ad a competitor delivered there in the past year, with dates, copy and a link to the creative. Outside those markets, it won't help much with product ads.
What the Meta Ad Library API covers
Meta's API page lists two groups of ads:
- Political and issue ads: ads about social issues, elections or politics delivered anywhere in the world during the past 7 years.
- UK and EU ads: ads of any type delivered to the United Kingdom or European Union during the past year.
The developer reference adds the rule that trips most people up. Under ad_reached_countries, Meta writes that ads that did not reach any location in the EU will only return if they are about social issues, elections or politics. A US-only skincare ad is visible on the Ad Library website, but the API won't return it.
One more change to know: Meta stopped delivering political, electoral and social issue ads in the EU on October 6, 2025, in response to the EU's TTPA regulation. EU political results in the API are now historical.
Fields you get for every ad
These fields are available for any ad the API returns, according to Meta's ArchivedAd reference:
id: the ad's Library ID.ad_creation_time,ad_delivery_start_timeandad_delivery_stop_time.ad_creative_bodies,ad_creative_link_titles,ad_creative_link_captionsandad_creative_link_descriptions: the ad's text.ad_snapshot_url: a link that displays the archived ad, with its images and videos.page_idandpage_name: who ran it.publisher_platformsandlanguages.
Fields only for political, EU or UK ads
The richer numbers are restricted:
| Field | Available for |
|---|---|
spend, impressions | Political and issue ads only, in ranges |
demographic_distribution, delivery_by_region, estimated_audience_size, bylines, currency | Political and issue ads only |
eu_total_reach, beneficiary_payers | Ads delivered to the EU |
age_country_gender_reach_breakdown, target_ages, target_gender, target_locations | Ads delivered to the UK and EU, and political ads delivered to Brazil |
So for a commercial ad in the EU you can see reach and targeting, but never spend or impressions. That matches the website: Meta doesn't publish performance for regular ads anywhere.
How to get access to the Meta Ad Library API
Meta lists 3 steps on its Ad Library API page. You need a Facebook account to start. We didn't sign in to walk these, so they're described as Meta writes them.
The Ready to get started section of Meta's Ad Library API page listing Step 1 Confirm your identity and location, Step 2 Create a Meta for Developers account and Step 3 Add a new app
- Confirm your identity and location. Go to Facebook.com/ID and follow the same process Meta requires to run ads about social issues, elections or politics. Meta says it can take a few days.
- Create a Meta for Developers account. Visit Meta for Developers and select Get started. You'll need to agree to Meta's Platform Policy.
- Add a new app. Return to the API page, select Access the API and create an app under My apps > Create app.
Once the app is ready, you send a GET request to the ads_archive endpoint on Meta's Graph API with your access token. A basic search sets 4 parameters:
search_terms: the keyword, likeprotein.ad_type:ALLfor every ad type.ad_reached_countries: a country list, like['GB'].fields: what to return, likepage_name,ad_delivery_start_time,ad_creative_bodiesandad_snapshot_url.
Meta also links its Ad Library API script repository on GitHub, which has Python code examples and a simple command-line interface.
Meta Ad Library API limits and pricing
Pricing
Meta's API page lists no price. The cost is the setup: identity confirmation, a developer account, an app and the engineering time to build on the Graph API.
Search and rate limits
ad_typetakes ALL (the default), or one special category: employment, financial products and services, housing, or political and issue ads.search_termsis limited to 100 characters.search_page_idstakes up to 10 Page IDs per request.- Requests are rate limited. Meta returns error 613 when you hit the limit, and error 190 for an invalid access token.
What it can't tell you
- US and non-EU commercial ads: not returned unless they're political.
- Performance: no spend or impressions for commercial ads.
- Which ads win: results aren't ranked by anything that shows a brand's best ads.
- Duplicates: one creative can appear as many separate ads, so you dedupe it yourself.
Meta Ad Library API vs the Ad Library website
| Ad Library API | Ad Library website | |
|---|---|---|
| US commercial ads | No, unless political | Yes, all active ads |
| UK and EU ads | Yes, past year | Yes |
| Political ads | Yes, past 7 years | Yes |
| Spend and impressions | Political ads only | Political ads only |
| Login needed | Yes, plus identity confirmation | No |
| Best for | Bulk data on political or EU ads | Looking up a brand's live ads |
For most marketers, the website is the better place to start. Our how to use the Facebook Ad Library guide walks through it, and our Facebook Ad Library search tips show how to narrow results. If the site itself is acting up, see Facebook Ad Library not working.
How Adspo helps: Meta ad data without building on the Graph API
Adspo is an ad library and competitive intelligence platform built on Meta ad data. It covers 10,000+ verified brands and includes MCP and API access on its single plan, so you can pull creative data into Claude, ChatGPT, Gemini, Cursor or Perplexity, or build your own tools on top of it.
Here's Gymshark's brand page in the Adspo app, with its creatives, creative velocity, media mix, target countries and landing pages in one view.
Gymshark's brand page in the Adspo app showing creatives, ads, new creatives in the last 30 days, media mix, target countries and landing pages
Filter to active creatives and sort by longest running to see the ads a brand keeps paying for, with runtime on every card.
Gymshark's active creatives in the Adspo app sorted by longest running, each card showing its runtime in days
What that fixes:
- US commercial ads: included, not only political or EU ads.
- No ranking: every creative is ranked by impressions within the brand's own account.
- Duplicates: each unique creative appears once, with its ad count and full lifespan.
- Setup: no identity confirmation or Graph API app to build.
Adspo costs $29/month, or $19/month billed yearly, with a 7-day free trial (14 days on yearly). See the Facebook Ad Library alternative page for a full comparison.
Frequently asked questions
What is the Meta Ad Library API?
The Meta Ad Library API is Meta's official way to search the Ad Library with code. It runs on the Graph API through the ads_archive endpoint. Meta says it covers ads about social issues, elections or politics delivered anywhere in the past 7 years, and ads of any type delivered to the UK or EU in the past year.
Does the Meta Ad Library API show US commercial ads?
No. Meta's reference says ads that did not reach any location in the EU will only return if they are about social issues, elections or politics. A US-only product ad won't come back from the API, even though you can see it in the Ad Library website.
How much does the Meta Ad Library API cost?
Meta's Ad Library API page lists no price. What it does ask for is a Facebook account, identity and location confirmation, a Meta for Developers account and an app. Requests are rate limited, and Meta returns error 613 when you hit the limit.
How do I get access to the Meta Ad Library API?
Meta lists 3 steps. Confirm your identity and location at Facebook.com/ID, which can take a few days. Create a Meta for Developers account and agree to the Platform Policy. Then return to the Ad Library API page, select Access the API and create an app under My apps > Create app.
Can I get ad spend and impressions from the Ad Library API?
Only for political and issue ads. Meta marks spend, impressions, demographic_distribution and estimated_audience_size as available only for POLITICAL_AND_ISSUE_ADS. Ads delivered to the EU also get eu_total_reach and beneficiary_payers, but regular commercial ads outside the EU get neither spend nor impressions.
Is there an easier alternative to the Meta Ad Library API?
Yes. Adspo includes MCP and API access on its single plan, so you can pull Meta ad data into Claude, ChatGPT or your own tools without building on the Graph API. It covers 10,000+ verified brands and ranks each creative by impressions within the brand's own account. It costs $29/month, or $19/month billed yearly, with a 7-day free trial.
Wrapping it up
The Meta Ad Library API is a solid tool for political and UK or EU ad data, and Meta lists no price for it. For US product ads, spend or a ranking of what works, it comes up short by design.
If you want Meta ad data you can query from your own tools, without the Graph API setup, try Adspo free for 7 days.