Facebook Ad Library Scraper | $0.50 per 1,000 ads avatar

Facebook Ad Library Scraper | $0.50 per 1,000 ads

Pricing

from $0.35 / 1,000 results

Go to Apify Store
Facebook Ad Library Scraper | $0.50 per 1,000 ads

Facebook Ad Library Scraper | $0.50 per 1,000 ads

Collect public ads from the Meta Ad Library by keyword, advertiser Page ID or Ad Library link: ad text, headline, landing page, button, images and videos, dates, platforms and version count, plus spend and reach ranges where Meta publishes them. Not affiliated with Meta.

Pricing

from $0.35 / 1,000 results

Rating

0.0

(0)

Developer

vøiddo

vøiddo

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 hours ago

Last modified

Share

Collect public ads from the Meta Ad Library by keyword, advertiser Page ID or Ad Library link: ad text, headline, landing page, button, images and videos, dates, platforms and version count, plus spend and reach ranges where Meta publishes them. Not affiliated with Meta.

  • Pay per result row: the platform usage of the run is included, and a run that finds nothing has no result charges.
  • No login, no cookies, no account on the Meta Ad Library: public pages only.
  • Export to JSON, CSV, Excel, XML or HTML, or read the rows through the Apify API.
  • Start it from the Console, on a schedule, through the API, or as a tool for agents over MCP.
  • Tested every day on its example input, with the rows checked, and repaired when a check fails.

What you can use it for

  • Competitor ad research: every active ad of a brand's Page, with text, headline, button and landing page.
  • Creative inspiration: collect ads for a keyword with their images, videos and format.
  • Ad longevity: start and end dates show which ads a brand keeps running, a sign that they work.
  • Agency reporting: snapshot the ads of a client's rivals on a schedule.

What you get

Every result is one row in the run's dataset. Download it as JSON, CSV, Excel or HTML, or read it through the Apify API. The main fields:

FieldMeaning
adArchiveIdAd ID
pageNameAdvertiser
isActiveActive
startDateStarted
endDateEnded
platformsPlatforms
bodyAd text
titleHeadline
ctaTextButton
linkUrlLanding page
displayFormatFormat
imageUrlsImages
adLibraryUrlAd Library link

Example row:

{
"adArchiveId": "1000000000000001",
"adLibraryUrl": "https://www.facebook.com/ads/library/?id=1000000000000001",
"pageId": "100000000000001",
"pageName": "Example Outdoor Supply",
"pageProfileUrl": "https://www.facebook.com/exampleoutdoorsupply/",
"pageCategories": [
"Sporting Goods Store"
],
"pageLikeCount": 125000,
"isActive": true,
"startDate": "2026-09-14",
"endDate": null,
"platforms": [
"facebook",
"instagram"
],
"body": "Trail season is here. Free shipping on every order this week.",
"title": "Shop the trail collection",
"linkUrl": "https://www.example.com/trail",
"linkDescription": "Boots, packs and layers",
"ctaText": "Shop now",
"displayFormat": "IMAGE",
"imageUrls": [
"https://scontent.example.net/v/t39/trail-1.jpg"
],
"videoUrls": [],
"collationCount": 3,
"collationId": "2000000000000001",
"currency": null,
"impressionsText": null,
"impressionsLower": null,
"impressionsUpper": null,
"spendLower": null,
"spendUpper": null,
"reachEstimate": null,
"disclaimer": null,
"targetedCountries": [],
"demographics": [],
"searchedFor": "example outdoor",
"searchCountry": "US"
}

How to use it

  1. Open the Input tab (or call the actor through the API, see below).
  2. Fill in Search terms, Country, Ad status; the form opens with a working example.
  3. Set Maximum results to cap the size and the cost of the run.
  4. Click Start. Rows appear on the Output tab while the run works.
  5. Download the dataset, or connect it to Google Sheets, Make, Zapier, n8n or a webhook.

Input

FieldTypeRequiredDescription
searchTermsarraynoWords to search the Ad Library for, for example a brand or product name. One per line. Each term is one search; a run reads at most 25 searches (terms, Page IDs and links together).
pageIdsarraynoNumeric Facebook Page IDs of advertisers whose ads you want, one per line. Each ID is one search. The ID is the number after view_all_page_id= in an Ad Library link of that advertiser.
adLibraryUrlsarraynoOptional search links copied from the browser, such as https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&q=nike&search_type=keyword_unordered. A link keeps its own filters. Only Ad Library search links work. Each link is one search.
countrystringnoWhere the ads were shown: a two-letter country code such as US, GB or DE, or ALL for every country. Used for search terms and Page IDs. Default: "US".
activeStatusselectnoWhich ads to return: ads that are running now, ads that stopped, or both. Allowed: active, inactive, all. Default: "active".
adTypeselectnoAd category in the Ad Library. Political and issue ads come with spend and impressions ranges. Allowed: all, political_and_issue_ads, housing_ads, employment_ads, credit_ads. Default: "all".
mediaTypeselectnoOnly ads that contain this kind of media. Allowed: all, image, video, meme, none. Default: "all".
startDateMinstringnoOptional. Only ads that started running on or after this date, as YYYY-MM-DD.
startDateMaxstringnoOptional. Only ads that started running on or before this date, as YYYY-MM-DD.
maxAdsPerSearchintegernoThe most ads to read for each search term, Page ID or link. The Ad Library shows about 30 ads first and about 10 more each time the page loads more. At most 1000. Default: 100.
maxItemsintegernoThe run stops after this many result rows. It also caps what one run can cost. Default: 100.
proxyConfigurationobjectnoLeave as is: the run starts on the cheapest network the site accepts and switches to Apify Proxy automatically when the site blocks it. Pick proxy groups here only to force one specific network.

Example input:

{
"searchTerms": [
"nike"
],
"country": "US",
"activeStatus": "active",
"maxItems": 20
}

Pricing

You pay per result row in the dataset (the current price per 1,000 results is on the Pricing tab). A run that finds nothing produces no rows and no result charges. Set Maximum results to cap what a single run can cost.

Limits and notes

  • Reads the public Meta Ad Library only (facebook.com/ads/library). It opens the Ad Library page in a real browser, as a visitor who is not logged in, and scrolls down so the page loads more ads. No login and no account cookies are used.
  • If Meta shows a login, verification or CAPTCHA page instead of the Ad Library, the run stops and says so; it never tries to get around that.
  • Not affiliated with Meta. The data is what the public Ad Library shows to a visitor who is not logged in.
  • The Ad Library shows about 30 ads first and about 10 more each time the page is scrolled, so large searches take a few minutes. Each search term, Page ID or link is read up to Ads per search (at most 1000), and a run reads at most 25 searches. Ads that appear in several searches are returned once.
  • Version count (collationCount) is how many copies of the same ad Meta groups together. The end date is empty for ads that still run.
  • Spend, impressions and reach ranges, the country list and audience splits are filled only for ads where the Ad Library publishes them (political and issue ads, and some ads shown in the EU). For all other ads they are empty.
  • Dynamic catalog ads can show placeholders such as {{product.name}} where Meta fills in a product at delivery time.
  • The Paid for by disclaimer is the label Meta prints on political and issue ads. It can name the payer.
  • Image and video links are temporary Meta CDN links. The actor does not download the files; download them soon if you need them.
  • Ad text is returned as the advertiser wrote it, with e-mail addresses and phone numbers removed. Apart from the advertiser (Page) name and the Paid for by label, no names are published as fields. Nothing about the people who saw or reacted to an ad is collected.
  • Some ad categories (housing, employment, credit) exist only for certain countries; other countries return nothing for them.
  • Only publicly visible data is collected. No login, no paywalled content, no personal contact details.
  • Sites change their pages from time to time. The actor is checked automatically and repaired when a check fails.
  • Each run sends one short usage record to the developer: the Actor and run IDs, the number of results, whether the run succeeded (and if not, the kind of error, such as "blocked" or "input problem"), whether the account is on a paid Apify plan, how the run was started (for example from the Console, the API or a schedule) and a one-way fingerprint of the account (a hash, not the account ID), so that repeat runs of one account count once. It contains nothing from your input or results.

Run it through the API

Python, with the apify-client package:

from apify_client import ApifyClient
client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("v0iddo/facebook-ads-library-scraper").call(run_input={"searchTerms": ["nike"], "country": "US", "activeStatus": "active", "maxItems": 20})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)

JavaScript, with the apify-client package:

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('v0iddo/facebook-ads-library-scraper').call({"searchTerms": ["nike"], "country": "US", "activeStatus": "active", "maxItems": 20});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

One HTTP call that waits for the run and returns the rows (for runs that finish within 5 minutes):

curl -X POST "https://api.apify.com/v2/acts/v0iddo~facebook-ads-library-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"searchTerms": ["nike"], "country": "US", "activeStatus": "active", "maxItems": 20}'

Use it from an agent (MCP)

Claude, Cursor, VS Code and other MCP clients can call this actor as a tool through the Apify MCP server. Add it to the client's MCP configuration:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=v0iddo/facebook-ads-library-scraper",
"headers": {
"Authorization": "Bearer <YOUR_APIFY_TOKEN>"
}
}
}
}

Then ask, for example: "Show the active ads of this brand in the Meta Ad Library with their text and landing pages."

FAQ

Do I need an account on the Meta Ad Library, cookies or an API key?

No. The actor reads only what every visitor of the Meta Ad Library can see, without logging in. You only need an Apify account to start it.

How many results can one run return?

Up to 5,000 rows per run. Without a limit it stops at 100. Set Maximum results to the number you need; large jobs can also be split into several runs or scheduled.

How am I charged?

Per result row in the dataset, at the price on the Pricing tab for your Apify plan. The platform usage of the run is included in that price. A run that finds nothing produces no rows and no result charges, and your spending limit for a run is always respected.

Why did my run return no results?

The status message of the run says why: nothing matched the input, the input was not a page the actor understands, or the site refused every network the actor tried. Check the input against the example above and run it again with a small limit.

Can I run it on a schedule?

Yes. Save your input as a task and add a schedule in the Apify Console (daily, hourly or with a cron expression). Each run gets its own dataset, so you keep a history.

Which formats can I export?

JSON, CSV, Excel, XML, HTML table and RSS from the Output tab or the API. Integrations send the rows to Google Sheets, Slack, Make, Zapier, n8n or a webhook.

Is collecting this data allowed?

The actor collects only what the Meta Ad Library publishes to every visitor, without a login. Public data can still be personal data under laws such as the GDPR, and sites have their own terms: make sure your use of the data follows the rules that apply to you.

What happens when the Meta Ad Library changes its pages?

Automated tests run the actor every day on the example input and check the rows, not only that the run finished. When a check fails, the actor is repaired and rebuilt; the build history on this page shows each update.

Something is missing or wrong. Where do I report it?

Open an issue on the Issues tab of this actor with the run link. Requests for a new field are welcome too.