Facebook Ad Library scraper data API: fields, sample output and cost per 1,000 rows
Reference for Facebook Ad Library scraper: output fields, a sample record and what a run costs. Collect public ads from the Meta Ad Library by keyword, advertiser Page ID or Ad Library link: ad text, headline, landing page, button, images and...
Collect public ads from the Meta Ad Library by keyword, advertiser Page ID or Ad Library link: ad text, headline, landing page, button, images and videos, dates, platforms and version count, plus spend and reach ranges where Meta publishes them.
This is the reference for the Actor v0iddo/facebook-ads-library-scraper: what is in every output row, what the input takes, and what a run costs. Values below come from a real run of the Actor.
At a glance
| Actor | v0iddo/facebook-ads-library-scraper |
| Store page | Facebook Ad Library scraper |
| Output | one row per result, as JSON, CSV, Excel or HTML |
| Fields per row | 18 (9 text, 3 list, 2 URL, 2 date, 1 number, 1 true/false) |
| Cap on results | maxItems in the input |
| Price | $0.50 per 1,000 results |
Output fields
Each result is one row with these fields (fields that name people are left out):
| Field | Type | Meaning | Sample value |
|---|---|---|---|
adArchiveId |
text | Ad ID | 1550534860016399 |
pageName |
text | Advertiser | Perfect themes |
isActive |
true/false | Active | true |
startDate |
date | Started | 2026-05-19 |
endDate |
date | Ended | |
platforms |
list | Platforms | ["facebook", "instagram", "audience_network"] |
body |
text | Ad text | |
title |
text | Headline | 𝕊𝕦𝕡𝕖𝕣 𝕙𝕠𝕥 𝕨𝕚𝕕𝕘𝕖𝕥𝕤 𝕒𝕡𝕡 ! |
ctaText |
text | Button | Install now |
linkUrl |
URL | Landing page | http://play.google.com/store/apps/details?id=com.iconchanger.widget... |
displayFormat |
text | Format | IMAGE |
imageUrls |
list | Images | ["https://scontent-lga3-1.xx.fbcdn.net/v/t39.35426-6/700927950_9333... |
adLibraryUrl |
URL | Ad Library link | https://www.facebook.com/ads/library/?id=1550534860016399 |
pageId |
text | 115939511520844 | |
pageCategories |
list | ["Topic"] | |
pageLikeCount |
number | 18620 | |
searchedFor |
text | nike | |
searchCountry |
text | US |
One record
{
"adArchiveId": "1550534860016399",
"adLibraryUrl": "https://www.facebook.com/ads/library/?id=1550534860016399",
"pageId": "115939511520844",
"pageName": "Perfect themes",
"pageCategories": [
"Topic"
],
"pageLikeCount": 18620,
"isActive": true,
"startDate": "2026-05-19",
"platforms": [
"facebook",
"instagram",
"audience_network"
],
"title": "𝕊𝕦𝕡𝕖𝕣 𝕙𝕠𝕥 𝕨𝕚𝕕𝕘𝕖𝕥𝕤 𝕒𝕡𝕡 !",
"linkUrl": "http://play.google.com/store/apps/details?id=com.iconchanger.widget.theme.shortcut",
"ctaText": "Install now",
"displayFormat": "IMAGE",
"imageUrls": [
"https://scontent-lga3-1.xx.fbcdn.net/v/t39.35426-6/700927950_933331229664450_6487763311056032772_n.jpg?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f..."
],
"searchedFor": "nike",
"searchCountry": "US"
}
Input parameters
| Parameter | Type | Required | Default | What it does |
|---|---|---|---|---|
searchTerms |
array | no | ["nike"] | Words to search the Ad Library for, for example a brand or product name. |
pageIds |
array | no | Numeric Facebook Page IDs of advertisers whose ads you want, one per line. | |
adLibraryUrls |
array | no | Optional search links copied from the browser, such as https://www.facebook.com/ads/library/?activestatus=active&adtype=all&country=US&q=nike&searchtype=keywordunordered. | |
country |
string | no | US | Where the ads were shown: a two-letter country code such as US, GB or DE, or ALL for every country. |
activeStatus |
string | no | active | Which ads to return: ads that are running now, ads that stopped, or both. |
adType |
string | no | all | Ad category in the Ad Library. |
mediaType |
string | no | all | Only ads that contain this kind of media. |
startDateMin |
string | no | Optional. Only ads that started running on or after this date, as YYYY-MM-DD. | |
startDateMax |
string | no | Optional. Only ads that started running on or before this date, as YYYY-MM-DD. | |
maxAdsPerSearch |
integer | no | 100 | The most ads to read for each search term, Page ID or link. |
maxItems |
integer | no | 100 | The run stops after this many result rows. |
Cost per 1,000 rows
$0.50 per 1,000 results. You pay per result row. There is no separate charge per run. Higher Apify plans pay less per result, down to $0.35 per 1,000.
| Results | Cost at the listed price | Cost at the lowest plan price |
|---|---|---|
| 100 | $0.05 | $0.04 |
| 1,000 | $0.50 | $0.35 |
| 10,000 | $5.00 | $3.50 |
| 100,000 | $50.00 | $35.00 |
The figures are the listed price times the number of results. The maxItems limit and the maximum cost setting in the run options both stop a run before it spends more than you planned.
Get the rows as CSV over HTTP
One request starts a run, waits for it and returns the dataset. The format parameter picks the file type and fields picks the columns. Replace the token with the one from Apify Console, Settings, Integrations.
curl -X POST "https://api.apify.com/v2/acts/v0iddo~facebook-ads-library-scraper/run-sync-get-dataset-items?format=csv&fields=adArchiveId,pageName,isActive" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms": ["nike"], "country": "US", "activeStatus": "active", "maxItems": 20}'
Good to know
- If Meta shows a login, verification or CAPTCHA page instead of the Ad Library, the run stops and says so; it never tries to get around that.
- Not affiliated with Meta. The data is what the public Ad Library shows to a visitor who is not logged in.
Links
- Actor on the Apify Store: Facebook Ad Library scraper
- Guide with the Python and JavaScript code: https://voidd0.github.io/facebook-ads-library-scraper/
Comments
Join the discussionNo comments yet. Be the first to comment.
