Legally Scrape Facebook Ads Data

Download to Excel & CSV Files via API

Unlike screen scrapers, our no-code platform exports data directly from Facebook Ads' Official API so you can download extracted data seamlessly. This means no breaking code, getting blocked, overpriced proxies or incorrect data.

c10IPpfh0e0 ▶️

Sign Up to Scrape Data from Facebook Ads' API

Facebook Ads API Data Scraping

The Facebook Marketing API is a Facebook API that allows you to run queries against your own Facebook business ad account. This can be very useful for anyone in paid marketing who needs an automated way to monitor ad campaigns & ad management.

IMPORTANT If you’re trying to scrape the public Facebook Ads Library (for competitive research), see the Facebook Ads Library Scraper page instead.

You’re free to query the API directly and begin making API calls, but you may have an easier time using an already built client like the Python FacebookAdsAPI module (GitHub). While this module is great if you need a high amount of customization and are willing to write & maintain custom code, we’ll explain below how our service can help you extract CSV files from the API using our no-code platform.

User Access Token

You’ll need to generate an access token to query the API. You can do this under your Facebook Developer Apps where you’ll need to then go under Products > Marketing API > Tools (left hand column) and generate a token with ads_read and read_insights ads management permissions.

Ad Insights API Queries

The easiest place to start is with the Ad Insights API, which we provide a Facebook Ad Insights Scraper for. You can review the instructions on the page (or query the raw endpoint directly), but you’ll need to provide an ad object ID (which can just be the account ID of the account that owns the Facebook Ads).

You’ll also want to pay attention to the fields parameter, where you can enter in a list of fields you want returned from the API. These will be nearly identical to the “columns” you see on the Facebook Ads Manager. Please refer to their available fields documentation for more information.

Posted by steve on Sept. 28, 2023, 6:30 a.m. 🚩  Report

⚡️ Endpoints

👥  Contributors: steve
Ad Insights
/v{{version}}/{{ad_object_id}}/insights
Ad Comments
/v{{version}}/{{effective_object_story_id}}/comments
Ad Creative
/v{{version}}/{{ad_object_id}}/adcreatives
Audience Search
/search

🧪 Formulas