How to use it: 3 steps
- Make a free Apify accountApify is the cloud platform where our tools run. The free plan gives you $5 of usage every month, no credit card needed. You pay Apify, not us.
- Paste your input and press StartNo code needed: you fill in a form (the input). It already has a working example. For example:
apifyin Search terms, domains or Ad Library links. Each start is one run. - Download the resultsWhen the run ends, the results are in a table (the dataset). Open Output, press Export and pick Excel or CSV. JSON and the API are there too.
This tool is an Apify Actor: a small program that runs on Apify. You can also run it on a schedule, for example every Monday. New to it? Read how it works, step by step and the 8 words you need first.
What it does
Facebook Ad Library Scraper collects ads from the public Meta Ad Library. Add keywords, website domains, advertiser pages or ad IDs, pick one or more countries, and get one row per ad: text, creative links, landing page with UTM tags, start date, days running, a 0–100 winner score, variant count and, for EU and political ads, reach and spend ranges.
- Who: page name, page ID, page link, likes and categories.
- What: ad text, headline, call-to-action, format (
IMAGE,VIDEO,CAROUSEL,DCO,DPA…), image and video links, detected language. - Where it leads: landing link without the Facebook redirect,
landingDomain, andutmSource,utmMedium,utmCampaign,utmContent,utmTerm. - How long and how strong:
startDate,endDate,daysRunning,variantCount(how many versions Facebook groups together) andwinnerScore(0–100). - Political and EU data: spend and impression ranges, "Paid for by" text, and with Add EU reach, demographics and payer details on: EU and UK reach, age, gender, locations, payer and beneficiary.
- Change tracking:
changeStatusneworseenand a list of ads that stopped since the last run.
Good for
- Find a competitor's long-running ads, the ones they keep paying for.
- Collect ad copy, hooks and calls-to-action for a keyword or a niche.
- Watch a list of advertisers every day and get only the new ads.
- Check political and issue ads: who paid, spend range and impressions.
- Compare 2–3 advertisers side by side with the advertiser summary.
Who uses it
Marketers
Find the long-running ads of a competitor.
Copywriters
Collect ad text and calls to action for a niche.
Researchers
Check who paid for political and issue ads.
Price
Pay per event: you pay for each result the tool saves, plus a small start fee for each run. The price includes Apify platform costs. Apify bills you, not us. Prices below are for the Apify free plan.
| What you pay for | Price | When |
|---|---|---|
| Start fee | $0.001 | Charged once per run. This tool uses 1 GB of memory or less by default; more memory costs more. |
| Ad | $0.0007 (from $0.00049 on paid Apify plans) | One unique ad saved to the Dataset. |
| Ad details | $0.0003 | EU/UK reach, targeting and payer details successfully added to one ad (only when Ad details is on). |
| Saved ad image | $0.001 | One ad image saved to the key-value store (only when Save ad images is on). |
| Search | $0.0003 | One search term, page or Ad Library URL that got an answer from Facebook, even when it has no ads. |
| Already seen ad checked | $0.00025 | One ad skipped because an earlier run already delivered it (only when Only new ads is on). |
Examples
- One result: about $0.0017.
- 1,000 results: about $0.70.
- Every day 100 results, for 30 days: about $2.13 a month.
Free to try: the Apify free plan gives you $5 of usage every month, no credit card needed. That is enough for about 7,100 results.
Prices checked on 8 November 2026. See the current price on Apify.
Questions
Do I need a Facebook account or token?
No. The tool reads the public Ad Library with no login.
Can I get ad spend for normal ads?
Only where Facebook shows it: political and issue ads, and some ads in the EU and UK.
Why are there fewer rows than Facebook shows?
Facebook counts every ad version. The tool returns one row per ad and counts the versions in variantCount.
How fresh is the data?
Each run reads the Ad Library at that moment. fetchedAt shows when each ad was read. daysRunning counts up to today for active ads.
Why is language empty for some ads?
The language is detected from the ad text. Very short texts give null.
Details
Step by step on Apify
- Open the Input tab. Search terms, domains or Ad Library links has
apifyin it (box 1). Replace it with your keyword, a domain such asnike.com, or leave it. - To list every ad of one advertiser, add the page link (for example
https://www.facebook.com/nike) in Advertiser pages or ad IDs instead. - Keep Countries at
USand Max ads per search at10(boxes 2 and 3), or choose your own. UseALLfor every country. - Start the run with the button at the bottom of the page.
- Open the Output tab. The Ads view (box 1) shows page, days running, winner score, variant count (box 2), ad text and landing domain. Export (box 3) downloads CSV, JSON or Excel.
Use cases
| Task | Input | You get | Key fields | Next step |
|---|---|---|---|---|
| Find winning ads in a niche | searchTerms, sortBy = winnerScore | ad | winnerScore, daysRunning, variantCount, body | Winner analysis view, export to CSV |
| Spy on a competitor | pageUrls, includeAdvertiserSummary | ad + advertiser summary | landingDomain, utmCampaign, ctaText, topAds | Compare 2–3 pages in one run |
| Daily new-ad alerts | pageUrls, onlyNew, schedule | new ad | changeStatus, firstSeenAt, adLibraryUrl | Slack or Notion delivery |
| Political ads and EU reach | adType = political_and_issue_ads, or includeAdDetails with an EU country | ad | paidForBy, spendText, euTotalReach, payers | EU reach & political view |
| Keep creatives | saveMedia | ad + image file | mediaKeys, mediaUrls | Download from the key-value store |
Tips for better results
- Start with 10 ads for one keyword. Then raise the limit.
- Turn on tracking and Only new ads, and run daily to see new ads only.
- Turn on Save ad images. Facebook image links expire after some days.
Limits and good to know
- Up to 3,000 ads per search (one entry in one country), 50 search terms, 50 pages and 10 countries per run, and at most 100 searches per run (entries × countries: 50 terms in 2 countries is the maximum). A bigger input fails at the start with
INVALID_INPUTand only the start event is charged. For more, split the job across runs - Each run makes at most 3,000 requests to Facebook. A search page holds about 10 ads, and Add ad details makes one more request per ad. Tested maximum: 3,000 ads without details in about 11 minutes, or 1,000 ads with details in about 10 minutes. With details on, keep the total of all searches under about 2,500 ads per run
- A run works at most 1 hour (or your run timeout, if shorter), then saves what it has as
PARTIAL - Saved images are limited to 8 MB each; a bigger image is skipped and not charged
- The run status is FAILED for invalid input, and for
ERROR(no ads because every search failed) orPARTIALafter a source failure. Rows already saved stay in the Dataset andRUN_SUMMARYnames the reason - The Actor shows only what the public Ad Library shows. Commercial ads outside the EU and UK have no spend, reach or targeting data. Facebook keeps stopped commercial ads for a limited time and political ads for 7 years
targetedCountriesis usually empty: the public guest view does not show it- Image and video links from Facebook expire after some days. Turn on Save ad images to storage to keep them
For developers
Sample result
One result from a real test run, in JSON. Real values change from run to run. In Excel or CSV each field is a column.
{
"adArchiveId": "1550534860016399",
"pageName": "Perfect themes",
"isActive": true,
"startDate": "2026-05-19",
"daysRunning": 166,
"platforms": ["facebook", "instagram", "audience_network", "messenger", "threads"],
"variantCount": 1,
"winnerScore": 75,
"ctaText": "Install now",
"landingDomain": "play.google.com",
"language": "eng",
"detailsStatus": "ok",
"euTotalReach": 53398,
"endDate": null
}Use it from code
Actor ID: cliqtomedia/facebook-ad-library. You need your Apify API token from Apify Console → Settings → API & Integrations.
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("cliqtomedia/facebook-ad-library").call(run_input={
"searchTerms": [
"apify"
],
"countries": [
"US"
]
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item)curl -X POST "https://api.apify.com/v2/acts/cliqtomedia~facebook-ad-library/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"searchTerms": ["apify"], "countries": ["US"]}'# pip install langchain-apify
# set APIFY_TOKEN in your environment
from langchain_apify import ApifyActorsTool
tool = ApifyActorsTool("cliqtomedia/facebook-ad-library")
result = tool.invoke({"run_input": {"searchTerms": ["apify"], "countries": ["US"]}})
print(result)The cURL call waits for the results, up to 300 seconds. For longer runs, start a run (/runs) and get the results with a webhook or by checking the run. Apify API docs. LlamaIndex, MCP for AI agents and the JavaScript client: AI agents & MCP.
Data fields (40)
| Field | Type | Meaning |
|---|---|---|
adArchiveId | string | Ad Library ID of the ad (ad_archive_id). |
adLibraryUrl | string | Public Ad Library link to this ad. |
pageId | string | Facebook page ID of the advertiser. |
pageName | string | Advertiser page name. |
pageUrl | string | Advertiser Facebook page link. |
pageLikeCount | integer | Page likes shown with the ad. |
pageCategories | array | Page categories, e.g. Clothing (Brand). |
isActive | boolean | true while the ad is running. |
startDate | string | First day the ad ran (YYYY-MM-DD). |
endDate | string | Last day the ad ran for stopped ads; null while active. |
daysRunning | integer | Days the ad has run, counting the start day; up to today for active ads. |
platforms | array | Where it runs: facebook, instagram, messenger, audience_network, threads, whatsapp. |
displayFormat | string | Creative format: IMAGE, VIDEO, CAROUSEL, MULTI_IMAGES, DCO (dynamic creative), DPA (catalog). |
body | string | Primary ad text. |
title | string | Headline. |
linkDescription | string | Link description under the headline. |
caption | string | Display link caption (often the domain). |
ctaText | string | Call-to-action button text, e.g. Shop now. |
ctaType | string | Call-to-action type, e.g. SHOP_NOW, LEARN_MORE. |
linkUrl | string | Landing page link (Facebook redirect removed). |
landingDomain | string | Domain of the landing page, without www. |
utmSource | string | utm_source of the landing link. |
utmMedium | string | utm_medium of the landing link. |
utmCampaign | string | utm_campaign of the landing link. |
utmContent | string | utm_content of the landing link. |
utmTerm | string | utm_term of the landing link. |
images | array | Image links (Facebook CDN; they expire after some days — use Save ad images to keep them). |
videos | array | Videos: hdUrl, sdUrl, previewImageUrl. |
cardsCount | integer | Number of carousel or dynamic cards. |
variantCount | integer | How many versions of this ad Facebook groups together (1 when only this one). |
collationId | string | Facebook group ID shared by the ad versions. |
spendText | string | Spend range as shown, e.g. €7K-€8K (political and EU ads). |
spendLower | number | Lower bound of spend. |
spendUpper | number | Upper bound of spend. |
currency | string | Currency of the spend range. |
impressionsText | string | Impressions range as shown, e.g. 10K-15K. |
impressionsLower | number | Lower bound of impressions. |
impressionsUpper | number | Upper bound of impressions. |
reachText | string | Estimated audience size text when shown. |
paidForBy | string | "Paid for by" line of political and issue ads. |
Input settings (18)
The main fields of the input form. With the API you send them as JSON.
| Setting | Name in the API | Type | Example value |
|---|---|---|---|
| Search terms, domains or Ad Library links | searchTerms | array | ["apify"] |
| Advertiser pages or ad IDs | pageUrls | array | |
| Countries | countries | array | ["US"] |
| Ad status | activeStatus | string | "active" |
| Ad category | adType | string | "all" |
| Media type | mediaType | string | "all" |
| Max ads per search | maxAds | integer | 10 |
| Sort results | sortBy | string | "source" |
| Add EU reach, demographics and payer details | includeAdDetails | boolean | false |
| Save ad images to storage | saveMedia | boolean | false |
| Track new and stopped ads | trackChanges | boolean | false |
| Only new ads | onlyNew | boolean | false |
| Tracking memory name | stateName | string | "facebook-ad-library-state" |
| Advertiser comparison summary | includeAdvertiserSummary | boolean | false |
| Row format | outputFormat | string | "flat" |
| Proxy for search pages, details and images | proxyConfiguration | object | {"useApifyProxy": true} |
| Send results to (optional) | deliveryConnector | string | |
| Notion page or channel (optional) | deliveryTarget | string |
Use cases with this tool
Each guide shows all the steps and the other tools.