Facebook Ads Library Scraper: Ads by Keyword or Page avatar

Facebook Ads Library Scraper: Ads by Keyword or Page

Pricing

from $0.35 / 1,000 results

Go to Apify Store
Facebook Ads Library Scraper: Ads by Keyword or Page

Facebook Ads Library Scraper: Ads by Keyword or Page

Facebook ads library scraper for public ads from the Meta Ad Library by keyword, advertiser Page ID or link, in any country, active or inactive: ad text, headline, landing page, images, videos, dates, platforms, and 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

3

Total users

1

Monthly active users

3 days ago

Last modified

Features

Limited permissions

Share

Facebook ads library scraper for public ads from the Meta Ad Library by keyword, advertiser Page ID or link, in any country, active or inactive: ad text, headline, landing page, images, videos, dates, platforms, and spend and reach ranges where Meta publishes them. Not affiliated with Meta.

Who uses it

  • Marketers and agencies: every active ad of a competitor's Page, with its text, headline, button and landing page, to see what they sell and how.
  • Creative teams: ads for a keyword in a country with their images, videos and format, as a swipe file.
  • Analysts: start and end dates show which ads a brand keeps running, and which it dropped.
  • Researchers of political and issue ads: spend and reach ranges and the Paid for by label, where Meta publishes them.
  • Agents and automations: one call per brand or keyword returns rows, not pages.

What a run costs

At $0.55 per 1,000 ads, the price for an Apify account without a discount; on Apify's paid plans each one costs less (see the Pricing tab). On top of that, $0.0025 per run start from 29 November 2026.

You ask forAdsCost
The active ads of one brand: 100 ads100$0.06
Ten competitors, 100 ads each, in one run1,000$0.55
A market study over a keyword list: 10,000 ads10,000$5.50
  • Pay per result row plus $0.0025 per run start from 29 November 2026: 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 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. New colors in every size 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, housing, employment, credit. Default: "all".
mediaTypeselectnoOnly ads that contain this kind of media. Allowed: all, image, video, meme, none, image_and_meme. 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 goes through Apify residential proxy from the start, the network this site answers. Pick proxy groups here only to force another network.

Field names from other tools work too: query is read as searchTerms, startUrls as adLibraryUrls and limit as maxItems. Select values match in any letter case or spelling.

Example input:

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

Pricing

You pay per result row in the dataset plus $0.0025 per run start from 29 November 2026 (the current prices are 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.
  • Reading more than the first 30 ads of a search means loading the full Ad Library page once more, which costs far more than the first page. On a paid Apify plan a run loads it only when the ads it can still bring pay for it, and opens a further search only while the ads found so far pay for the pages already loaded. When it stops for that, the run ends normally with its results and its status message says so.
  • 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 the developer a short usage record: the number of results, success or the kind of error, paid plan or not, how it was started and a hashed account code, so repeat runs count once. Nothing from your input or results is sent.

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."
  • "Find 50 ads in Germany for the keyword running shoes that started in the last 30 days."
  • "Which ads of these three advertiser Page IDs are no longer active, and how long did each run?"

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, plus $0.0025 per run start from 29 November 2026 (Apify counts one start for each GB of run memory, at least one), at the prices on the Pricing tab for your Apify plan. The platform usage of the run is included in those prices. 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.