Facebook Ads
Pricing
$9.99/month + usage
Go to Apify Store
Facebook Ads
You can retrieve ads by keyword or advertiser ID, with the advertiser ID available through `actor: shareze001/facebook-advertisers`. Additionally, you can filter ads based on time range and ad status for more specific results.
0.0 (0)
Pricing
$9.99/month + usage
4
72
21
Last modified
5 days ago
Facebook Ads Scraper
This Apify actor is designed to scrape advertisement data from Facebook's Ad Library using Playwright. It allows you to search for ads based on keywords, page IDs, and other parameters.
How to Use
Input Configuration
The actor accepts the following input parameters in JSON format:
Parameter | Type | Description | Required | Default Value |
---|---|---|---|---|
size | Integer | The maximum number of ads to scrape. | Yes | 10 |
keyword | String | The search keyword for finding ads. | No | |
page_id | String | The advertiser's page ID. You can get it using the shareze001/facebook-advertisers actor. | No | 15087023444 |
ad_status | String | The status of the ads to scrape (all , active , or inactive ). | Yes | all |
country | String | The country filter for the ads (ALL or US ). | Yes | ALL |
start_date_min | String | The start date for filtering ads (format: YYYY-MM-DD ). | No | |
start_date_max | String | The end date for filtering ads (format: YYYY-MM-DD ). | No |
Example Input
{"size": 20,"keyword": "shoes","page_id": "123456789","ad_status": "active","country": "US","start_date_min": "2023-01-01","start_date_max": "2023-01-31"}
Output
The actor returns an array of scraped ads in JSON format. Each ad contains the following fields:
ad_archive_id
: The unique ID of the ad in the Facebook Ad Library.collation_id
: The collation ID of the ad.collation_count
: The number of ads in the collation.start_date
: The start date of the ad.end_date
: The end date of the ad.page_id
: The ID of the advertiser's page.page_name
: The name of the advertiser's page.page_like_count
: The number of likes on the advertiser's page.page_profile_picture_url
: The URL of the advertiser's profile picture.page_is_deleted
: Whether the advertiser's page is deleted.publisher_platform
: The platform where the ad is published.is_aaa_eligible
: Whether the ad is eligible for AAA.is_active
: Whether the ad is currently active.body
: The text content of the ad.images
: A list of image URLs used in the ad.videos
: A list of video details used in the ad.links
: A list of links included in the ad.
Example Output
[{"ad_archive_id": "1234567890","collation_id": "0987654321","collation_count": 1,"start_date": "2023-01-01","end_date": "2023-01-31","page_id": "123456789","page_name": "Example Page","page_like_count": 1000,"page_profile_picture_url": "https://example.com/profile.jpg","page_is_deleted": false,"publisher_platform": "Facebook","is_aaa_eligible": true,"is_active": true,"body": "This is an example ad.","images": ["https://example.com/image1.jpg"],"videos": [{"video_preview_image_url": "https://example.com/video_preview.jpg","video_url": "https://example.com/video.mp4"}],"links": [{"title": "Example Link","description": "This is an example link.","url": "https://example.com","caption": "Example Caption","button_text": "Learn More"}]}]
Running the Actor
- Deploy the actor to the Apify platform.
- Provide the input parameters in the actor's input schema.
- Run the actor and wait for the results.
- Download the output data in JSON format.
Use Cases
- Analyze Facebook ads for market research.
- Monitor competitors' advertising strategies.
- Collect data for ad performance analysis.
On this page
Share Actor: