Facebook Meta Ads Library Scraper avatar

Facebook Meta Ads Library Scraper

Pricing

from $0.40 / 1,000 results

Go to Apify Store
Facebook Meta Ads Library Scraper

Facebook Meta Ads Library Scraper

Scrape Meta & Facebook Ad Library for competitor ad intelligence. Search by keyword, Page URL, or library link with country, status, and media filters. Extract full ad copy, creatives, links, platforms, and spend. 100% automated with no login or Meta API token needed.

Pricing

from $0.40 / 1,000 results

Rating

0.0

(0)

Developer

karamelo

karamelo

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a day ago

Last modified

Categories

Share

Overview

Facebook Ads Library Scraper extracts public ad records from the Meta / Facebook Ad Library, including advertiser information, ad copy, creative media, links, active dates, and platform placements. Provide search keywords, advertiser Facebook Page URLs, or direct Ad Library search URLs to receive structured datasets ready for analysis and export. Digital marketers, brand strategists, and competitive intelligence teams can monitor competitor campaigns, creative trends, and messaging without needing a Facebook account or Meta API credentials.

Quick start

  1. Open Facebook Ads Library Scraper on the Apify Store.
  2. Enter one or more keywords in Search keywords (e.g. shopify), or paste advertiser Facebook Page URLs (e.g. https://www.facebook.com/shopify).
  3. Set your target Country (default: US, or ALL for global coverage) and adjust Max ads if needed.
  4. Click Start to run the scraper.
  5. Once complete, view the results in the dataset tab and export as JSON, CSV, Excel, or HTML.

Minimal input example

{
"searchQueries": [
"shopify"
],
"country": "US",
"activeStatus": "all",
"mediaType": "all",
"maxAds": 10
}

Data extracted

Each row in the dataset represents a unique Facebook Ad Library ad. Results are flattened for easy analysis in spreadsheets and database tools.

Representative output record

{
"adArchiveId": "1238141341576372",
"adLibraryUrl": "https://www.facebook.com/ads/library/?id=1238141341576372",
"pageId": "20409006880",
"pageName": "Shopify",
"pageUrl": "https://www.facebook.com/shopify/",
"pageProfilePictureUrl": "https://scontent.xx.fbcdn.net/v/t39.35426-6/sample.jpg",
"pageCategories": [
"Software",
"E-commerce"
],
"pageLikeCount": 4547149,
"isActive": false,
"startDate": "2026-01-13",
"endDate": "2026-08-09",
"platforms": [
"FACEBOOK",
"INSTAGRAM",
"MESSENGER"
],
"bodyText": "When it's time to start your business, it's time for Shopify.",
"title": "Get going and keep growing",
"ctaText": "Sign up",
"ctaType": "SIGN_UP",
"linkUrl": "https://www.shopify.com/free-trial",
"linkCaption": "shopify.com",
"linkDescription": "Start your free trial today.",
"displayFormat": "IMAGE",
"imageUrls": [
"https://scontent.xx.fbcdn.net/v/t39.35426-6/ad_creative_image.jpg"
],
"videoUrls": [],
"videoPreviewUrls": [],
"categories": [
"UNKNOWN"
],
"containsAiMedia": false,
"impressions": null,
"spend": null,
"currency": null,
"gatedType": "ELIGIBLE",
"collationCount": 1,
"cardsCount": 0
}

Dataset field reference

FieldTypeDescription
adArchiveIdstringUnique Facebook Ad Library identifier.
adLibraryUrlstringDirect link to view the ad on Facebook Ad Library.
pageIdstringFacebook Page identifier for the advertiser.
pageNamestringName of the advertiser Facebook Page.
pageUrlstringDirect URL of the advertiser Facebook Page.
pageProfilePictureUrlstringURL of the advertiser Page profile picture.
pageCategoriesarrayBusiness categories associated with the advertiser Page.
pageLikeCountnumberPublic follower / like count for the advertiser Page.
isActivebooleanWhether the ad is currently active and running.
startDatestringFirst date the ad was observed running (YYYY-MM-DD).
endDatestringLast date the ad ran (YYYY-MM-DD), or null if currently active.
platformsarrayMeta platforms where the ad ran (FACEBOOK, INSTAGRAM, MESSENGER, etc.).
bodyTextstringPrimary ad copy text.
titlestringHeadline or title of the ad creative.
ctaTextstringVisible call-to-action button text (e.g. Shop Now, Sign up).
ctaTypestringFacebook call-to-action identifier (e.g. SHOP_NOW, SIGN_UP).
linkUrlstringDestination landing page URL linked by the ad.
linkCaptionstringDisplay caption shown for the destination URL.
linkDescriptionstringAccompanying description for the destination link.
displayFormatstringAd format reported by Facebook (IMAGE, VIDEO, DCO, CAROUSEL).
imageUrlsarrayDirect URLs to ad creative images.
videoUrlsarrayDirect URLs to ad videos when available.
videoPreviewUrlsarrayThumbnail preview URLs for ad videos.
categoriesarraySpecial ad categories (e.g. EMPLOYMENT, HOUSING, POLITICAL).
containsAiMediabooleanWhether Meta flags the ad creative as AI-generated media.
impressionsstringPublic impression bracket (available for political/issue ads).
spendobjectEstimated spend bounds (lowerBound, upperBound) for political/issue ads.
currencystringCurrency code for spend estimates when available.
gatedTypestringContent eligibility classification.
collationCountnumberNumber of creative variations in the ad collation group.
cardsCountnumberNumber of cards for carousel ad creatives.

Input parameters

ParameterTypeDefaultRequiredDescription
searchQueriesarray["shopify"]NoList of search keywords to query. Each keyword runs a separate search.
pageUrlsarray[]NoFacebook Page URLs to extract ads from specific advertisers.
adsLibraryUrlsarray[]NoFacebook Ad Library results URLs copied from browser searches.
countrystring"US"NoTwo-letter ISO country code (e.g. US, GB, DE, FR) or ALL.
activeStatusstring"all"NoFilter ads by status: all, active, or inactive.
mediaTypestring"all"NoFilter ads by media type: all, image_and_meme, or video.
onlyAdsNewerThanstring""NoInclusive start date bound (YYYY-MM-DD or relative such as 30 days).
onlyAdsOlderThanstring""NoInclusive end date bound (YYYY-MM-DD or relative such as 90 days).
maxAdsinteger100NoMaximum ads to collect per task (safety cap: 1 to 500).

Search modes and options

  • Search by keyword: Enter keywords representing products, services, or brand names. The scraper searches the selected country and status.
  • Search by advertiser: Enter public Facebook Page URLs (such as https://www.facebook.com/shopify/) to monitor specific competitors.
  • Search by direct URL: Paste full URLs copied from the Facebook Ad Library interface. Embedded parameters (query, page ID, country, status, media type) are respected.
  • Date filtering: Use onlyAdsNewerThan and onlyAdsOlderThan to bound the ad activity window. Active ads with no end date are evaluated as active through the current date.

Use cases

  • Competitor ad monitoring: Track which creatives and headlines competitors run over time, how long campaigns last, and when new offers launch.
  • Creative inspiration: Discover high-performing ad concepts, video structures, and call-to-action hooks in specific industries.
  • Brand protection: Verify authorized partner representation and detect unauthorized brand usage across ad networks.
  • Market research: Compare messaging angles and value propositions across international markets by varying the country filter.

Programmatic usage with Apify API

You can trigger runs and access datasets programmatically using the Apify API in Node.js, Python, or cURL.

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({
token: 'YOUR_APIFY_TOKEN',
});
const run = await client.actor('karamelo/facebook-ads-library-scraper').call({
searchQueries: ['shopify'],
country: 'US',
maxAds: 20,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Retrieved ${items.length} ads:`, items);

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_APIFY_TOKEN')
run = client.actor('karamelo/facebook-ads-library-scraper').call(run_input={
'searchQueries': ['shopify'],
'country': 'US',
'maxAds': 20,
})
dataset_items = client.dataset(run['defaultDatasetId']).list_items().items
print(f"Retrieved {len(dataset_items)} ads")

cURL

curl -X POST "https://api.apify.com/v2/acts/karamelo~facebook-ads-library-scraper/runs?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"searchQueries": ["shopify"],
"country": "US",
"maxAds": 20
}'

Integrations

Export your scraped ad data to other tools directly from Apify Console:

  • Google Sheets: Sync new ad rows to a Google Spreadsheet on every scheduled run.
  • Airtable: Create visual competitor ad galleries with image and video preview links.
  • Slack & Discord: Receive webhook alerts when competitor campaigns launch.
  • Make / Zapier / n8n: Trigger automated workflows, AI summarization, or database updates when new ad records are pushed.

Limitations and guidelines

  • Safety caps: Up to 20 search tasks per run, and up to 500 ads per search task. For larger extractions, divide keywords across multiple runs.
  • Public data: Extracts only publicly accessible ads from the Facebook Ad Library transparency portal.
  • Spend and impressions: Spend and impression brackets are provided only for ads covering social issues, elections, or politics, as defined by Meta transparency reporting rules. Standard commercial ads do not report spend estimates.
  • Disclaimer: Facebook and Meta are trademarks of Meta Platforms, Inc. This Actor is an independent tool accessing public transparency data and is not affiliated with or endorsed by Meta.