Facebook Ads Library Scraper & Meta Ads API avatar

Facebook Ads Library Scraper & Meta Ads API

Pricing

from $0.50 / 1,000 ad scrapeds

Go to Apify Store
Facebook Ads Library Scraper & Meta Ads API

Facebook Ads Library Scraper & Meta Ads API

Facebook Ad Library scraper & Meta ads API: track competitor Facebook & Instagram ads by keyword, advertiser page or Ad Library URL, with country, status, category, media, platform, language and date filters. Ad copy, creatives, CTA, landing page, run dates, political spend. $0.50 per 1,000 ads.

Pricing

from $0.50 / 1,000 ad scrapeds

Rating

0.0

(0)

Developer

Christian Machon

Christian Machon

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 hours ago

Last modified

Share

Pull any brand's Facebook and Instagram ads from the Meta Ad Library (copy, images, videos, landing pages and run dates) for $0.50 per 1,000 ads.

Scrape ads from the public Meta Ad Library (Facebook, Instagram, Messenger, Audience Network, Threads) by keyword, by advertiser page (page ID, page URL or username) or by pasting Ad Library URLs. You can use all of the Ad Library's own filters: country, active / inactive status, ad category (political & issue, housing, employment, financial), media type, platform, language, exact phrase, date range and sort by impressions.

Each ad is saved as one flat record: ad ID and Ad Library link, advertiser (name, page ID, page URL, logo, likes, categories), ad text, headline, link description, CTA, landing page URL, image and video URLs (HD / SD plus preview image), carousel and product cards, start / end date and days running, active flag, platforms, display format and how many versions of the ad are running. For political and issue ads you also get "Paid for by", spend range, impressions range, currency and reach estimate where Meta publishes them.

The Actor uses the same data feed the Ad Library website uses, so it doesn't need a browser. It is quick: about 200 ads per minute on a deep search. Meta rate-limits datacenter IPs, so runs go through Apify residential proxies, which are included in the price. If an IP gets rate-limited, the Actor switches to a fresh one and picks up from the same page, so nothing is skipped or saved twice.

Who it's for and use cases

Built for performance marketers and media buyers, agencies running competitor audits, creative strategists building swipe files, market researchers and journalists, and developers or AI agents that need ad-library data through an API.

  • Competitor ad research: see every ad a brand is running now, which creatives they use, which landing pages they send traffic to and how long each ad has been live. An ad that has run for a long time is usually one that works.
  • Creative inspiration and swipe files: collect the image and video URLs, headlines and CTAs that ads use for a keyword in any country.
  • Lead generation for agencies: find businesses that are actively advertising in a niche or country. You get page name, page URL, landing page and number of ads.
  • Political ad transparency and journalism: spend and impression ranges, "Paid for by" and dates for political and issue ads.
  • Market monitoring: schedule a daily run and track new ads for your keywords or competitors.
  • Pairs with our Google Ads Transparency, LinkedIn Ad Library and TikTok Ad Library scrapers to cover all the big ad platforms.

How to use it

  1. Enter search terms (running shoes, crm software), and/or advertiser pages (15087023444, https://www.facebook.com/nike/, nike), and/or Ad Library URLs. Each one is a separate search.
  2. Pick a country (ISO code like US, GB, DE or a name like Germany). ALL searches all countries.
  3. Optionally set status (active by default), ad category, media type, platforms, languages, exact phrase, date range and sort.
  4. Set max ads per search and run.

Ads are saved to the dataset, which has three views: Overview, Creatives and Political & issue ads. A summary for each search goes to the OUTPUT record in the key-value store. It shows the status, the number of ads saved, the page ID a username resolved to, and any notes.

Paste Ad Library URLs

Set up your search on facebook.com/ads/library and copy the URL from the address bar, for example https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&media_type=video&q=meal%20delivery&search_type=keyword_unordered. The Actor reads the keyword or page (q, view_all_page_id) and the filters in the URL: country, active_status, ad_type, media_type, search_type, start_date[min] / start_date[max], content_languages, publisher_platforms and sort_data. A single-ad URL (?id=1234567890) returns just that ad.

Advertiser pages

A numeric page ID is the most reliable input. To find it, open the advertiser in the Ad Library and copy view_all_page_id from the URL. Page URLs with an ID (profile.php?id=..., /Brand-Name-123456789/) work directly. For a username or vanity URL (nike, facebook.com/NordstromRack), the Actor looks the page up in the Ad Library and matches the page link. This only works when the page has ads in the library. OUTPUT shows the resolved page ID.

Input examples

Keyword search in the US:

{
"searchTerms": ["running shoes"],
"country": "US",
"maxAdsPerSearch": 200
}

All of a brand's active ads, by page ID or URL:

{
"pageIds": ["15087023444", "https://www.facebook.com/NordstromRack/"],
"maxAdsPerSearch": 500
}

Political and issue ads in the US, with spend, sorted by impressions:

{
"searchTerms": ["climate"],
"country": "US",
"adType": "political_and_issue_ads",
"activeStatus": "all",
"sortBy": "impressions"
}

Video ads on Instagram shown since 1 October, in English:

{
"searchTerms": ["skincare"],
"country": "GB",
"mediaType": "video",
"platforms": ["instagram"],
"languages": ["en"],
"dateFrom": "2026-10-01"
}

What data you get

Fill rates are measured on 2,551 ads from our final test runs (1,179 advertisers, 75 political / issue ads). Fill rates depend on the ad: video ads have no images, single-image ads have no cards, and commercial ads have no spend data.

FieldWhat it isFilled
adArchiveId / adLibraryUrlMeta Ad Library ID (stable, used for de-duplication) and public link to the ad100%
pageId / pageName / pageUrlAdvertiser page ID, name and Facebook/Instagram page link100%
pageProfilePictureUrlAdvertiser logo100%
pageLikeCount / pageCategoriesPage likes and page categories100%
isActive / startDate / endDate / daysRunningWhether the ad is live, when it started and stopped (endDate is empty for active ads), days running100%
publisherPlatformsfacebook, instagram, messenger, audience_network, threads100%
displayFormatIMAGE, VIDEO, DCO, DPA, CAROUSEL, TEXT ...100%
bodyTextPrimary ad text99%
titleHeadline86%
linkDescription / captionLink description and display domain95%
ctaText / ctaTypeCall-to-action button ("Shop now", SHOP_NOW)99%
linkUrlLanding page URL (Facebook redirect removed)96%
imageUrlsImage URLs (original and resized)52%
videosVideo URLs: hdUrl, sdUrl, previewImageUrl48%
cardsCarousel / product cards with their own text, link and media45%
collationCount / collationIdNumber of versions of this ad Meta groups together72%
paidForBy"Paid for by" disclaimer - political & issue ads (92% of those)3%
spendText / spendMin / spendMax / currencySpend range - political & issue ads (96% of those)3%
impressionsText / impressionsMin / impressionsMaxImpressions range - political & issue ads (97% of those)3%
reachText / reachMin / reachMax / targetedOrReachedCountriesReach estimate and countries, where Meta publishes them3%
adCategories / containsAiGeneratedMedia / containsSensitiveContentSpecial ad category and Meta flags5%
searchInput / searchCountry / position / scrapedAtSearch that found the ad, rank and scrape time100%

Example record

{
"adArchiveId": "1016451784037642",
"adLibraryUrl": "https://www.facebook.com/ads/library/?id=1016451784037642",
"pageId": "15087023444",
"pageName": "Nike",
"pageUrl": "https://www.facebook.com/nike/",
"pageProfilePictureUrl": "https://scontent-dfw6-1.xx.fbcdn.net/v/t39.35426-6/509357337_4088170881445143_8138324132275675252_n.jpg?stp=dst-jpg_s60x60_tt6&_nc_cat=101&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=Kuq7oqYMn8UQ7kNvwEt7EB1&_nc_oc=AdqKKbmFf2rB54j7hE5t145lJaQMWk-MdxJYlyBAiJ2C01hJQJiLqyPAk_HIT_HU508&_nc_zt=14&_nc_ht=scontent-dfw6-1.xx&_nc_gid=Qp5ICQO_kRZC2cJIDq3MDA&_nc_ss=70289&oh=00_AQO0s2sTs0Z0IgygQLd-8Efzvu4HWoMU4BG4rYZQcDM3cg&oe=6AE6CBC2",
"pageLikeCount": 39494484,
"pageCategories": [
"Sportswear"
],
"isActive": true,
"startDate": "2025-06-20",
"endDate": null,
"daysRunning": 495,
"publisherPlatforms": [
"facebook",
"instagram"
],
"displayFormat": "DPA",
"bodyText": "Get the gear that goes hard on and off the field.",
"title": "Nike Air Monarch IV",
"linkUrl": "https://www.nike.com/us/en_us",
"linkDescription": null,
"caption": "NIKE.COM",
"ctaText": "Shop now",
"ctaType": "SHOP_NOW",
"imageUrls": [
"https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/509094198_1485897442775736_2519419118144931021_n.jpg?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=lEQxhxJZO8QQ7kNvwGRg0p0&_nc_oc=AdojLqgBDYXoi0s-jMTQlNuyjZuRmGqLELuYOlaXCFRyu3zsA-mTFj2UHHSmEE6rxkY&_nc_zt=14&_nc_ht=scontent-dfw5-1.xx&_nc_gid=Qp5ICQO_kRZC2cJIDq3MDA&_nc_ss=70289&oh=00_AQNgYPk5i3iONR1_WV9RW3p8P1gGYDWLPOjYrtjFVcA5wQ&oe=6AE6C835"
],
"videos": [],
"cards": [
{
"title": "Nike Air Monarch IV",
"body": "Get the gear that goes hard on and off the field.",
"linkUrl": "https://www.nike.com/t/air-monarch-iv-mens-workout-shoes-extra-wide-p8qNlT/416355-001?dplnk=member",
"linkDescription": null,
"caption": "nike.com",
"ctaText": "Shop Now",
"ctaType": "SHOP_NOW",
"imageUrl": "https://scontent-dfw5-1.xx.fbcdn.net/v/t39.35426-6/509094198_1485897442775736_2519419118144931021_n.jpg?_nc_cat=111&ccb=1-7&_nc_sid=c53f8f&_nc_ohc=lEQxhxJZO8QQ7kNvwGRg0p0&_nc_oc=AdojLqgBDYXoi0s-jMTQlNuyjZuRmGqLELuYOlaXCFRyu3zsA-mTFj2UHHSmEE6rxkY&_nc_zt=14&_nc_ht=scontent-dfw5-1.xx&_nc_gid=Qp5ICQO_kRZC2cJIDq3MDA&_nc_ss=70289&oh=00_AQNgYPk5i3iONR1_WV9RW3p8P1gGYDWLPOjYrtjFVcA5wQ&oe=6AE6C835",
"videoHdUrl": null,
"videoSdUrl": null,
"videoPreviewImageUrl": null
}
],
"extraTexts": [],
"extraLinks": [],
"collationCount": null,
"collationId": null,
"paidForBy": null,
"adCategories": [],
"containsAiGeneratedMedia": false,
"containsSensitiveContent": false,
"impressionsText": null,
"impressionsMin": null,
"impressionsMax": null,
"spendText": null,
"spendMin": null,
"spendMax": null,
"currency": null,
"reachText": null,
"reachMin": null,
"reachMax": null,
"targetedOrReachedCountries": [],
"brandedContentPartner": null,
"searchInput": "15087023444",
"searchCountry": "US",
"position": 1,
"scrapedAt": "2026-10-27T19:41:46.432Z"
}

Pricing

Pay per event, with no monthly rental:

  • $0.50 per 1,000 ads ($0.0005 per ad saved).
  • $0.002 per run start (per GB of memory; the default is 256 MB, so one start event).

Residential proxy traffic and compute are included. For example, 1,000 ads cost about $0.50. You only pay for unique ads, never for duplicates. To cap what a run can spend, set Maximum cost per run in the run options. The Actor stops cleanly when the cap is reached.

Reliability and tests

Before we published, we ran a final test matrix of 38 runs on the published build. 38 of 38 succeeded, with 2,551 ads saved. The runs covered:

  • keyword searches in 13 countries (US, GB, DE, FR, ES, NL, CH, BR, IN, AU, CA, JP, MX) and worldwide
  • country given as a name ("Germany") and as a lowercase code
  • exact phrase, sort by impressions, and active / inactive / all statuses
  • media types image, video and none, Facebook-only and Instagram-only, and language and date-range filters
  • political & issue (US, GB), housing, employment and financial categories
  • advertiser page IDs, page URLs, profile.php?id= URLs and bare usernames
  • keyword, page and single-ad Ad Library URLs, plus mixed inputs
  • runs with 512 MB memory, and a run capped by Maximum cost per run, which stopped at exactly the cap

Three of the runs were expected to come back empty: a nonsense keyword, an unknown page, and an EU political search. All three returned a clean NO_DATA status with an explanation.

  • Deep searches: 1,000 ads in 276 s and 500 ads in 133 s, each from a single search.
  • Rate limits: Meta rate-limited the proxy IP 31 times across 19 runs. Each time the Actor rotated to a fresh IP and continued from the same page. No ads were lost and no duplicates were saved.
  • Charging: charged ad events matched the saved ads exactly in every run (2,551 / 2,551).
  • Unit tests cover parsing of ads, Ad Library URLs, page references, spend / impression ranges and country names.

Limits and caveats

  • Meta rate-limits heavily. Datacenter IPs are always refused and some residential IPs are refused after a page or two. The Actor rotates IPs and continues from the same page. In our tests every rate limit was recovered from. If Meta tightens limits further, runs get slower before they fail, and OUTPUT reports any search that stopped early as PARTIAL.
  • Max results: the Ad Library returns 10 ads per page. A keyword search can be paged deep (we tested 1,000 ads in one search). Meta decides which ads match a keyword. Matching is loose by default, so use Exact phrase for strict matching.
  • Spend, impressions and reach are only published by Meta for political and issue ads. For ordinary commercial ads these fields are empty. This is a Meta limit, not a scraper limit.
  • No political ads in the EU: Meta stopped political and issue ads in the EU in October 2025, and the public Ad Library returns none for EU countries. Political searches work for the US, UK, Canada, Australia, India, Brazil and other non-EU countries. For an EU country, OUTPUT explains why a political search is empty.
  • Date range follows the Ad Library's own filter, which matches ads that were shown in the range, not only ads that started in it.
  • Special ad categories (political, housing, employment, financial) require a country. If you choose one with country ALL, the Actor uses US and says so in OUTPUT.
  • Dynamic product ads use templates like {{product.name}}. When a field is only a template, the Actor uses the first product card's text instead. Real product names and images are in cards.
  • Media URLs are Meta CDN links. They are signed and expire after a while, so download images and videos soon if you need to keep them.
  • Ad text stays in the language the advertiser used.

FAQ

Do I need a Facebook account, cookies or my own proxy? No. The Ad Library is public, the Actor does not log in, and residential proxies are included.

Can I run it on a schedule? Yes. Use Apify Schedules, for example daily for your competitors' page IDs, and send the results to Google Sheets, Slack, a webhook or your database with Apify integrations.

Can I call it as an API? Yes. Start the Actor through the Apify API, or use run-sync-get-dataset-items to get the ads back in a single HTTP call. AI agents can use it through the Apify MCP server.

Is scraping the Meta Ad Library legal? The Ad Library is a public transparency tool that Meta publishes so anyone can inspect ads. The Actor only collects what the Ad Library shows publicly, without logging in. You are responsible for how you use the data and for following applicable laws and Meta's terms.

Can AI agents use it (MCP)? Yes. Add the Apify MCP server to Claude, Cursor or any MCP client with https://mcp.apify.com?tools=atlasdata/facebook-ad-library-scraper-reliable and the Actor becomes a tool your agent can call.

How do I track a competitor's ads over time? Save your input (competitor names, domains or pages) as an Apify task and add a Schedule, for example weekly. Each run writes a new dataset, so you can compare runs or send new ads to Google Sheets, Slack or a webhook with Apify integrations.

Ad library scrapers (competitor ad tracking)

Job data scrapers

Search trends