Skip to main content
Facebook Ad Library

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.

You sendwww.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=nike&search_type=keyword_unordered&media_type=all
About 30 ads1 credit
You get back (real run, trimmed)
{
"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"
]
}
23,161

active US ads counted for one keyword search (nike)

About 30

ads per page, each with text, media, dates and platforms

1 credit

per Ad Library page

$0

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=US

One 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=15087023444

One ad

A single ad by its library ID, from its share link.

facebook.com/ads/library/?id=1550534860016399

Every 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.

import { SpidraClient } from "spidra";
 
const spidra = new SpidraClient({
apiKey: process.env.SPIDRA_API_KEY,
});
 
const result = await spidra.scrape({
urls: [{ url: "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=nike&search_type=keyword_unordered&media_type=all" }],
output: "json",
});
 
const data = result.content;
console.log(data.totalCount);
for (const ad of data.ads) console.log(ad.advertiser.name, ad.startDate, ad.ctaText);
What you get for each ad
Ad
Library ID, a link to the ad in the library, active or not, format and number of versions
Advertiser
Page name, Page ID, Page link, picture, Page likes and categories
Copy
Title, body text, caption, link description, byline and disclaimer
Action
Landing page link, button text and button type, such as SHOP_NOW or INSTALL_MOBILE_APP
Timing
Start date and end date
Placement
Platforms the ad runs on
Media
Images, HD and SD video files with preview images, and carousel or catalog cards with their own title, link and media
Search
The total number of matching ads, how many came back, whether there are more, and the advertiser when the link is for one Page

What comes back

Real responses from Spidra, trimmed for length. Nothing here is mocked up.

Request
https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=nike&search_type=keyword_unordered&media_type=all

A keyword search in the Ad Library: the total count and the first page of ads.

Response (real run, October 18, 2026, trimmed)
{
"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.

Keyword search, US (real run, trimmed)
"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.

Nike's ads, US (real run, trimmed)
"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.

A Nike catalog ad (real run, trimmed)
"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.

Request
const result = await spidra.scrape({
urls: [{ url: "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=meal%20kit&search_type=keyword_unordered&media_type=all" }],
prompt: "List each advertiser with the main message of their ad and the call to action.",
schema: {
type: "object",
properties: {
ads: {
type: "array",
items: {
type: "object",
properties: {
advertiser: {
type: "string"
},
message: {
type: "string"
},
callToAction: {
type: "string"
}
}
}
}
}
},
});
What came back (real run)
{
"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 case

Creative 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 APIApify (official actor)ScrapeCreatorsSpidra
Which adsPolitical and issue ads anywhere, and ads delivered in the UK or EUThe Ad Library websiteThe Ad Library websiteThe Ad Library website, commercial ads included
AccessIdentity confirmation, a developer account and an appAPI tokenAPI keyAPI key
PriceFree$5.80 down to $3.40 per 1,000 results$1.88 down to $0.99 per 1,000 requests1 credit per page of about 30 ads: $3.80 down to $1.99 per 1,000 pages
OutputFixed fieldsFixed fieldsFixed fieldsFixed 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.

Monthly credits
1,500
Fits the Starter plan ($19/mo)

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.

PlanPriceFacebook Ad Library pages a month
Free$0up to 300 (one time)
Starter$19/moup to 5,000
BuilderPopular$79/moup to 25,000
Pro$249/moup to 125,000

Credits are shared across everything Spidra does, so the same plan covers Facebook Ad Library and any other site.

Related scrapers

Same API key, same credits. See every scraper.

FAQ

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.