# LinkedIn Ad Library Scraper ($0.89/1K): Competitor Ads (`tsutseisoftware/linkedin-ad-library-scraper`) Actor

Scrape the LinkedIn Ad Library: every ad of a company, keyword or payer with full text, images, video, call to action, landing page, dates, impressions by country and targeting. Monitor new and stopped B2B ads with Slack, Discord, Telegram alerts. Unofficial.

- **URL**: https://apify.com/tsutseisoftware/linkedin-ad-library-scraper.md
- **Developed by:** [Tsutsei Software](https://apify.com/tsutseisoftware) (community)
- **Categories:** Social media, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 85.7% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.39 / 1,000 ads

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## LinkedIn Ad Library Scraper: Competitor B2B Ads and New Ad Alerts

Scrape the **LinkedIn Ad Library** without logging in and see your **competitor ads** on LinkedIn: every ad of a **company** (its exact company page or every advertiser with the name), ads that mention a **keyword**, ads **paid for by** an agency, or any Ad Library link or ad ID. Get the format, the **full ad text, headline, every button, landing page with its domain and UTM parameters, images, video, carousel cards, document and event details**, and where LinkedIn publishes them **who paid, the days the ad ran, whether it is still running, impressions with all their countries and the targeting** (locations, languages, audiences, job, company). Add the **advertiser's industry, size, website and headquarters** if you need leads. Watch competitors on a schedule: only **new ads**, ads that **stopped** and ads that **ran again**, with alerts in Slack, Discord, Telegram, WhatsApp or a webhook. Works as a LinkedIn Ad Library API: export to Excel, CSV or JSON, or call it from your code.

This actor is not affiliated with LinkedIn.

### Why use this scraper?

- **The right company:** a company name is matched to the LinkedIn company page with exactly that name, so "Siemens" does not mix in Siemens Healthineers or Siemens EDA (or switch to every advertiser with the name, like the website does). Company pages, company IDs and the same company given twice are handled.
- **Every way in:** companies, keywords, payers ("Paid for by"), any Ad Library search link, ad links or bare ad IDs, and **searches with their own filters** in one run (one entry per client or market).
- **Full ad details by default:** the whole text, headline, all buttons (message ads have several), landing page, domain and UTM parameters, all images, the video file, carousel cards (also without links), documents (title, pages, preview pages), events (time, place), who paid, first and last day, running or not, impressions (range) with the share of every country and the targeting LinkedIn shows, with flat columns (`targetingLocations`, `targetingLanguages`, `targetedParameters`, `topCountry`, `shownInEu`).
- **Filters:** countries and country groups (EU, EEA, DACH, Nordics, Benelux and more), date range or exact dates, ad format, impressions (one end is enough), targeting used or excluded, keyword within the ads, newest or oldest first. LinkedIn drops the country filter when impressions or targeting filters are set; this actor then checks each ad's page (impressions by country, or the targeted locations while LinkedIn has no country data yet) and leaves out ads shown or targeted elsewhere, not charged. Ads it cannot check are kept and marked `countryUnverified`.
- **Advertiser details (optional):** industry, company size, employees on LinkedIn, followers, website, headquarters, founding year, type, specialties and description, read once per company.
- **Share of voice:** "Only count the ads" saves one row per search with LinkedIn's number of ads, for competitors, countries or months.
- **Competitor monitoring:** a scheduled run saves only ads that started since the previous run, plus ads that stopped and ads that ran again, and sends them to Slack, Discord, Telegram, WhatsApp or your webhook.
- **Free run summary:** ads per search with LinkedIn's count, formats, top advertisers, payers, countries, calls to action, landing domains and industries, and which ads several searches found (`matches`).
- **Cheap, no extra costs:** $0.89 per 1 000 ads (Gold $0.39), with full details $1.09 (Gold $0.59), proxy included, no extra platform costs, no result cap on the free plan.
- **Privacy by default, names when you need them:** ads posted by members' own profiles are saved without the member's name, photo or profile, and message ads without the sender's name and signature, unless you turn on **Member names (personal data)**: then you get the member (name, headline, profile, photo), the member behind a thought leader ad and the sender of a message ad with the text as written.

### What data can you get?

| Field | Example |
|---|---|
| `advertiserName`, `advertiserType`, `advertiserCompanyId`, `advertiserUrl`, `advertiserLogoUrl` | `Microsoft`, `company`, `1035`, `https://www.linkedin.com/company/1035` |
| `memberName`, `memberHeadline`, `memberProfileUrl`, `memberPhotoUrl`, `senderName`, `senderPhotoUrl` (only with **Member names (personal data)**) | `Emile Cottard`, `→ Expert LinkedIn Ads…`, `https://www.linkedin.com/in/emilecottard`; `George Adams` for a message ad |
| `format`, `formatLabel`, `isThoughtLeaderAd` | `image`, `Single Image Ad`, `false` |
| `adText`, `headline`, `callToAction`, `ctas` | full text, `Big plans for your business? Meet Surface Laptop Ultra`, `Learn more`, every button with its type (`null` when LinkedIn shows no link or hint) |
| `landingUrl`, `landingDomain`, `utmParameters` | `https://info.microsoft.com/…`, `info.microsoft.com`, `{"utm_source": "linkedin"}` |
| `imageUrl`, `imageUrls`, `videoUrl`, `carouselCards` | images, the MP4 of a video ad, cards with title, link and image |
| `documentTitle`, `documentPageCount`, `documentPreviewUrls`, `documentUrl` | `Strengthen Resilience with NIS2`, `47`, preview pages |
| `eventName`, `eventTime`, `eventStart`, `eventEnd`, `eventLocation`, `eventUrl` | `2026-11-19T10:30:00Z`, `Online` |
| `paidBy` | `ZENITH UK (MEDIA) LIMITED` |
| `firstShown`, `lastShown`, `daysRunning`, `lastShownDaysAgo`, `isActive`, `adStatus` | `2026-11-10`, `2026-11-13`, `4`, `4`, `false`, `inactive` |
| `impressions`, `impressionsMin`, `impressionsMax` | `30k-50k`, `30000`, `50000` |
| `impressionsByCountry`, `topCountry`, `shownInEu`, `countryUnverified` | `[{"country": "Germany", "countryCode": "DE", "share": 29.0}]`, `CH`, `true`, `false` |
| `targeting`, `targetedParameters`, `excludedParameters` | per parameter what was targeted or excluded, `["language", "location", "job"]`, `["company"]` |
| `targetingLocations`, `targetingLocationsExcluded`, `targetingLanguages` | `["DACH"]`, `["Germany", "France"]`, `["English"]` |
| `advertiserIndustry`, `advertiserSize`, `advertiserEmployeeCount`, `advertiserFollowers`, `advertiserWebsite`, `advertiserHeadquarters`, `advertiserCountry`, `advertiserFounded`, `advertiserCompanyType`, `advertiserSpecialties`, `advertiserDescription`, `advertiserPageUrl` | with **Advertiser details**: `Software Development`, `10,001+ employees`, `Redmond, Washington`, `US` |
| `matches` | every search of the run that found the ad: `["HubSpot", "CRM"]` |
| `rowType`, `adCount` | `searchCount` rows of **Only count the ads**: `1648` |
| `changeType`, `firstSeenAt` | monitoring: `new`, `stopped`, `restarted` |

Every row has `id` (the ad's ID; in rows of **Only count the ads** a stable ID of the search, `search-…`), `source`, `url` (the ad in the Ad Library), `searchTarget`, `targetType`, `detailsRead` and `scrapedAt`; unknown values are `null`, empty lists `[]`, dates ISO 8601. Extra export formats: a printable HTML report or a Markdown table, besides Excel, CSV and JSON.

### How to use it

1. Enter one or more **Companies** (a name, a LinkedIn company page or a company ID), **Keywords in the ad**, **Paid for by** names or **LinkedIn Ad Library links or ad IDs**, or **Searches with their own filters**.
2. Optionally pick countries or country groups, a date range, ad formats, impressions or targeting.
3. Set **Max ads in total** and run. For competitor monitoring, turn on **Monitoring: only new ads**, add a notification channel and schedule the task daily.

### Use cases

#### All ads of a competitor with full details

```json
{
  "companies": ["HubSpot"],
  "maxItems": 200
}
```

#### A competitor's video ads in the DACH countries in the last 30 days

```json
{
  "companies": ["https://www.linkedin.com/company/salesforce"],
  "countries": ["DACH"],
  "dateRange": "last30Days",
  "adFormats": ["video"]
}
```

#### Ads about a topic from any advertiser shown in Germany, with at least 10 000 impressions

```json
{
  "keywords": ["AI agents"],
  "countries": ["DE"],
  "impressionsMin": 10000,
  "maxItems": 100
}
```

#### Share of voice: how many ads three competitors run in the EU

```json
{
  "companies": ["HubSpot", "Salesforce", "Pipedrive"],
  "countries": ["EU"],
  "dateRange": "last30Days",
  "countOnly": true
}
```

#### Advertisers behind a topic, with their industry, size and website (lead generation)

```json
{
  "keywords": ["CRM"],
  "countries": ["DE"],
  "includeAdvertiserDetails": true,
  "maxItems": 100
}
```

#### One run for several clients, each with its own filters

```json
{
  "searches": [
    {"company": "HubSpot", "countries": ["UKI"], "dateRange": "last30Days"},
    {"company": "Pipedrive", "countries": ["DACH"], "adFormats": ["video", "document"]},
    {"keyword": "revenue operations", "impressionsMin": 10000, "maxAds": 50}
  ],
  "maxItems": 300
}
```

#### Daily alert on new and stopped ads of three competitors, to Slack

```json
{
  "companies": ["HubSpot", "Salesforce", "Pipedrive"],
  "onlyNewAds": true,
  "monitoringKey": "crm-competitors",
  "slackWebhookUrl": "https://hooks.slack.com/services/..."
}
```

### Input details

#### Companies, keywords, payers, links and searches

- **Companies:** a name (`HubSpot`), a company page (`linkedin.com/company/hubspot` or `linkedin.com/company/68529`) or a company ID (`68529`). With **Company match** "Exactly this company page" (default) a name is matched to the company page with exactly that name; the log says which page was used. When there is none, every advertiser with the name is searched and the log says so. "Every advertiser whose name contains it" searches like the website. The same company given as a name and as an ID is read once.
- **Keywords in the ad:** each line is LinkedIn's keyword search over the ads of all advertisers.
- **Paid for by:** each line is a search of the payer name LinkedIn shows (EU ads).
- **LinkedIn Ad Library links or ad IDs:** a search link (its own filters are kept), an ad link or just an ad's ID. A company page link here works like a line of **Companies**.
- **Searches with their own filters:** a list of searches, each with one of `company`, `keyword`, `payer` or `url` and any of `countries`, `dateRange`, `startDate`, `endDate`, `impressionsMin`, `impressionsMax`, `targetingIncludes`, `targetingExcludes`, `adFormats`, `keywordFilter`, `sortOrder` and `maxAds`. What an entry leaves out comes from the filters of the input.
- **Keyword within the ads:** narrows every company and payer search with LinkedIn's keyword search.

#### Filters

- **Countries:** ISO codes (`DE`), names (`Germany`, `Slovakia`) or groups: `EU`, `EEA`, `DACH`, `NORDICS`, `BENELUX`, `BALTICS`, `CEE`, `UKI`, `NORTH_AMERICA`, `LATAM`, `ANZ`, `GCC`.
- **Date range:** presets or **Ran from** / **Ran until** (`2026-10-01` or `3 months`); "Custom" needs at least one of the dates.
- **Impressions:** a minimum, a maximum or both.
- **Targeting uses / excludes**, **Ad formats**, **Sort by**.

#### Limits, details and counts

LinkedIn lists the newest ads first (or the oldest with **Sort by**). **Max ads in total** (default 100) and **Max ads per search** keep runs small; the status shows how many ads LinkedIn counts for each search. **Ad details** (on by default) reads each ad's page. **Advertiser details** (off by default) adds the advertiser's company page; with a maximum cost per run the ads come first, and a company is added only when its charge fits in the limit. **Only count the ads** saves one row per search with LinkedIn's count and reads no ads.

#### Monitoring and alerts

- **Only new ads:** each run reads the ads that ran since the previous run with the same **Monitoring: key** and saves the ads that started since then (`changeType: "new"`). The first run takes the ads that ran in the last 30 days as the baseline and saves them. LinkedIn's search covers days up to yesterday, so an ad that starts today usually comes in the next day's run.
- **Report stopped ads** (on by default): ads that were running at the previous run and have not run for 3 days are saved as `stopped`; a stopped ad that runs again is saved as `restarted`. This needs all ads that ran since the previous run to fit in the limits; otherwise the status says so.
- **Notifications** to Slack, Discord, Telegram, WhatsApp or any webhook after the run.

### How much does it cost to scrape the LinkedIn Ad Library?

Pay per event (the **Pricing** tab always shows the current prices):

| Event | Price | When |
|---|---|---|
| Ad | $0.89 / 1 000 (Bronze $0.69, Silver $0.49, Gold and up $0.39) | every saved ad (or search count) |
| Ad details | + $0.20 / 1 000 | with **Ad details** (on by default), only ads whose page was read |
| Advertiser details | $0.004 per company | with **Advertiser details** (off by default), once per company and run, only when its page was found |
| Actor start | $0.003 | once per run |
| Monitoring check | $0.50 / 1 000 | monitoring: each page of 24 ads read |
| Extra page | $0.50 / 1 000 | a page read that saved nothing (no ads with the filters, all of other formats or countries), or a run that would cost more than it charged |
| Notification | $0.001 | once per run that sent its notification |

Examples: 1 000 ads with full details cost **$1.09** (Gold $0.59), without details **$0.89** (Gold $0.39). Counting the ads of 10 searches costs about $0.012. A daily monitoring run of one competitor without new ads costs about $0.003 plus $0.0005 per 24 running ads it checks. The proxy and the platform (compute, traffic) are included. You can set a maximum cost per run; the actor stops when it is reached and saves only what the limit covers.

### Input example

```json
{
  "companies": ["HubSpot", "68529", "https://www.linkedin.com/company/microsoft"],
  "keywords": ["CRM"],
  "countries": ["US", "GB"],
  "dateRange": "custom",
  "startDate": "3 months",
  "adFormats": ["image", "video", "carousel"],
  "maxItems": 300,
  "maxAdsPerSearch": 100,
  "includeAdDetails": true
}
```

### Output example

```json
{
  "id": "1638193504",
  "source": "linkedin-ad-library",
  "url": "https://www.linkedin.com/ad-library/detail/1638193504",
  "format": "image",
  "formatLabel": "Single Image Ad",
  "advertiserName": "Microsoft",
  "advertiserType": "company",
  "advertiserCompanyId": "1035",
  "advertiserUrl": "https://www.linkedin.com/company/1035",
  "isThoughtLeaderAd": false,
  "paidBy": "ZENITH UK (MEDIA) LIMITED",
  "adText": "You know where you want to take your business. Get to know Surface Laptop Ultra and see how it fits into your plans.",
  "headline": "Big plans for your business? Meet Surface Laptop Ultra",
  "callToAction": "Learn more",
  "ctas": [{"text": "Learn more", "type": "landingPage", "url": "https://info.microsoft.com/ww-landing-surface-contact-me.html?wt.mc_id=3084764_QSG_PD_SCL_675487"}],
  "landingUrl": "https://info.microsoft.com/ww-landing-surface-contact-me.html?wt.mc_id=3084764_QSG_PD_SCL_675487",
  "landingDomain": "info.microsoft.com",
  "utmParameters": {},
  "imageUrl": "https://media.licdn.com/dms/image/v2/D4E10AQE-jLp0uidkKA/image-shrink_1280/...",
  "firstShown": "2026-11-10",
  "lastShown": "2026-11-13",
  "daysRunning": 4,
  "lastShownDaysAgo": 4,
  "isActive": false,
  "adStatus": "inactive",
  "impressions": "30k-50k",
  "impressionsMin": 30000,
  "impressionsMax": 50000,
  "impressionsByCountry": [
    {"country": "Switzerland", "countryCode": "CH", "share": 43.0, "shareText": "43%"},
    {"country": "Germany", "countryCode": "DE", "share": 29.0, "shareText": "29%"},
    {"country": "Austria", "countryCode": "AT", "share": 28.0, "shareText": "28%"},
    {"country": "South Africa", "countryCode": "ZA", "share": 0.0, "shareText": "<1%"},
    {"country": "Belgium", "countryCode": "BE", "share": 0.0, "shareText": "<1%"},
    {"country": "Netherlands", "countryCode": "NL", "share": 0.0, "shareText": "<1%"}
  ],
  "topCountry": "CH",
  "shownInEu": true,
  "targetedParameters": ["language", "location", "job"],
  "excludedParameters": ["audience", "company"],
  "targetingLanguages": ["English"],
  "targetingLocations": ["DACH"],
  "advertiserIndustry": "Software Development",
  "advertiserSize": "10,001+ employees",
  "advertiserWebsite": "https://news.microsoft.com/",
  "advertiserHeadquarters": "Redmond, Washington",
  "detailsRead": true,
  "rowType": "ad",
  "searchTarget": "Microsoft",
  "targetType": "company",
  "matches": ["Microsoft"],
  "changeType": null,
  "scrapedAt": "2026-11-17T12:00:00Z"
}
```

### Limitations

- **Dates, impressions, payer and targeting** are published by LinkedIn for ads shown in the EU (Digital Services Act) and some other places. For other ads (often US-only ones) these fields stay empty, and so does the landing page when LinkedIn shows only a button.
- **Countries with impressions or targeting filters:** LinkedIn ignores the country filter when an impressions or targeting filter is set. With **Ad details** the actor checks each ad's page and leaves out ads shown only elsewhere (not charged). LinkedIn adds the impressions by country only within 48 hours of an ad's start; until then the targeted locations decide (an ad targeting only Poland is left out of a search for Germany). An ad with neither, or targeting only places the actor cannot tell (a city, "EMEA"), is kept with `countryUnverified: true` and the status counts them. When most ads LinkedIn returns are from other countries, the run stops early rather than read pages nobody pays for, and the status says so: narrow the search (a company, a keyword) or leave out the impressions or targeting filter. With **Ad details** off they cannot be checked and the status says so; **Only count the ads** then counts ads from all countries.
- **Keywords:** LinkedIn's keyword search can also match words that are not in the visible text of an ad (another version of the ad, the image).
- **Dates:** LinkedIn searches dates within the last year, up to yesterday.
- **Impressions** are ranges ("30k-50k"), and the share per country is rounded to whole percent ("less than 1%" is `share` 0 with `shareText` "<1%").
- **Advertiser details** come from the company's public LinkedIn page; for some companies (renamed pages, pages LinkedIn shows only to members) the page is not found, and those are not charged.
- **Monitoring of very big advertisers:** an advertiser with thousands of running ads costs a monitoring check per 24 ads; narrow it with countries or formats if needed.
- **`matches`:** an ad that a later search of the run finds again after it was saved is listed in `SUMMARY` (`adsFoundAgain`).
- **Refusals:** when LinkedIn refuses a request, the actor asks again; it never solves CAPTCHAs. Ads whose page could not be read are saved with what the list showed and the details are not charged; the status says how many.

### For AI agents and API users

Minimal input: `{"companies": ["HubSpot"], "maxItems": 20}` (about $0.025 with full details). Each row is flat at the top level with a stable `id`; billing is per saved row (plus the add-ons in the pricing table), so `maxItems` caps the cost. `SUMMARY` in the run's key-value store has the ads per search with LinkedIn's count, the formats, the top advertisers, payers, countries, calls to action, landing domains and industries, the companies matched to names, the ads found by several searches and the new, stopped and restarted counts.

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("tsutseisoftware/linkedin-ad-library-scraper").call(
    run_input={"companies": ["HubSpot"], "countries": ["EU"], "maxItems": 50})
for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(ad["advertiserName"], ad["headline"], ad["landingUrl"], ad["impressions"])
```

cURL (runs the actor and returns the ads as JSON):

```bash
curl -X POST "https://api.apify.com/v2/acts/tsutseisoftware~linkedin-ad-library-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"companies": ["HubSpot"], "maxItems": 20}'
```

### Troubleshooting

- **The wrong company:** the log says which company page a name was matched to; use the company page link or the company ID to be sure.
- **"no company page with exactly that name"**: every advertiser with the name was searched instead; use the company page link for one company.
- **Fewer ads than expected:** check the countries, dates, formats and **Max ads per search**; impressions and targeting filters keep only EU and Brazil ads, and with countries the ads shown elsewhere are left out.
- **Empty `firstShown`, `impressions` or `targeting`:** LinkedIn does not publish them for that ad (see Limitations), or **Ad details** is off.
- **"no such ad"**: LinkedIn has no ad with that ID (or could not load it); check the ID.

### Privacy

The LinkedIn Ad Library is a public register LinkedIn publishes under the Digital Services Act. The actor saves the ads and the name and page of the company that runs them, and with **Advertiser details** the public data of the company's page (never its employees). By default, ads posted by members' own profiles (natural persons), and posts of members promoted by a company, are saved without the member's name, headline, photo or profile link, and message ads without the sender's name, signature and links that carry the sender's name (the name in the text becomes `[sender]`).

**Member names (personal data)** (off by default) adds them: the member's name, headline, profile link and photo (for an ad of a member also as `advertiserName` and `advertiserUrl`), the member whose post a company promotes, and the sender of a message ad with the message as written, signature included. The price stays the same. Names, photos and profiles of people are personal data: when you turn this on, you are responsible for processing them lawfully (GDPR in the EU), for example for a legitimate business purpose and without unsolicited marketing where the law forbids it.

E-mail addresses and phone numbers are always removed from ad texts. You are responsible for processing the results lawfully (GDPR legitimate interest, such as competitor research).

### Integrations

Connect the results to the tools you already use with the built-in integrations of Apify (the **Integrations** tab of the actor or of a saved task), with no code:

- **Google Sheets or Google Drive:** the results of every run in a spreadsheet or a file.
- **Zapier, Make and n8n:** start a workflow when a run finishes, or start the actor from one.
- **Slack or e-mail:** a message from Apify when a run finishes or fails.
- **Webhooks:** your own address gets the details of each run.
- **API and MCP:** run the actor from your code, or let an AI assistant run it through the Apify MCP server.

The results also download as Excel, CSV, JSON or XML from the **Output** tab.

### Privacy and error reports

When a run fails, the actor sends its developer a short error report: the error, the run ID and your input with secrets left out (tokens, webhooks, e-mails and similar values are hidden). Your results are never sent. Reports are deleted after at most 120 hours (5 days). To send nothing, turn off **Send error reports** (`sendErrorReports: false`). Questions about your data: open an issue in the **Issues** tab of this actor.

### WhatsApp notifications: setup

The actor sends the message from your own WhatsApp business number through the WhatsApp Cloud API of your Meta business account. You need a Meta business account; the actor uses only the values you enter in the **Notifications** section (the token and the numbers are stored encrypted and never written to the log).

1. **Create an app.** In Meta for Developers open **My Apps → Create app** and choose the use case **Connect with customers through WhatsApp**.
2. **Get a sending number.** In the app open **WhatsApp → API Setup**. You can start with the test number Meta gives you and add your own business number there later. Copy the **Phone number ID** (not the number itself) into **WhatsApp phone number ID**.
3. **Confirm the recipients (test number only).** A test number sends only to numbers on its list: in **API Setup**, under **To**, add each recipient's number and confirm it with the code WhatsApp sends to it.
4. **Create a permanent access token.** The token shown in API Setup expires within hours. In **Business settings → System users** add a system user, use **Assign assets** to give it your app (and your WhatsApp account), then **Generate token** for the app with the permissions `whatsapp_business_messaging` and `whatsapp_business_management` and the expiry you want. Paste it into **WhatsApp access token**.
5. **Create a message template (recommended).** In **WhatsApp Manager → Message templates → Create template** choose the category **Utility**, a name (e.g. `apify_results`) and a language, and write a body with two variables, for example: `New results of your Apify task: {{1}} Open the dataset: {{2}} (sent automatically after each run).` Meta does not accept a body that starts or ends with a variable and asks for sample values (e.g. `3 new jobs` and a dataset link); keep the text factual, a promotional text is moved to the Marketing category. Approval can take up to 24 hours. Enter the name in **WhatsApp template name** and its language code (e.g. `en_US`, `cs`, `pl`, `de`, as WhatsApp Manager shows it) in **WhatsApp template language**.
6. **Enter the recipients.** **WhatsApp recipient number** takes up to 5 numbers with the country code (e.g. `+420601234567`), separated by commas or new lines. Each number gets its own message.

**What the message contains.** With a template: `{{1}}` is the run summary with the first results on one line (title, company or price, place; never descriptions or contacts) and `{{2}}` the link to the dataset. A template with only `{{1}}` works too, it then gets the link at the end. Without a template the actor sends a text message with one link per result, like in Slack or Telegram.

**Without a template** WhatsApp delivers the message only when the recipient wrote to your business number in the last 24 hours (the customer service window), so a daily or hourly schedule needs a template. The run log says so once per run.

**What it costs.** Meta bills your business account, not this actor: per delivered message, by the message category (a template of the Utility category, or a service message for text in the 24-hour window, with a monthly free allowance per business number) and by the recipient's country. The current rates are in Meta's pricing of the WhatsApp Business Platform. The actor's own notification charge (see the **Pricing** tab) is once per run that delivered its notification, whatever the number of channels and recipients.

**Checked at the start.** When the run starts, the actor checks the token, the phone number ID and, when the token shows its WhatsApp account, the template (name, language, approval), without sending anything. Settings that can't work stop the run with a message that says what to fix, before anything is read from the website.

**When nothing arrives**, the run log names the WhatsApp error and what to do: a template that does not exist in that language or is not approved yet, a template with another number of variables, a recipient missing from the test number's list, an expired token, or the 24-hour window. A failed notification never fails the run and is not charged. Meta can accept a message and still not deliver it later (for example when the recipient's phone is not on WhatsApp); such a run counts as notified.

### FAQ

#### Is there an official LinkedIn Ad Library API?

LinkedIn offers an Ad Library API only to approved partners, with an application and access limits. This actor works as a LinkedIn Ad Library API for everyone: call it through the Apify API (see the Python and cURL examples above), get JSON, CSV or Excel, and schedule it.

#### How do I see a competitor's LinkedIn ads?

Enter the competitor's name or company page in **Companies** and run: you get every ad LinkedIn shows for that company page, with the text, media, buttons, landing pages and, for ads shown in the EU, the dates, impressions and targeting. Turn on **Monitoring: only new ads** to get only new and stopped ads every day.

#### How far back does the LinkedIn Ad Library go?

LinkedIn shows ads that ran in the last year; its date filter covers the last year up to yesterday. Ads shown in the EU have the first and last day they ran.

#### Is it a LinkedIn ad spy tool?

It is a LinkedIn ad spy tool alternative built on the public Ad Library: competitor ads, their creatives, impressions and targeting, new and stopped ads with alerts, and the advertisers behind a topic, without a LinkedIn account.

#### Is it legal to scrape the LinkedIn Ad Library?

The actor reads only the public Ad Library that LinkedIn publishes for everyone without logging in, at a polite pace, and it never solves CAPTCHAs or other access checks. LinkedIn's terms of service may restrict automated access and reuse of the data, so you are responsible for how you use it; if in doubt, consult a lawyer. This actor is not affiliated with, endorsed by or connected to LinkedIn.

#### How is it different from other LinkedIn Ad Library scrapers?

It matches a company name to the exact company page instead of mixing in every advertiser with a similar name, reads the full ad details by default at a lower price than the leading actors, gives flat targeting, country and campaign columns, checks the countries LinkedIn ignores with impressions and targeting filters, adds the advertiser's company data on request, counts ads for share of voice, and monitors competitors: new, stopped and ran-again ads with notifications to Slack, Discord, Telegram, WhatsApp or a webhook, plus a free summary of every run.

#### Do I need a LinkedIn account, cookies or a proxy?

No. The actor needs no login or cookies, and the proxy it uses is included in the price.

#### Can I use it via API, Make, Zapier or n8n?

Yes, like any Apify actor: run it through the Apify API or an integration, schedule it, and read the dataset in JSON, CSV or Excel. Notifications can also post to any webhook.

### Your feedback

Missing a field or an option? Every run's log ends with a link where you can tell us. Also known as a LinkedIn Ad Library API, LinkedIn ads library scraper, LinkedIn ads scraper, LinkedIn competitor ads tool, LinkedIn ad spy tool or LinkedIn ad monitor.

# Changelog

This Actor's version history is a separate document: https://apify.com/tsutseisoftware/linkedin-ad-library-scraper/changelog.md

# Actor input Schema

## `companies` (type: `array`):

One per line: a company name (HubSpot), a LinkedIn company page (linkedin.com/company/hubspot) or a company ID (68529). A name is matched to the company page with exactly that name, so only that company's ads come back (see "Company match" for every advertiser with the name).

## `keywords` (type: `array`):

One per line: LinkedIn's keyword search over the ads of all advertisers (e.g. "CRM" or "webinar"). LinkedIn can also match words that are not in the visible text (another version of the ad, the image). Each line is a separate search.

## `payers` (type: `array`):

One per line: ads paid for by this company or agency (the "Paid for by" name LinkedIn shows for ads in the EU). Each line is a separate search.

## `startUrls` (type: `array`):

Links copied from linkedin.com/ad-library: a search (its own filters are kept) or one ad (linkedin.com/ad-library/detail/...), or just an ad's ID (1643332444). A company page link here is read like a line of "Companies".

## `searches` (type: `array`):

Several searches in one run, each with its own filters (for agencies: one entry per client). Each entry has one of "company", "keyword", "payer" or "url" and any of the filters "countries", "dateRange", "startDate", "endDate", "impressionsMin", "impressionsMax", "targetingIncludes", "targetingExcludes", "adFormats", "keywordFilter", "sortOrder" and "maxAds" (ads of this search); what it leaves out comes from the filters below. Example: \[{"company": "HubSpot", "countries": \["DACH"], "dateRange": "last30Days"}, {"keyword": "AI agents", "impressionsMin": 10000, "maxAds": 50}]

## `companyMatch` (type: `string`):

"Exactly this company page": a name is matched to the LinkedIn company page with that exact name (if there is none, every advertiser with the name is searched and the log says so). "Every advertiser whose name contains it": like the website's search, so "Siemens" also finds Siemens Healthineers and Siemens EDA.

## `countries` (type: `array`):

Only ads shown in these countries; groups like the EU or DACH add all their countries. Empty = all countries. LinkedIn does not apply this filter together with an impressions or targeting filter: then the actor leaves out ads shown or targeted elsewhere after reading their page (with "Ad details"; not charged) and marks ads it cannot check (countryUnverified).

## `dateRange` (type: `string`):

Only ads that ran in this period.

## `startDate` (type: `string`):

Custom range: only ads that ran on or after this day: 2026-11-01, or relative like "30 days" or "3 months" (ago). LinkedIn searches dates within the last year.

## `endDate` (type: `string`):

Custom range: only ads that ran on or before this day (same formats; yesterday at the latest). Empty = up to yesterday.

## `adFormats` (type: `array`):

Only ads of these formats. Empty = all formats.

## `impressionsMin` (type: `integer`):

Only ads with at least this many impressions (e.g. 10000); works alone or with "Max impressions". LinkedIn knows impressions only for ads shown in the EU (and Brazil), so this filter keeps only those.

## `impressionsMax` (type: `integer`):

Only ads with at most this many impressions; works alone or with "Min impressions" (EU and Brazil ads only, as above).

## `targetingIncludes` (type: `array`):

Only ads that target by these parameters (EU and Brazil ads only, LinkedIn shows targeting for those).

## `targetingExcludes` (type: `array`):

Only ads that exclude people by these parameters (EU and Brazil ads only).

## `keywordFilter` (type: `string`):

Narrows every company and payer search with LinkedIn's keyword search (e.g. HubSpot ads about "AI"). Like the website, LinkedIn can also match words that are not in the visible text of the ad (another version of the ad, the image).

## `sortOrder` (type: `string`):

Order in which LinkedIn lists the ads.

## `maxItems` (type: `integer`):

Maximum number of ads saved in the run. You pay per saved ad. 0 = no limit.

## `maxAdsPerSearch` (type: `integer`):

Keep at most this many ads of each company, keyword, payer or link (in monitoring: check at most this many recent ads). 0 = no limit per search.

## `countOnly` (type: `boolean`):

Save one row per search with the number of ads LinkedIn has for it (adCount) instead of the ads: share of voice of competitors by country or month at the price of one row per search. Not together with monitoring.

## `includeAdDetails` (type: `boolean`):

Read each ad's page: the full text, headline, call to action, landing page, all images, the video, carousel cards, who paid for it, the days it ran, impressions with their countries and the targeting (dates, impressions and targeting are published for ads shown in the EU and some other places), document and event details and every button. Charged as "Ad details" only for ads whose page was read. Off = only what the list of results shows (shortened text, first image, advertiser and format).

## `includeMemberNames` (type: `boolean`):

Add who posted an ad when it is a person: the member's name, headline, profile link and photo (memberName, memberHeadline, memberProfileUrl, memberPhotoUrl; for ads of members also as advertiserName and advertiserUrl, for thought leader ads the member next to the company), and the sender of a message ad (senderName, senderPhotoUrl) with the message text as written, signature included. This is personal data: you are responsible for using it lawfully (GDPR in the EU). Off = no names, photos or profiles of people anywhere. E-mail addresses and phone numbers are removed from texts either way.

## `includeAdvertiserDetails` (type: `boolean`):

Add the advertiser's industry, company size, employees on LinkedIn, followers, website, headquarters, founding year, type, specialties and description from the company's public LinkedIn page. Read once per company and run and charged as "Advertiser details" ($0.004 per company, from 17 Nov 2026) only for companies whose page was found; ads of members get none. Needs "Ad details" for keyword, payer and link searches (company searches work without them).

## `onlyNewAds` (type: `boolean`):

Save only ads that started running since the previous run with the same Monitoring key (and, below, ads that stopped or ran again). Each run reads the ads that ran since the previous run; the first run takes the ads that ran in the last 30 days as the baseline and saves them. LinkedIn shows days up to yesterday, so an ad that starts today comes in the next day's run. Every page of results read costs the small "Monitoring check" fee (see Pricing).

## `reportStoppedAds` (type: `boolean`):

Also save ads that were running at the previous run and have not run for 3 days (changeType "stopped"), and stopped ads that run again ("restarted"). Needs all ads that ran since the previous run to fit in the limits.

## `monitoringKey` (type: `string`):

Name of the saved state. Use a different key for each watched list. Empty = "default". The value is stored encrypted.

## `slackWebhookUrl` (type: `string`):

Incoming webhook of your Slack channel (https://hooks.slack.com/services/...). Stored encrypted.

## `discordWebhookUrl` (type: `string`):

Webhook of your Discord channel (https://discord.com/api/webhooks/...). In Discord: channel settings → Integrations → Webhooks → Copy Webhook URL. Stored encrypted.

## `telegramBotToken` (type: `string`):

Token of your Telegram bot (from @BotFather). Used with "Telegram chat ID". Stored encrypted.

## `telegramChatId` (type: `string`):

Chat, group or channel ID the bot writes to (e.g. -1001234567890).

## `webhookUrl` (type: `string`):

Any HTTPS URL (Zapier, Make, n8n, your server): gets a POST with JSON {title, summary, totalSaved, runUrl, datasetUrl, items}.

## `whatsappAccessToken` (type: `string`):

Access token of the WhatsApp Cloud API of your Meta business account, used with "WhatsApp phone number ID" and "WhatsApp recipient number" (step by step in the README, section "WhatsApp notifications: setup"). For scheduled runs use a permanent token of a system user: Business settings → System users → Generate token, with the permissions whatsapp_business_messaging and whatsapp_business_management; the token of WhatsApp → API Setup expires within hours. Stored encrypted.

## `whatsappPhoneNumberId` (type: `string`):

ID of your WhatsApp business number that sends the message (not the number itself), e.g. 106540352242922. In your Meta app: WhatsApp → API Setup → Phone number ID.

## `whatsappTo` (type: `string`):

Phone number that gets the message, in international format with the country code (e.g. +420601234567); up to 5 numbers separated by commas or new lines, each gets its own message and the notification is charged once per run. A test number of Meta sends only to numbers you added and confirmed under API Setup → To. Stored encrypted.

## `whatsappTemplateName` (type: `string`):

Name of your approved message template (WhatsApp Manager → Message templates, e.g. apify_results), recommended: WhatsApp delivers a template message at any time. Its body gets the run summary with the first results in {{1}} and the dataset link in {{2}} (a template with only {{1}} gets both in {{1}}). Empty: a plain text message, which WhatsApp delivers only when the recipient wrote to your business number in the last 24 hours, so a scheduled run usually needs a template. Meta charges your business account for template messages (step by step in the README, section "WhatsApp notifications: setup").

## `whatsappTemplateLanguage` (type: `string`):

Language code of the template exactly as WhatsApp Manager → Message templates shows it next to the template, e.g. en_US, en_GB, cs, sk, pl or de. Used only with "WhatsApp template name".

## `notificationLimit` (type: `integer`):

How many ads are listed in one notification (the rest as "…and N more").

## `notifyOnlyChanges` (type: `boolean`):

Send nothing when the run saved nothing (e.g. a monitoring run without new or stopped ads).

## `proxyConfiguration` (type: `object`):

Apify residential proxy by default (included in the price): LinkedIn refuses most data center IP addresses.

## `exportFormats` (type: `array`):

Off by default. Printable HTML report: the results as a clean, branded table with the main columns, made for printing, saving as PDF or sending to someone; for working with the data use Excel or CSV, which have every field. Markdown table: the same columns as text for AI tools, docs or GitHub. The Output tab links the files. Each file has the overview columns of every saved row and nothing is left out, so a run with tens of thousands of rows makes a file of tens of MB that can be slow to open; for big runs use the dataset or its Excel export. Excel (XLSX), CSV and JSON are always in the Output tab and under Export, at no extra cost.

## `sendErrorReports` (type: `boolean`):

When a run fails, send the developer a short error report: the error and your input with secrets left out (tokens, webhooks and e-mails are hidden). Your results are never sent. Reports are deleted after at most 120 hours. Turn off to send nothing.

## Actor input object example

```json
{
  "companies": [
    "HubSpot"
  ],
  "companyMatch": "exact",
  "dateRange": "all",
  "sortOrder": "newest",
  "maxItems": 20,
  "maxAdsPerSearch": 0,
  "countOnly": false,
  "includeAdDetails": true,
  "includeMemberNames": false,
  "includeAdvertiserDetails": false,
  "onlyNewAds": false,
  "reportStoppedAds": true,
  "whatsappTemplateLanguage": "en_US",
  "notificationLimit": 10,
  "notifyOnlyChanges": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "exportFormats": [],
  "sendErrorReports": true
}
```

# Actor output Schema

## `ads` (type: `string`):

The saved ads (one row per ad), in the run's default dataset.

## `summary` (type: `string`):

Free summary of the run: ads per search with LinkedIn's count, formats, top advertisers, payers, countries and calls to action, new and stopped ads in monitoring.

## `excel` (type: `string`):

All saved rows as an Excel file, with every field.

## `htmlReport` (type: `string`):

The saved rows with the main columns as a clean table to print, save as PDF or send; only when "Extra export formats" includes it. Excel has every field.

## `markdown` (type: `string`):

The saved rows as a Markdown table, handy for AI tools, docs and GitHub; only when "Extra export formats" includes Markdown.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "companies": [
        "HubSpot"
    ],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("tsutseisoftware/linkedin-ad-library-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "companies": ["HubSpot"],
    "maxItems": 20,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("tsutseisoftware/linkedin-ad-library-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "companies": [
    "HubSpot"
  ],
  "maxItems": 20,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call tsutseisoftware/linkedin-ad-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tsutseisoftware/linkedin-ad-library-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/X0Pb0exaa9CHPR5SW/builds/kMKNfIgbFFvKUHt9q/openapi.json
