Facebook Ad Library Scraper API
every ad the website shows
Send an Ad Library link, a keyword search or an advertiser's page, and get the ads back as data: who runs them, the text, the link and button, when they started, where they run, and every image, video and carousel card.
www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=nike&search_type=keyword_unordered&media_type=all{"totalCount": 23161,"adCount": 29,"ads": [{"advertiser": "Perfect themes","startDate": "2026-05-19T07:00:00.000Z","platforms": ["facebook","… 4 more"],"body": "🔥🍭Themepack is a FREE and personalized APP😍 various styles of Theme💎 、…","ctaText": "Install now"},"… 28 more"]}
active US ads counted for one keyword search (nike)
ads per page, each with text, media, dates and platforms
per Ad Library page
for a page that can't be delivered
The Ad Library links you can send
Set the filters in the Ad Library in your browser, then copy the link. Country, status and media type travel with it.
Keyword searches
Ads whose text matches your words, from every advertiser, with the total count.
facebook.com/ads/library/?q=nike&country=USOne advertiser
All of one Page's ads, from the link the Ad Library gives for that Page.
facebook.com/ads/library/?view_all_page_id=15087023444One ad
A single ad by its library ID, from its share link.
facebook.com/ads/library/?id=1550534860016399Every format
Image, video, carousel and catalog ads, with each card's title, link and image unpacked.
"format": "dpa", "cards": [...]Platforms
Where the ad runs: Facebook, Instagram, Messenger, Threads, Audience Network.
"platforms": ["facebook", "instagram", "messenger"]Dates and status
When the ad started, whether it is still active, and how many versions it has.
"startDate": "2026-05-22T07:00:00.000Z"One call, every field
Point the scrape call at a Facebook Ad Library link. With JSON output and no prompt, the data comes back as it is, for 1 credit and no AI cost.
Ask for markdown instead and you get the readable page as text. The structured data still comes back, in its own structuredData field next to the markdown.
What comes back
Real responses from Spidra, trimmed for length. Nothing here is mocked up.
https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=nike&search_type=keyword_unordered&media_type=allA keyword search in the Ad Library: the total count and the first page of ads.
{"type": "adLibrary","totalCount": 23161,"adCount": 29,"hasMore": true,"ads": [{"id": "1550534860016399","url": "https://www.facebook.com/ads/library/?id=1550534860016399","isActive": true,"advertiser": {"name": "Perfect themes","pageId": "115939511520844","url": "https://www.facebook.com/100093512920259/","picture": "https://scontent-lax3-1.xx.fbcdn.net/v/t39.35426-6/701421303_1593266515068546_6584706353812290058_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=102&ccb=1-7&_nc_sid=c53f8…","likes": 18637,"categories": ["Topic"]},"startDate": "2026-05-19T07:00:00.000Z","platforms": ["facebook","instagram","… 3 more"],"format": "image","title": "𝕊𝕦𝕡𝕖𝕣 𝕙𝕠𝕥 𝕨𝕚𝕕𝕘𝕖𝕥𝕤 𝕒𝕡𝕡 !","body": "🔥🍭Themepack is a FREE and personalized APP😍 various styles of Theme💎 、Weather💖、Photo😊、Clock、Calendar to pick any widget to dress up your home screen!","linkUrl": "http://play.google.com/store/apps/details?id=com.iconchanger.widget.theme.shortcut","ctaText": "Install now","images": ["https://scontent-lax3-2.xx.fbcdn.net/v/t39.35426-6/700927950_933331229664450_6487763311056032772_n.jpg?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=nwSGHc-_alIQ7k…"]},{"id": "962050096457659","url": "https://www.facebook.com/ads/library/?id=962050096457659","isActive": true,"advertiser": {"name": "Depop","pageId": "156405867784232","url": "https://www.facebook.com/depop/","picture": "https://scontent-lax7-1.xx.fbcdn.net/v/t39.35426-6/706217505_1282327247074242_6940108535499458481_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=105&ccb=1-7&_nc_sid=c53f8…","likes": 98092,"categories": ["Shopping"]},"startDate": "2026-05-22T07:00:00.000Z","platforms": ["facebook","instagram","… 1 more"],"format": "dpa","title": "{{product.name}}","body": "Free Depop Shipping just dropped. Go find something you love.","linkUrl": "http://itunes.apple.com/app/id518684914","ctaText": "Download"},"… 27 more"]}
Ads the official API doesn't return
Meta's Ad Library API covers two groups of ads: ads about social issues, elections or politics, and ads delivered in the UK or the EU. A commercial ad that only ran in the US, or anywhere else outside the UK and EU, is on the Ad Library website but not in the API.
Spidra reads the website, so you get those ads as data: this Depop ad ran in the US on three platforms, with its text, link and button.
"id": "962050096457659","isActive": true,"advertiser": {"name": "Depop","pageId": "156405867784232","likes": 98092,"categories": ["Shopping"]},"startDate": "2026-05-22T07:00:00.000Z","platforms": ["facebook", "instagram", "messenger"],"format": "dpa","body": "Free Depop Shipping just dropped. Go find something you love.","linkUrl": "http://itunes.apple.com/app/id518684914","ctaText": "Download"
The size of the market, then the ads
Each page comes with the total number of ads that match the link, so you can see how crowded a keyword is before you read a single ad. A search for nike in the US counted 23,161 active ads. Nike's own Page had 34.
After the count come the ads on the first page of results, about 30, in the Ad Library's order.
"totalCount": 34,"adCount": 30,"hasMore": true,"advertiser": {"name": "Nike","deleted": false}
Catalog and carousel ads, card by card
Catalog ads show a template like {{product.name}} as their title, because Facebook fills in a product per viewer. The Ad Library shows the real products as cards, and Spidra returns each card with its own title, link, button and image.
So you can see which products a brand puts money behind, not just the template.
"format": "dpa","title": "{{product.name}}","body": "Get the gear that goes hard on and off the field.","cards": [{"title": "Nike Air Monarch IV","linkUrl": "https://www.nike.com/t/air-monarch-iv-mens-workout-shoes-p8qNlT/415445-001?dplnk=member","ctaText": "Shop Now"},{"title": "Nike Tempo Shorts","linkUrl": "https://www.nike.com/t/tempo-shorts-toddler-shorts-Gx0CH3/267358-019?dplnk=member","ctaText": "Shop Now"}]
Ask for the columns you want
Describe the answer as a prompt, a JSON schema or both, and it comes back in that shape. The AI reads a compact copy of the data Spidra already read, not the whole page.
{"ads": [{"advertiser": "Collab With Cass","message": "This is what happens when I decide I’m done thinking about groceries. Meals, snacks, breakfast, lunch — all handled without the mental load. Hungryroot builds y…","callToAction": "See details"},{"advertiser": "Collab With Cass","message": "This is what happens when I decide I’m done thinking about groceries. Meals, snacks, breakfast, lunch — all handled without the mental load. Hungryroot builds y…","callToAction": "See details"},{"advertiser": "Ollie","message": "FETCH 50% OFF + FREE WELCOME KIT 🧡 Ollie creates fresh meals with a simple mission: your dog’s wellness. \n\n🐾 Custom meal plans for your pup\n🥕 100% fresh, human-…","callToAction": "Shop now"},"… 27 more"]}
This request cost 16 credits on October 18, 2026: 1 for the page plus the AI tokens. For the data as it is, use JSON output with no prompt for 1 credit.
What teams build with it
The Ad Library shows what every advertiser is paying to say. Here is what people do with it.
Competitor tracking
See every ad a competitor runs, which products they push and where the ads send people.
See the use caseCreative research
Collect ad copy, images and videos by keyword to see the angles and offers a market uses.
Long-running winners
An ad that stays active for months is often one that works. Sort by start date to find them.
How Spidra compares
Meta's API is free but leaves out most commercial ads. Scrapers read the website instead.
| Meta Ad Library API | Apify (official actor) | ScrapeCreators | Spidra | |
|---|---|---|---|---|
| Which ads | Political and issue ads anywhere, and ads delivered in the UK or EU | The Ad Library website | The Ad Library website | The Ad Library website, commercial ads included |
| Access | Identity confirmation, a developer account and an app | API token | API key | API key |
| Price | Free | $5.80 down to $3.40 per 1,000 results | $1.88 down to $0.99 per 1,000 requests | 1 credit per page of about 30 ads: $3.80 down to $1.99 per 1,000 pages |
| Output | Fixed fields | Fixed fields | Fixed fields | Fixed fields, or your own schema or prompt |
Choose the official API if
You only need political, issue, UK or EU ads, and want the spend, reach and demographics the API adds for them.
Choose Spidra if
You want commercial ads from any market as data, with cards and media unpacked, through the same API you use for any other website.
Meta's API coverage is from its Ad Library API page (snapshot dated October 5, 2025). Competitor prices are as published on October 18, 2026 and may have changed. Spidra prices use 1 credit per page on each plan. Sources: Meta Ad Library API, Apify, ScrapeCreators.
What to know before you build
We would rather you hear the limits from us than find them in production.
- Each link returns the total count and the first page of results, about 30 ads. Later pages aren't available yet. Narrow the link (one advertiser, a country, active only, a media type) to get the ads you care about first.
- Facebook doesn't show spend, reach or impressions for most commercial ads, so those fields come back empty for them.
- The samples were run with the country set to the US.
- Political and issue ads can name the people who pay for them. Handle personal data according to the privacy laws that apply to you.
What it costs
1 credit per page. Pages that can't be delivered are free. Work out your monthly volume below.
Example: 50 Ad Library links a day is up to about 1,500 ads a day, about 1,500 credits a month. Plain JSON output uses no AI tokens.
| Plan | Price | Facebook Ad Library pages a month |
|---|---|---|
| Free | $0 | up to 300 (one time) |
| Starter | $19/mo | up to 5,000 |
| BuilderPopular | $79/mo | up to 25,000 |
| Pro | $249/mo | up to 125,000 |
Related scrapers
Same API key, same credits. See every scraper.
Facebook Scraper
Pages, posts, reels, Marketplace and the Ad Library.
Facebook Marketplace Scraper
Listings by city, category or search, and each listing in full.
Instagram Scraper
Public profiles, posts and reels with their counts.
TikTok Scraper
Profiles and videos with exact view, like and share counts.
Questions, answered
Facebook Ad Library
Yes, but it covers only ads about social issues, elections or politics, and ads delivered in the UK or the EU. Commercial ads that ran only elsewhere, such as a US-only campaign, are on the Ad Library website but not in the API. Using it also needs identity confirmation and a developer app. Spidra reads the website, so those ads are included.
Send an Ad Library link and see what comes back.
Get 300 free credits, no card, and run your first Ad Library search from the dashboard or the API.
Spidra is not affiliated with, endorsed by, or sponsored by Meta. Facebook is a trademark of Meta Platforms, Inc. Check Meta's terms of service and the laws that apply to you before you collect data, and use the data responsibly.