Extract comprehensive data from Facebook's Ad Library with real-time streaming, advanced filtering, and standby mode support.
Search Keywords & Advertisers β Stream Real-Time Ad Data β Get Complete Analytics
Get started with no upfront cost
Included:
- β Full access to Facebook Ad Library data
- β Multi-language & multi-country filtering
- β Real-time batch pushing (results appear as they're collected)
- β Complete media asset extraction (images & videos)
- β All filtering options (date ranges, platforms, categories)
Trade-offs:
β οΈ Shared proxy infrastructureβ οΈ Occasional connection interruptionsβ οΈ Best for small to medium projects (< 500 ads)
Upgrade for enterprise-grade reliability
All Free Tier features PLUS:
- π Dedicated premium proxy - Your own reliable connection
- π No rate limiting - Unlimited continuous scraping
- π 90% success rate - Stable, uninterrupted operations
- π Extract β+ ads per query - No slowdowns or blocks
- π Perfect for production use - Enterprise-ready infrastructure
- π Consistent performance - No random connection errors
Why upgrade?
- Avoid interruptions: Your dedicated proxy won't hit Facebook's rate limits
- Reliability: No HTTP errors or temporary blocks
- Scale effortlessly: Handle large datasets with perfect stability
- Best for agencies: Reliable results for client reports and production systems
- Zero downtime: 24/7 stable scraping without worries
| Feature | FREE | PAID β |
|---|---|---|
| Ads per query | Up to 100 | β+ |
| Rate limiting | Yes | No |
| Connection stability | Occasional issues | Always stable |
| Best for | Testing & small projects | Agencies & production |
| Support | Standard | Priority |
Perfect for: One-off scraping tasks, scheduled runs, offline processing
apify call dz-omar/facebook-ads-scraper-pro --input input.jsonInput format (input.json):
{
"searchQueries": ["nike", "adidas"],
"searchAdvertisers": ["15087023444"],
"maxResultsPerQuery": 50,
"countries": ["US"],
"activeStatus": "ACTIVE",
"mediaType": "IMAGE"
}Process Flow:
- Actor starts
- Processes your request
- Returns results
- Actor stops
Perfect for: Real-time applications, multiple requests, APIs, instant responses
# Actor automatically runs in standby mode
# Access via: https://dz-omar--facebook-ads-scraper-pro.apify.actorStandby Mode Advantages:
| Feature | Batch Mode | Standby Mode |
|---|---|---|
| Cold Start | 8-15 seconds | 0 seconds β‘ |
| Response Time | Slow (start overhead) | Instant |
| Best For | Scheduled tasks | Real-time apps |
| Concurrent Requests | Sequential | Parallel β |
| Always Running | No | Yes (pre-warmed) |
| Cost | Lower | Higher (always on) |
| Ideal Use | Nightly scrapes | Live dashboards |
Real-World Comparison:
| Scenario | Batch Mode | Standby Mode |
|---|---|---|
| Track competitor ads daily | β Good | β Excellent |
| Build a SaaS dashboard | β Perfect | |
| One-time research project | β Best | Overkill |
| API for other apps | β Not viable | β Ideal |
| Monitor 50 keywords live | β No | β Yes |
Example: Why Standby Mode is Better for Real-Time Dashboards
Imagine you're building a competitor monitoring dashboard that updates live:
Without Standby (Batch Mode):
User clicks "Refresh"
β
Wait 10 seconds for cold start
β
Wait 30 seconds for results
β
40 seconds total β (User closes browser)
With Standby Mode:
User clicks "Refresh"
β
Results instantly (pre-warmed)
β
2 seconds total β
(User stays engaged)
Send search parameters and receive ad data in real-time NDJSON stream.
Full Example:
curl -X POST https://dz-omar--facebook-ads-scraper-pro.apify.actor \
-H "Content-Type: application/json" \
-d '{
"searchQueries": ["nike", "adidas"],
"searchAdvertisers": ["Nike Football", "15087023444"],
"maxResultsPerQuery": 100,
"countries": ["US"],
"contentLanguages": ["en"],
"activeStatus": "ACTIVE",
"adType": "ALL",
"mediaType": "IMAGE",
"publisherPlatforms": ["FACEBOOK", "INSTAGRAM"],
"sortBy": "SORT_BY_TOTAL_IMPRESSIONS",
"startDate": "2024-01-01",
"endDate": "2025-01-31"
}'Minimal Example:
curl -X POST https://dz-omar--facebook-ads-scraper-pro.apify.actor \
-H "Content-Type: application/json" \
-d '{"searchQueries": ["nike"]}'Advertiser-Only Search:
curl -X POST https://dz-omar--facebook-ads-scraper-pro.apify.actor \
-H "Content-Type: application/json" \
-d '{"searchAdvertisers": ["Nike"], "maxResultsPerQuery": 200}'Save Results to File:
curl -X POST https://dz-omar--facebook-ads-scraper-pro.apify.actor \
-H "Content-Type: application/json" \
-d '{"searchQueries": ["nike"]}' \
> results.ndjson| Parameter | Type | Default | Min | Max | Description |
|---|---|---|---|---|---|
searchQueries |
array | [] |
0 | β | Keywords to search (e.g., ["nike", "adidas"]) |
searchAdvertisers |
array | [] |
0 | β | Advertiser names or page IDs |
maxResultsPerQuery |
integer | 10 |
10 | β | Max ads per query/advertiser |
batchSize |
integer | 30 |
10 | 100 | Ads per batch request |
countries |
array/string | ["ALL"] |
- | - | Country codes (e.g., ["US", "GB", "FR"]) |
contentLanguages |
array | [] |
0 | β | Language codes (e.g., ["en", "es", "fr"]) |
activeStatus |
string | "ALL" |
- | - | "ALL", "ACTIVE", "INACTIVE" |
adType |
string | "ALL" |
- | - | Ad category filter |
mediaType |
string | "ALL" |
- | - | Media type filter |
publisherPlatforms |
array | [] |
0 | 6 | Platforms to search |
sortBy |
string | "SORT_BY_TOTAL_IMPRESSIONS" |
- | - | Sort method |
startDate |
string | null |
- | - | Start date (YYYY-MM-DD) |
endDate |
string | null |
- | - | End date (YYYY-MM-DD) |
At least one of these MUST be provided:
searchQueries- Contains search keywords (required if no advertisers)searchAdvertisers- Contains advertiser names/page IDs (required if no queries)
Invalid Input Examples (Will Fail):
{
"maxResultsPerQuery": 50
}β Error: "Must provide either searchQueries or searchAdvertisers"
{
"searchQueries": [],
"searchAdvertisers": []
}β Error: "Both arrays are empty - no search criteria provided"
{
"countries": ["US"],
"activeStatus": "ACTIVE"
}β Error: "Input does not exist - missing searchQueries or searchAdvertisers"
Valid Input Examples:
{
"searchQueries": ["nike"]
}β Valid - Uses all defaults, searches for "nike"
{
"searchAdvertisers": ["15087023444"]
}β Valid - Searches all ads from page ID
{
"searchQueries": ["marketing"],
"searchAdvertisers": ["Nike", "Apple"],
"maxResultsPerQuery": 100,
"countries": ["US"]
}β Valid - Searches keywords in ads from specific advertisers
Ad Types:
ALL- All ad typesPOLITICAL_AND_ISSUE_ADS- Political/election adsHOUSING_ADS- Real estate & housingEMPLOYMENT_ADS- Job postingsCREDIT_ADS- Financial products
Media Types:
ALL- All media typesIMAGE- Static images onlyVIDEO- Video ads onlyMEME- Text-heavy imagesIMAGE_AND_MEME- Both image typesNONE- Text-only ads
Publisher Platforms:
FACEBOOK- Main Facebook feedINSTAGRAM- Instagram feed & storiesMESSENGER- Facebook MessengerWHATSAPP- WhatsApp BusinessTHREADS- Threads social platformAUDIENCE_NETWORK- Third-party apps/sites
Sort Methods:
SORT_BY_TOTAL_IMPRESSIONS- Most viewed first (default)SORT_BY_RELEVANCY_MONTHLY_GROUPED- Most recent first
Each line is a JSON object representing real-time data. Process line-by-line as they arrive:
{"type":"log","level":"info","message":"π Processing 2 keyword queries","timestamp":"2026-01-25T23:14:09Z"}
{"type":"log","level":"success","message":"π€ Sent batch: 30 ads for \"nike\"","timestamp":"2026-01-25T23:14:15Z"}
{"type":"log","level":"error","message":"β Query failed: No ads found","timestamp":"2026-01-25T23:14:20Z"}{
"type":"batch",
"source":"keyword_query",
"query":"nike",
"batchSize":30,
"ads":[{ad_object}, {ad_object}, ...],
"timestamp":"2026-01-25T23:14:15Z"
}{"type":"query_complete","query":"nike","totalAds":100,"timestamp":"2026-01-25T23:14:30Z"}
{"type":"advertiser_complete","advertiser":"Nike","totalAds":50,"timestamp":"2026-01-25T23:14:35Z"}{"type":"query_error","query":"test","error":"No ads found","timestamp":"2026-01-25T23:14:25Z"}
{"type":"advertiser_error","advertiser":"invalid","error":"Could not resolve advertiser","timestamp":"2026-01-25T23:14:40Z"}{
"type":"summary",
"stats":{
"queries":{
"total":2,
"success":2,
"failed":0,
"ads":150
},
"advertisers":{
"total":1,
"success":1,
"failed":0,
"ads":50
}
},
"timestamp":"2026-01-25T23:14:40Z"
}{"type":"complete","timestamp":"2026-01-25T23:14:45Z"}Each ad object contains:
{
"id": "606497791453836",
"page_id": "15087023444",
"page_name": "Nike",
"page_url": "https://facebook.com/Nike",
"page_profile_picture_url": "https://...",
"page_likes": 5000000,
"page_category": "Brand",
"text": "Just Do It campaign",
"title": "Ad Title",
"caption": "Visit our store",
"link_url": "https://nike.com",
"cta_text": "Learn More",
"media": {
"type": "image|video",
"primary_thumbnail": "https://...",
"images": [...],
"videos": [...]
},
"additional_assets": {
"images": [...],
"links": [...],
"texts": [...],
"videos": [...]
},
"start_date": "2024-01-15",
"end_date": "2024-02-15",
"is_active": true,
"platforms": ["FACEBOOK", "INSTAGRAM"],
"countries": ["US", "GB", "CA"],
"ad_category": "MARKETING",
"contains_sensitive_content": false,
"scraped_at": "2026-01-25T23:14:50Z"
}Search for ads by keywords or brand names:
{
"searchQueries": ["nike", "adidas"],
"maxResultsPerQuery": 100
}Use Case: Find all ads mentioning your keywords across all advertisers
Search ads from specific Facebook pages:
{
"searchAdvertisers": ["Nike", "15087023444"],
"maxResultsPerQuery": 100
}Use Case: Monitor what a specific brand/company is advertising
Both keywords and advertisers in one request:
{
"searchQueries": ["marketing"],
"searchAdvertisers": ["Nike", "Apple"],
"maxResultsPerQuery": 50
}Use Case: Find specific keywords in ads from selected companies
ALL, US, GB, CA, AU, DE, FR, ES, IT, BR, IN, JP, DZ, and 190+ more ISO 2-letter codes
en, es, fr, de, it, pt, ja, ko, zh, ar, and 90+ more ISO 2-letter codes
Standby Mode keeps the actor running 24/7 as an HTTP API server, ready to handle requests instantly without startup delays.
Traditional Batch Mode:
Request β Start Actor (8-15s) β Process β Stop Actor
Standby Mode:
Request β Instant Response (pre-warmed instance)
| Use Case | Batch Mode | Standby Mode |
|---|---|---|
| Nightly automated scrape | β Best choice | Overkill |
| Live competitor dashboard | β Too slow | β Essential |
| API for external apps | β Not viable | β Perfect |
| Real-time alerts | β No | β Yes |
| Webhook integrations | β Doesn't work | β Works great |
| Mobile app backend | β No | β Great |
| Research project | β Good | Expensive |
Cold Start Elimination:
- Batch: 10-15 seconds to start
- Standby: 0 seconds (instant)
- Difference: 10-15 seconds per request saved
Scalability:
- Batch: One request at a time
- Standby: Handle 100+ concurrent requests
- Difference: 100x throughput
User Experience:
- Batch: User waits for response
- Standby: Instant results
- Difference: User stays engaged
Scenario: Build a live dashboard monitoring Nike, Adidas, and Puma ads
With Batch Mode:
Dashboard loads
β
User clicks "Nike" tab
β
API call to scraper
β
Wait 10 seconds (cold start) β
β
Wait 20 seconds (scraping) β
β
Display results
β
Total time: 30 seconds (user frustrated)
With Standby Mode:
Dashboard loads (scraper pre-warmed)
β
User clicks "Nike" tab
β
API call to scraper
β
Results instantly β
β
Display results
β
Total time: 2 seconds (user delighted)
Automatic Access: Simply use the actor URL directly:
https://dz-omar--facebook-ads-scraper-pro.apify.actor
No Configuration Needed:
- Instance is always running
- Ready 24/7
- No startup delay
- Just send HTTP requests
Direct Integration Example:
Your application can make direct API calls:
POST https://dz-omar--facebook-ads-scraper-pro.apify.actor
Content-Type: application/json
{
"searchQueries": ["nike"],
"maxResultsPerQuery": 50
}
- Higher Cost: Actor runs continuously
- Break-even Point: ~3-4 requests per day
- Best For: High-frequency usage patterns
- Not Ideal For: Low-frequency, scheduled tasks
Cost Comparison (Example):
100 daily requests
- Batch mode: 100 starts Γ 30 sec = 50 min/day = $$
- Standby mode: Always on = $ (often cheaper!)
- Maximum continuous run: ~30 minutes idle timeout
- Reconnect is automatic if disconnected
- Not suitable for very low-frequency usage
- Higher base cost even if no requests
- Keep Connections Alive: Send heartbeat requests periodically
- Handle Reconnections: Implement retry logic on client side
- Batch Related Requests: Send multiple queries in one request when possible
- Monitor Performance: Track response times and errors
- Set Reasonable Limits: Don't request 10,000 ads if you need 100
| Aspect | Details |
|---|---|
| Requests | No hard limit, respects Facebook's rate limits |
| Batch Size | Default 30 ads, configurable 10-100 |
| Results per Query | 1-10,000 ads per query |
| Concurrent Requests | Unlimited (standby mode scales automatically) |
| Response Time | Real-time streaming - results as they arrive |
| Memory Usage | No limits - stream handles 1000s of ads |
- Failed queries are retried up to 3 times
- Exponential backoff prevents rate limiting
- Failed queries are logged but don't stop the job
Server automatically handles Apify platform migrations:
{"type":"migrating","message":"Server is migrating to new instance","timestamp":"..."}Connection behavior:
- Connection closes gracefully
- Reconnect to resume if interrupted
- No data loss - state is preserved
- No results: Try broader keywords or check spelling
- Limited data: Increase
maxResultsPerQueryor expand date ranges - Missing recent ads: Facebook may have indexing delays
- Intermittent failures: Consider upgrading to Paid tier for stability
- Slow performance: Reduce batch size or split into multiple smaller runs
- Rate limiting errors: Wait a few minutes before retrying, or upgrade to Paid
- Empty countries String: Use
"ALL"for global targeting - Wrong country codes: Use ISO 2-letter codes (US, not USA)
- Missing regional ads: Some ads may not be available in all regions
- Missing media URLs: Some ads may have expired media
- Broken links: Media URLs may expire after extended periods
- Empty arrays: Check if media type matches your filter
- Large datasets: Use date ranges to limit scope
- Free tier limits: Consider Paid tier for 1000+ ads per query
- Better results: Upgrade to Paid tier for enterprise-grade stability
- Ad Strategy Analysis: Track competitor creative strategies
- Platform Presence: Monitor competitor activity across platforms
- Campaign Duration: Analyze campaign lengths and timing
- Creative Inspiration: Download high-quality assets
- CTA Analysis: Study effective call-to-action strategies
- Performance Benchmarking: Compare page engagement metrics
- Industry Trends: Filter by category for sector analysis
- Geographic Patterns: Analyze regional strategies
- Content Evolution: Track messaging changes over time
- π Website: flowextractapi.com
- π§ Email: flowextractapi@outlook.com
- π Apify Profile: dz_omar
- π¬ GitHub Issues: FlowExtractAPI
- πΌ LinkedIn: flowextract-api
- π¦ Twitter: @FlowExtractAPI
- π± Facebook: flowextractapi
- YouTube Transcript Extractor - Extract transcripts with timestamps
- YouTube Scraper Pro - Complete channel and playlist extraction
- Zoom Scraper - Download recordings and transcripts
- Loom Scraper - Loom video and transcript extraction
- Idealista Scraper API - Spanish property data with API
- Idealista Scraper - Real estate listings extractor
- Screenshot - Fast webpage screenshots
- Ultimate Screenshot - Advanced screenshot tool
- Network Security Scanner - Security vulnerability scanner
- Facebook Ads Scraper Pro - Extract Facebook ads data
- Public Data Access: Only processes publicly available Facebook Ad Library data
- Rate Limiting: Respects Facebook's service limits and terms of use
- Data Protection: No storage of personal information or unauthorized data collection
- Commercial Use: Suitable for business intelligence and research applications