By Nikhil Kumar. Last updated September 2026.
You open Meta’s Ad Library, find a competitor running forty ads, and then realize there is no export button and no obvious way to get any of it into a script.
Meta does have an official Ad Library API, but it was built to audit political ads, not to research commercial ones. Outside the EU it returns political and social-issue ads only, so a US brand advertising to US audiences is invisible to it. To pull commercial competitor ads as JSON, you send a keyword or a page to a data API that reads the public Ad Library. On ScraperSocial that is one GET request, 4 credits per ad returned. This guide covers what each route gives you and why the official one usually does not.
Does Facebook have an Ad Library API?
Yes, but it is built for political transparency, not competitor research. Meta’s official Ad Library API returns political and social-issue ads worldwide for the past seven years, but regular commercial ads only when they were delivered to the EU or the UK. A US brand advertising to US audiences is invisible to the API, even though its ads show on the Ad Library website to anyone who looks.
That single restriction is what sends marketers looking for another route.
The official API exists, it is free, and it is genuinely good at the job it was designed for: letting researchers audit ad transparency around elections. It is quietly frustrating for the job most marketers hire it for, which is watching a competitor scale a video hook across markets.
So the search “Facebook Ad Library API” often ends the same way as the LinkedIn one. The thing you pictured, a clean endpoint that returns any advertiser’s ads, is not what Meta ships.
It helps to see why the API is shaped this way. Meta built the Ad Library after 2018 to answer regulators about election interference, so the whole system is tuned to make political advertising auditable: seven years of history, disclosed spend ranges, funding details. Commercial advertising was pulled into the API only where a law forced it, which is the EU’s Digital Services Act. Everywhere else, the transparency Meta chose to offer is the browsable website, not a queryable endpoint.
What does the Facebook Ad Library actually show?
For every active ad it shows the creative and the messaging, but never the money. You get the ad image, video, or carousel, the primary text, the headline, the call-to-action, the advertiser’s Page name, and which platforms it runs on. What you do not get for a commercial ad is spend, impressions, CPM, CTR, or the targeting, because Meta simply does not publish those for non-political ads.
This is the honest ceiling of ad-library data, and no scraper changes it.
Spend and impression ranges appear only on political and social-issue ads. For a product ad, that data was never public, so any tool claiming to show a commercial competitor’s exact budget is estimating, not reporting.
Carousels come through as several creatives under one ad, so a single competitor ad can carry three or four images with a headline each. That is a gift for analysis, because you see the full sequence a competitor is testing rather than just the first frame. What none of it carries is a real impression or spend number, a line plenty of tools quietly blur.
The workaround the whole industry uses is ad longevity. Advertisers pause losing ads fast, so an ad that has stayed live for weeks is probably working. Run time is the performance proxy you get instead of spend.
One more limit shapes how you use this: commercial ads are visible only while they are active. The moment an advertiser pauses an ad, it drops out of the library. If you want a record of what a competitor ran last quarter, you have to have captured it while it was live.
Why can’t the official API pull commercial competitor ads?
Because Meta scoped it to transparency, and stacked several walls around commercial data. The commercial ad_type=ALL results only return when the query targets EU or UK countries, so most global and US ads are simply absent. On top of that, the API needs government ID and location verification before you get a token, and those tokens expire about every 60 days, so a production integration breaks on a schedule.
The limits compound in a way that matters for real work.
There are no engagement metrics anywhere in the API, no likes, comments, shares, or click-through, so runtime is the only signal. Calls also share your app’s standard Graph budget, roughly 200 calls an hour per user token, and pagination counts against it, so a nightly sweep across twenty competitor brands brushes the ceiling regularly.
The token expiry is the quiet tax. Long-lived user tokens lapse about every 60 days, so a production integration needs refresh logic and a calendar reminder, and the morning it silently expires your pipeline returns empty pages instead of ads. None of that is hard, but it is ongoing work that exists only because the endpoint was designed for occasional research runs, not a standing feed.
And the archive is thin for commercial work. Political ads persist seven years; EU commercial ads roughly twelve months; non-EU commercial ads vanish when the campaign ends. You cannot reconstruct what a competitor ran last Black Friday unless you captured it last Black Friday.
Add it up and the official API is excellent for election research and close to useless for a marketer studying a US competitor’s funnel.
Here is the contrast in one view.
| Official Ad Library API | Data API | |
|---|---|---|
| Commercial ads | EU / UK targeting only | Any country |
| Access | Government ID + Meta app | One API key |
| Token | Expires ~60 days | Stable key |
| Rate limit | ~200 Graph calls/hour | Per-item credits |
| Spend / engagement | Political ads only | Not published anywhere |
| Cost | Free | 4 credits per ad |
| Best for | Election transparency research | Commercial competitor research |
How do you pull Facebook ads as JSON with a data API?
You send a keyword or a page to a data API’s ads endpoint and read the matching ads back as a JSON array. The API reads the public Ad Library, so it reaches commercial ads in any country, with no ID verification and no Meta app. On ScraperSocial you GET /v1/facebook/ads-search with a query, or /v1/facebook/page-ads with a page URL, billed 4 credits per ad returned.
Here is the whole call in a few lines of Python.
import requests
r = requests.get( "https://api.scrapersocial.com/v1/facebook/ads-search", params={"query": "project management software", "limit": 25}, headers={"Authorization": "Bearer sk_live_..."},)for ad in r.json()["data"]: print(ad["advertiser"]["name"], "-", ad["title"]) print(" ", ad["link_url"], ad["is_active"])Query in, competitor ads out. No token exchange, no app review, no political-only wall.
The two endpoints cover the two ways people research. Use ads-search when you want every advertiser running a keyword or theme, and page-ads when you already know the competitor and want everything that one Page is running right now.
Cost tracks what you pull. At 4 credits an ad, a competitor running 30 live ads is 120 credits, about 60 cents, and $5 pulls roughly 250 ads across a small watchlist. Because billing follows what actually comes back, a Page with 12 active ads and a limit of 50 bills 12, not 50. The way to keep a monitoring loop cheap is to pull each Page on a schedule and store only the new ad ids, rather than re-pulling and re-paying for creatives you already have.
What does the ads-search response look like?
Each ad is a flat object built for competitor analysis. It carries the ad text and headline, the call-to-action, the landing link_url the ad points to, the image and video URLs of the creative, the advertiser’s name and Page id, the run dates, whether the ad is still active, and the platforms it appears on. That is the full creative plus the destination, which is what a swipe file or a monitoring job actually needs.
{ "id": "1234567890", "text": "Ship projects on time. Try it free for 14 days.", "title": "The project tool teams switch to", "cta": "SIGN_UP", "link_url": "https://example.com/free-trial", "is_active": true, "started_at": "2026-08-19T00:00:00Z", "platforms": ["facebook", "instagram"], "advertiser": { "handle": "104...", "name": "Example App" }, "images": ["https://.../creative.jpg"], "videos": []}The link_url is the field people underrate. It is the competitor’s landing page for that specific creative, which tells you what offer the ad is selling, beyond the words on the creative itself. Pair the creative with its destination and you can read the whole funnel from the outside.
The platforms field is quietly useful too. An ad flagged for both facebook and instagram is one creative running across Meta’s whole network, while an instagram-only ad tells you a competitor is treating that channel differently. Combined with the advertiser id, which stays stable even when a Page changes its display name, you can follow one competitor’s creative reliably over months without their renames breaking your pipeline.
The media URLs let you archive the actual creative, since the ad itself disappears from the library when the advertiser pauses it. Fetch and store the image or video during the same job rather than trusting the URL to live forever.
What can you use Facebook ad data for?
Mostly creative intelligence and competitor monitoring, done at scale instead of by screenshot. Teams build a swipe file of rival ads to study hooks and offers, watch a competitor’s Page to catch new campaigns the day they launch, and track which creatives stay live longest as a signal of what is working. The data is the creative and the copy, so the use cases are about messaging and strategy, not spend.
The swipe file is the most common reason people reach for this.
Instead of a folder of screenshots that go stale, a scheduled pull keeps a live library of what every competitor is running, searchable and sortable, with the landing page attached to each ad.
Launch detection is the next one. Poll a set of competitor Pages on a schedule, diff against what you already stored, and a new ad appearing is an alert that a campaign just went live. The linkedin ad library post covers the same play on that platform.
Creative-longevity analysis rounds it out. Because run time is your only performance proxy, ranking a competitor’s ads by how long they have stayed active surfaces the winners without any spend data at all.
One worked loop ties it together. A growth team keeps a list of eight competitor Pages, pulls page-ads for each every morning, and flags any ad that is both new and still live a week later. New-and-surviving is the strongest free signal that a competitor found something that works, and catching it early means you can test your own version while the angle is fresh, rather than a month after it peaked.
What are the limits and the compliance notes?
The hard limit is that no source, official or third-party, gives you commercial spend, targeting, or engagement, because Meta does not publish them. Anyone quoting a competitor’s exact ad budget is modeling it. A data API gives you the creative, the copy, the landing link, and the dates for any public ad, which is the real, usable layer, and it stops there honestly.
The compliance side is the boring but necessary part.
The Ad Library is public transparency data Meta publishes deliberately, and reading public pages has generally held up in US courts, though this is not legal advice. Ad creatives can show identifiable people and carry brand trademarks, so treat any personal data you store under GDPR and CCPA, keep a retention window, and get your own legal read before building a permanent archive.
The practical habit that follows from all this is capture-on-schedule. Because commercial ads vanish the moment they are paused, a competitor’s ad history only exists if you recorded it while it ran. Store the creative media and the metadata on each pull, and you build the archive Meta does not keep for you, which is often the single most valuable thing this data gives a marketing team.
The line that matters most is reuse. Studying a competitor’s creative to sharpen your own is fair game; downloading their video and reposting it as yours is a copyright problem no API waves away.
Pull a competitor’s ads
Take one competitor’s Facebook Page. Send it to the page-ads endpoint, read the JSON, and see every ad they are running right now with the creative and landing link attached. Sign up on the quickstart, check the 4-credit-per-ad cost on the pricing page, and let 100 free credits pull a real competitor’s whole active set before you pay a cent. For a single ad you already have a link to, the ad endpoint takes the URL.
Frequently asked questions
Does Facebook have an Ad Library API?
Yes, but it is built for political transparency, not competitor research. Meta’s official Ad Library API returns political and social-issue ads worldwide, but regular commercial ads only when they targeted the EU or UK. A US brand advertising to US audiences is invisible to the API even though its ads show on the Ad Library website. To pull commercial competitor ads as JSON anywhere, you use a data API that reads the public Ad Library instead.
Can the Meta Ad Library API show commercial (non-political) ads?
Only for EU and UK targeting. Meta’s API serves the ad_type=ALL commercial results just when ad_reached_countries points at EU member states or the UK, under the Digital Services Act. A US, Canadian, or Australian advertiser that never targets Europe returns nothing from the official API. The consumer Ad Library website shows those ads to anyone, which is the gap a third-party data API fills.
How do I pull competitor Facebook ads as JSON?
Send a keyword or a page to a data API’s ads endpoint and read the matching ads back as JSON. On ScraperSocial that is a GET to /v1/facebook/ads-search with a query, or /v1/facebook/page-ads with a page URL, 4 credits per ad returned. Each ad comes back with its text, headline, call-to-action, landing link, images and video URLs, advertiser, run dates, and active status. No ID verification and no Meta app.
Does the Facebook Ad Library show ad spend?
Not for commercial ads. Meta publishes spend and impression ranges only for political and social-issue ads. For a normal product ad you get the creative, the copy, the advertiser, the platforms, and the run dates, but never the budget, CPM, CTR, or targeting. The standard workaround is to use how long an ad has stayed live as a rough performance proxy, since advertisers pause losing ads quickly.
How much does it cost to pull Facebook ads with an API?
On ScraperSocial it is 4 credits per ad returned from the search and page-ads endpoints, or 5 credits for a single ad by URL. Credits are $0.005 each on the monthly plan, so an ad is about 2 cents and $5 covers roughly 250 ads. Billing follows what comes back, and failed calls are not charged. The official API is free but gated to political ads outside the EU, which is why it does not solve this for most teams.
Is it legal to scrape the Facebook Ad Library?
The Ad Library is public transparency data Meta publishes on purpose, and reading public pages has generally held up in US courts, but this is not legal advice. Ad creatives can name identifiable people and carry brand IP, so treat any personal data you keep under GDPR or CCPA, set a retention window, and do not repost competitor creatives as your own. Reading them to study strategy is a different thing from reusing them.