Facebook Ads Library Scraper
Search public Facebook Ads Library records by keyword or advertiser, export structured ad and creative data, and optionally retrieve bounded ad details.
- users, last 30 days
- 1
- runs, last 30 days
- 8
- runs, all time
- 16
- users, all time
- 2
Live figures from Apify's public API, refreshed every hour.
Facebook Ads Library Scraper specifications
| Platform | |
|---|---|
| Apify actor | data-slayer/facebook-ads-library-scraper |
| Price | from $1.20 per 1,000 results, plus $0.003 per run start |
| Inputs | searchTermsadvertiserQueriesadvertiserPageIdsadIdscountryadStatusand 5 more |
| Output | 23 documented fields per row |
| Export formats | JSON, CSV, Excel, XML, HTML |
| Facebook login or cookies | Not required |
| Integrations | Apify REST API, JavaScript and Python clients, n8n, Make, Zapier |
| Last updated | September 26, 2026 (version 0.1.8) |
Run it from code
Replace the example input with your own. You need an Apify API token, which you can create in your Apify account settings.
curl -X POST "https://api.apify.com/v2/acts/data-slayer~facebook-ads-library-scraper/run-sync-get-dataset-items" \
-H "Authorization: Bearer $APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"searchTerms": [
"running shoes"
]
}'{
"recordType": string | null,
"adId": string | null,
"adLibraryUrl": string | null,
"creativeId": string | null,
"advertiser": object | null,
"isActive": boolean | null,
"startedAt": string | null,
"endedAt": string | null,
"platforms": array | null,
"countries": array | null,
"creativeIds": array | null,
"body": string | null,
"headline": string | null,
"description": string | null,
// + 9 more fields
}Input parameters
11 parameters you can set for each run.
| parameter | type | description |
|---|---|---|
searchTerms | array | Ad search terms Keywords, brands, products, or topics to search in the public Ads Library. |
advertiserQueries | array | Find advertiser pages Optional advertiser names to resolve before collecting ads. |
advertiserPageIds | array | Advertiser page IDs Optional numeric public page IDs whose ads you want to collect. |
adIds | array | Ad IDs for details Optional numeric Ads Library IDs to retrieve directly. Enable ad details when using this field. |
country | string | Country Use a two-letter ISO country code or ALL. Coverage depends on what the public Ads Library exposes for the selected ad category and region. default: US |
adStatus | string | Ad status Return active ads, inactive ads, or both when supported. options: active, inactive, all default: active |
mediaType | string | Media type Limit results to image or video ads when supported. options: all, image, video default: all |
maxItems | integer | Maximum discovery results Hard cap across ad and advertiser discovery rows. Detail and included creative records are counted separately. default: 100 |
maxPages | integer | Maximum pages per discovery input Safety cap for pagination on each keyword, advertiser query, or page ID. default: 10 |
includeDetails | boolean | Include separately priced ad details Retrieve a separate ad-detail record for accepted ads, up to the detail cap. This creates a separate billable event per successful detail record. default: false |
maxDetailItems | integer | Maximum ad details Hard cap for separately priced ad-detail records when details are enabled. default: 25 |
Output fields
Each result is one row with these 23 fields, taken from the scraper's dataset schema.
| field | type | description |
|---|---|---|
recordType | string | null | |
adId | string | null | |
adLibraryUrl | string | null | |
creativeId | string | null | |
advertiser | object | null | |
isActive | boolean | null | |
startedAt | string | null | |
endedAt | string | null | |
platforms | array | null | |
countries | array | null | |
creativeIds | array | null | |
body | string | null | |
headline | string | null | |
description | string | null | |
callToAction | string | null | |
destinationUrl | string | null | |
format | string | null | |
imageUrls | array | null | |
videoUrls | array | null | |
transparency | object | null | |
detailStatus | string | null | |
retrievedAt | string | null | |
input | object | null |
Pricing
Pay-per-event pricing, billed through your Apify account. Where plan tiers are listed, paid Apify plans get a lower price per event.
| event | price | per 1,000, by Apify plan |
|---|---|---|
| Ad result One unique public ad discovery row successfully added to the default dataset. Included creative records are not charged separately. | $0.00175 each |
|
| Advertiser result One unique advertiser-page discovery row successfully added to the default dataset. | $0.0015 each |
|
| Ad detail One requested ad-detail record successfully added to the default dataset. Unavailable or failed details are not charged. | $0.012 each |
|
| Actor Start Charged when the Actor starts running. Number of events charged depends on Actor memory (one event per GB, minimum one event). | $0.003 per run |
|
Questions
How much does Facebook Ads Library Scraper cost?
Facebook Ads Library Scraper uses pay-per-event pricing on Apify. The main charge is $0.00175 per ad result, which is $1.75 per 1,000. On higher Apify plans the price drops to $1.20 per 1,000. Each run also has a start fee of $0.003.
Do I need to log in to Facebook or share cookies?
No. Facebook Ads Library Scraper works without your Facebook login or cookies. You only need an Apify account to run it.
Can I use Facebook Ads Library Scraper through an API?
Yes. Send a POST request to the Apify API with your input and read the results as JSON, or use Apify's official clients for JavaScript and Python. The code examples on this page are ready to copy.
What data does Facebook Ads Library Scraper return?
Each result is a structured row. Its dataset schema lists 23 fields, including recordType, adId, adLibraryUrl, creativeId, and advertiser.
What formats can I export?
Results are stored in an Apify dataset. You can read it through the API as JSON, or download it as CSV, Excel, XML or HTML.
More Facebook scrapers
All Facebook scrapersFacebook Page Search Scraper
No Cookies
Search and discover Facebook pages by keyword without login. Get page names, URLs, Facebook IDs, verification status, and profile images. Build prospect lists and competitor databases from Facebook search results. No cookies, no authentication. JSON/CSV/Excel export.
- runs/30d
- 13.1K
- users/30d
- 158
Facebookfrom $2.17 / 1K resultsFacebook Marketplace Listing Scraper
No Cookies
Extract detailed Facebook Marketplace listing data without login. Get title, price, condition, location (with coordinates), seller details, delivery options, and full vehicle specifications. No cookies, no authentication. JSON/CSV/Excel export.
- runs/30d
- 681
- users/30d
- 12
Facebookfrom $2.17 / 1K resultsFacebook Page Posts Scraper
No Cookies
Extract posts from any Facebook page without login. Get full post text, reactions by type (like, love, care, wow, sad, angry), comments, shares, author profiles, media attachments, and timestamps. No cookies, no authentication. Export as JSON/CSV/Excel.
- runs/30d
- 324
- users/30d
- 23
Facebookfrom $2.17 / 1K resultsFacebook Page Details Scraper
No Cookies
Extract full Facebook page profiles without login. Get page name, followers, categories, contact info (phone, email, website), address, ratings, services, price range, and verification status. No cookies, no authentication. JSON/CSV/Excel export.
- runs/30d
- 251
- users/30d
- 18
Facebookfrom $2.17 / 1K resultsFacebook Group Posts Scraper
No Cookies
Extract posts from any public Facebook group without login. Get full post text, reactions by type, comments, shares, author profiles, media attachments, and timestamps. No cookies, no authentication. Export as JSON/CSV/Excel.
- runs/30d
- 137
- users/30d
- 9
Facebookfrom $2.17 / 1K resultsFacebook Events Scraper
No Cookies
Search and discover Facebook events by keyword without login. Get event titles, IDs, URLs, and event types. Build event databases for lead generation, sponsorship prospecting, and competitive intelligence. No cookies, no authentication. JSON/CSV/Excel export.
- runs/30d
- 84
- users/30d
- 3
Facebookfrom $2.17 / 1K results