What the Meta Ad Library API returns
The API searches the Ad Library by keyword or by up to 10 Facebook Page IDs at a time. You filter by country (required), active status, delivery dates, language, media type, platform and ad type (all ads, or the special categories: political and issue, employment, housing, financial products). Meta's Ad Library API page sets the coverage: ads about social issues, elections or politics delivered anywhere in the world in the past 7 years, and ads of any type delivered to the UK or EU in the past year. For all currently running ads, Meta points people to the Ad Library website instead.
How to get access
You need a Facebook account. Then Meta lists three steps on its Ad Library API page:
- Confirm your identity and location at facebook.com/ID, the same process as for people who run political ads. Meta says it can take a few days.
- Create a Meta for Developers account and accept the Platform Policy.
- Create an app and select "Access the API". Queries then go to
https://graph.facebook.com/<version>/ads_archivewith an access token.
curl -G \
-d "search_terms='running shoes'" \
-d "ad_type=ALL" \
-d "ad_reached_countries=['DE']" \
-d "access_token=<ACCESS_TOKEN>" \
"https://graph.facebook.com/<VERSION>/ads_archive"
API vs scraper compared
| Meta Ad Library API | Ad Library scraper (e.g. Facebook Ads Library Scraper) | |
|---|---|---|
| Access | Identity confirmation, developer app, access token | Bytewells account; no Meta login or token for the default website source |
| Ordinary ads not delivered to the UK or EU | Not returned (UK/EU ads of any type: past year only) | Returned for every country the Ad Library website covers |
| Political and issue ads | Yes, from anywhere, past 7 years | Yes, with spend and impression ranges parsed into numbers |
| EU reach and targeting breakdowns | Yes | Yes, when you pick the official-API source |
| Creatives | Ad snapshot URL | Image and video links, carousel cards, landing page, CTA |
| Search | Keywords, up to 10 Page IDs per call | Keywords, Page URLs or names, any Ad Library link |
| Limits | Rate-limited; error 613 when you exceed the limit | Max ads caps each run |
| Cost | Free | $29 a month rental on Bytewells plus about $0.02 per 1,000 ads of compute (publisher's measurement) |
Checked 19 Nov 2026 against Meta's ads_archive reference and the Bytewells listing.
Which one to use
Use the API if you study political or issue ads, or only care about ads delivered to the UK or EU in the past year, and you're fine with the identity check. Use a scraper if you track ordinary competitor ads in the US, Canada, Australia or anywhere else outside the UK and EU, or you want the full creative (images, videos, carousel cards, landing page) in one row.
How to scrape the Facebook Ad Library
- Pick keywords, competitor Facebook Pages, or paste an Ad Library search link.
- Choose countries, active or all ads, and a sort order (most recent, or total impressions to find long-running winners).
- Set Max ads, which also caps compute.
- Run it, then sort by
daysActiveandcollationCountto find the creatives an advertiser keeps reusing.
{
"searchQueries": ["protein bar"],
"pageUrls": ["https://www.facebook.com/sephora", "Gymshark"],
"countries": ["US"],
"activeStatus": "ACTIVE",
"sortBy": "IMPRESSIONS",
"maxResults": 500
}
Using the data responsibly
The Ad Library is a public transparency archive, but Meta's terms restrict automated collection and reuse, and ads can contain personal data protected by laws such as the GDPR. Use the results for research and analysis, don't resell them as a dataset, and get legal advice if you're unsure.
Sources
- https://developers.facebook.com/docs/graph-api/reference/ads_archive/ (parameters, EU limit quote, error 613), checked 2026-11-19
- https://www.facebook.com/ads/library/api/ (Facebook account, 3 access steps, coverage: political/issue ads worldwide for 7 years, any ad delivered to the UK or EU for 1 year), browser-checked 2026-11-19
- https://bytewells.com/store/amethyst/meta-ads-library-scraper (fields, sources, price, measured cost, legal note)
Frequently asked questions
- How much does the Meta Ad Library API cost?
- Nothing. It's free, but you need a confirmed identity, a developer app and an access token, and calls are rate-limited.
- Does the Meta Ad Library API return all ads?
- No. Ads of any type come back only if they were delivered to the UK or EU in the past year. Ads about social issues, elections or politics come back from anywhere, for the past 7 years. For all currently running ads, Meta points you to the Ad Library website.
- How do I get an access token?
- With a Facebook account, confirm your identity and location at facebook.com/ID, create a Meta for Developers account and accept the Platform Policy, then create an app and select "Access the API".
- Can I see how much a competitor spends on Facebook ads?
- Only for political and issue ads. Meta doesn't publish spend for ordinary ads, through the API or the website.
- What's the easiest way to get US Facebook ads?
- A scraper that reads the public Ad Library website, such as the Facebook Ads Library Scraper on Bytewells, which needs no Meta login or token.