Facebook Ads Scraper avatar
Facebook Ads Scraper

Pricing

$0.70 / 1,000 results

Go to Store
Facebook Ads Scraper

Facebook Ads Scraper

Developed by

Shahzeb Naveed

Shahzeb Naveed

Maintained by Community

Facebook Ads Library Scraper - Lightning Fast Edition | Extract Active Facebook Ads Data Instantly. Scrape ads by country & keyword with ultra-fast HTML parsing. Perfect for marketing research, competitor analysis & lead generation. Headless browser automation with Playwright & Apify.

0.0 (0)

Pricing

$0.70 / 1,000 results

1

Total users

8

Monthly users

8

Runs succeeded

>99%

Last modified

5 days ago

You can access the Facebook Ads Scraper programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.

1import { ApifyClient } from 'apify-client';
2
3// Initialize the ApifyClient with your Apify API token
4// Replace the '<YOUR_API_TOKEN>' with your token
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9// Prepare Actor input
10const input = {
11 "targets": [
12 {
13 "country": "United States",
14 "keyword": "rental properties"
15 },
16 {
17 "country": "Ukraine",
18 "keyword": "rental apartments"
19 }
20 ]
21};
22
23// Run the Actor and wait for it to finish
24const run = await client.actor("shahzeb-king/facebook-ads-scraper").call(input);
25
26// Fetch and print Actor results from the run's dataset (if any)
27console.log('Results from dataset');
28console.log(`πŸ’Ύ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
29const { items } = await client.dataset(run.defaultDatasetId).listItems();
30items.forEach((item) => {
31 console.dir(item);
32});
33
34// πŸ“š Want to learn more πŸ“–? Go to β†’ https://docs.apify.com/api/client/js/docs

Lightning-fast Facebook Ads Library scraper API in JavaScript

The Apify API client for JavaScript is the official library that allows you to use Facebook Ads Scraper API in JavaScript or TypeScript, providing convenience functions and automatic retries on errors.

Install the apify-client

$npm install apify-client

Other API clients include: