Facebook Ads Library Scraper — Meta Ad Library API avatar

Facebook Ads Library Scraper — Meta Ad Library API

Pricing

from $5.00 / 1,000 results

Go to Apify Store
Facebook Ads Library Scraper — Meta Ad Library API

Facebook Ads Library Scraper — Meta Ad Library API

Extract ads from the Meta Ad Library using the official Graph API. Search by keyword or advertiser, filter by country and status. Get ad creatives, copy, spend ranges, impressions, demographics, and platform data. Auto-pagination, flat output schema, CSV/Excel export.

Pricing

from $5.00 / 1,000 results

Rating

0.0

(0)

Developer

Aryan Saxena

Aryan Saxena

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Share

Facebook Ads Library Scraper — Extract Ads from Meta Ad Library

Pull competitor ads from the Meta Ad Library at scale. Search by keyword or advertiser, filter by country and status, and get structured data including ad copy, creatives, spend ranges, impressions, demographics, and platform breakdowns.

This actor uses the official Meta Graph API for reliable, structured results. It handles pagination automatically — the API returns only 100 ads per page, but this actor follows every cursor to get thousands of results in a single run.

Why use this actor instead of the API directly?

  • Auto-pagination — the Meta API caps at 100 ads per page. This actor follows all pagination cursors automatically.
  • Clean, flat output — the API returns deeply nested JSON (arrays inside arrays). This actor flattens everything into a simple, export-ready schema.
  • No coding needed — fill in the form, click Start, export to CSV or Excel.
  • Scheduling — set it to run daily or weekly to monitor competitor ads over time.
  • Integrations — connect to Google Sheets, Slack, Zapier, or webhooks via Apify.

How to get a Meta access token

You need a Meta access token to use this actor. Here's how to get one:

  1. Go to Meta Graph API Explorer
  2. Select your app (or create one at developers.facebook.com)
  3. Click Generate Access Token
  4. Grant the ads_read permission when prompted
  5. Copy the token and paste it into the actor input

Tokens expire after about 1–2 hours. For long-term use, generate a long-lived token.

How to use Facebook Ads Library Scraper

  1. Click Try for free on this page
  2. Paste your Meta access token
  3. Enter a search keyword (e.g. "running shoes") or a Facebook Page ID
  4. Select a country code (e.g. US, GB, DE)
  5. Click Start and wait for results
  6. Download your data as JSON, CSV, or Excel

Input

FieldTypeRequiredDescription
Access TokenstringYesMeta Graph API access token
Search QuerystringNo*Keywords to search in ads
Page IDstringNo*Facebook Page ID for a specific advertiser
Country CodestringNoTwo-letter code (default: US)
Ad TypestringNoall or political_and_issue_ads
Ad StatusstringNoactive, inactive, or all
Max ResultsintegerNoMax ads to fetch (default: 100)

*Either Search Query or Page ID is required.

Output

{
"adId": "123456789",
"pageName": "Nike",
"pageId": "15087023444",
"adCreativeBody": "Just Do It. New running shoes available now.",
"adCreativeLinkTitle": "Shop Nike Running",
"adCreativeLinkDescription": "Free shipping on orders over $50",
"adCreationTime": "2025-03-01T08:00:00+0000",
"deliveryStartTime": "2025-03-01T08:00:00+0000",
"adSnapshotUrl": "https://www.facebook.com/ads/archive/render_ad/?id=123456789",
"currency": "USD",
"spendLower": "100",
"spendUpper": "499",
"impressionsLower": "10000",
"impressionsUpper": "50000",
"publisherPlatforms": ["facebook", "instagram"],
"languages": ["en"]
}

You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

Data fields

FieldDescription
adIdUnique ad identifier
pageNameAdvertiser's Facebook Page name
adCreativeBodyMain ad copy text
adCreativeLinkTitleHeadline text
adCreativeLinkDescriptionDescription below headline
adCreationTimeWhen the ad was created
deliveryStartTimeWhen the ad started running
deliveryStopTimeWhen the ad stopped (if inactive)
adSnapshotUrlLink to view the ad creative
spendLower / spendUpperEstimated spend range
impressionsLower / impressionsUpperEstimated impression range
publisherPlatformsWhere the ad ran (facebook, instagram, messenger)
languagesAd languages
demographicDistributionAge and gender breakdown
deliveryByRegionGeographic delivery data

How much does it cost to scrape Facebook ads?

Cost depends on the number of ads fetched. A typical run fetching 500 ads costs about $0.02 in platform usage (API calls are lightweight). The Apify free tier is more than enough for regular use.

Tips

  • Monitor competitors: schedule weekly runs with a Page ID to track when competitors launch new ads
  • Keyword research: search for industry keywords to see what messaging competitors use
  • Multi-country: run the actor multiple times with different country codes to compare ad strategies across markets
  • Export to Sheets: use the Google Sheets integration to build a live competitive intelligence dashboard

Limitations

  • A Meta access token is required (free to generate, but expires periodically)
  • Spend and impression data are ranges, not exact numbers (this is Meta's policy)
  • Some fields may be empty depending on the ad type and region
  • Rate limits apply — very large runs (5,000+ ads) may take longer

FAQ

Is this legal? Yes. The Meta Ad Library is a public transparency tool. This actor uses the official Graph API, which Meta provides specifically for programmatic access.

Why do I need an access token? Meta requires authentication for API access. The token is free to generate and takes about 30 seconds.

My token expired. What do I do? Generate a new one at the Graph API Explorer. For long-term use, create a long-lived token.

I found a bug or have a feature request. Please open an issue in the Issues tab.