# LinkedIn Ad Library Scraper: Ads, Impressions, Targeting (`arcadium/linkedin-ad-library`) Actor

LinkedIn Ad Library ads (advertiser, format, ad text, image or video, landing page) for an advertiser, company link, keyword or payer; $1.80 per 1,000 ads. Details at $3.60 add payer, run dates, impressions by country and targeting. Monitor mode reports new and stopped ads.

- **URL**: https://apify.com/arcadium/linkedin-ad-library.md
- **Developed by:** [Arcadium Data](https://apify.com/arcadium) (community)
- **Categories:** Marketing, Lead generation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 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: Ads, Impressions, Targeting

Give it an advertiser name, a LinkedIn company link, a keyword or a payer and it returns the ads LinkedIn publishes in its Ad Library as JSON: one row per ad with the advertiser, format, ad text, headline, image or video, landing page and call to action. From $1.80 per 1,000 ads; you pay only for rows you get.

**Why this actor**

- Details (on by default) add who paid, the days the ad ran, total impressions, impressions by country and the targeting chosen, as published under the EU Digital Services Act.
- Monitor mode returns only the ads that started or stopped since your last run.
- Reads the public Ad Library pages: no LinkedIn account, no login, no browser.
- Inputs that fail come back as free error rows with a code.

Built by Arcadium Data: public data, dated and agent-ready, never personal data.

### Use with AI agents

Returns the LinkedIn ads of a company, keyword or payer: ad rows (format, text, headline, image, video, landing page), with details the run dates, impressions, country split and targeting, plus monitor change rows. Agents can call it through the Apify MCP server (`https://mcp.apify.com`, open source as `apify/actors-mcp-server`) as `arcadium/linkedin-ad-library`: the input schema is read from the actor, the result is a dataset of JSON rows.

Input example for "what is HubSpot advertising on LinkedIn in Germany":

```json
{
  "searchTerms": ["https://www.linkedin.com/company/hubspot"],
  "countries": ["DE"],
  "maxAdsPerSearch": 20
}
```

And for "which companies advertise webinars about CRM in the last 30 days" (list only, cheaper):

```json
{
  "keywords": ["CRM webinar"],
  "dateRange": "last-30-days",
  "includeDetails": false,
  "maxAdsPerSearch": 100
}
```

What comes back: `ad` rows (charged), monitor `summary` and `ad-change` rows (charged), and a free `error` row for an input that could not be read. Filter on the `rowType` field. An error row carries `rowType: "error"`, a `code` (`invalid_input`, `not_found`, `no_match`, `blocked` or `unavailable`), a `message` and the `input` it is about. Retry on `blocked` and `unavailable` later; do not retry the other codes with the same input.

Cost of the calls above on the Free plan: 20 detailed ads at $3.60 per 1,000 is about $0.07; 100 list ads at $1.80 per 1,000 about $0.18. Each run adds a $0.0005 start fee (512 MB).

### What you get

**Ad row** (`rowType: "ad"`): one ad.

| Field | What it holds |
| --- | --- |
| `adId`, `adUrl` | LinkedIn's id of the ad and its Ad Library page. |
| `format`, `formatLabel` | `single_image`, `video`, `carousel`, `document`, `event`, `message`, `text`, `spotlight`, `follower`, `job`, ... and LinkedIn's label ("Single Image Ad"). |
| `advertiserType`, `advertiserName`, `advertiserCompanyId`, `advertiserUrl`, `advertiserLogoUrl` | The company page that runs the ad. When a person runs the ad under their own name, `advertiserType` is `member` and the name is not output (`advertiserNameWithheld: true`). |
| `postedByMember` | Thought-leader ad: the post appears under an employee's or creator's name and is promoted by the company in `advertiserName`. The person is not output. |
| `paidBy` | "Paid for by": the agency or legal entity that paid (details). |
| `adText`, `headline`, `callToAction`, `landingUrl`, `landingDomain` | The copy, the headline, the button and the destination link (LinkedIn tracking removed). Without details the text is LinkedIn's shortened list version (`adTextTruncated: true`). |
| `imageUrl`, `imageUrls`, `videoUrl`, `videoPosterUrl` | Images (all carousel cards with details) and the MP4 of a video ad. |
| `documentTitle`, `documentPageCount`, `documentPageImageUrls`, `carouselCards`, `eventName`, `eventTime`, `eventUrl`, `messageText` | Format-specific content: document ads, carousel cards, event ads, message ads. |
| `firstShown`, `lastShown`, `daysShown` | Days the ad ran (details; LinkedIn shows them for ads with EU transparency data). |
| `impressionsText`, `impressionsMin`, `impressionsMax`, `impressionsByCountry`, `countriesShown` | Total impressions ("1k-5k") and the share per country. |
| `targeting`, `targetingParameters` | The targeting the advertiser chose (language, location with every country or region) and which categories were used or excluded (audience, company, job, education, interests). |
| `searchTerm`, `matchedBy` | The input the row came from and how it was read (advertiser, company, keyword, payer, link, ad). |

Output example:

```json
{
  "rowType": "ad",
  "platform": "linkedin-ad-library",
  "adId": "1605781824",
  "adUrl": "https://www.linkedin.com/ad-library/detail/1605781824",
  "format": "document",
  "formatLabel": "Document Ad",
  "advertiserType": "company",
  "advertiserName": "KINTO Mobility",
  "advertiserNameWithheld": false,
  "postedByMember": false,
  "advertiserCompanyId": "54117462",
  "advertiserUrl": "https://www.linkedin.com/company/54117462",
  "paidBy": "TERRITORIO CREATIVO SL",
  "adText": "Bringing together diverse international backgrounds and deep mobility expertise, our European direct sales team ...",
  "adTextTruncated": false,
  "documentTitle": "KINTO_Fleet_Europe_Days_2026_Carrusel.pdf",
  "documentPageCount": 6,
  "firstShown": "2026-10-20",
  "lastShown": "2026-10-22",
  "daysShown": 3,
  "impressionsText": "1k-5k",
  "impressionsMin": 1000,
  "impressionsMax": 5000,
  "impressionsByCountry": [
    { "country": "PT", "countryName": "Portugal", "sharePct": 28 },
    { "country": "ES", "countryName": "Spain", "sharePct": 24 },
    { "country": "GB", "countryName": "United Kingdom", "sharePct": 19 }
  ],
  "countriesShown": ["PT", "ES", "GB", "FR", "IT", "DE"],
  "targeting": [
    { "facet": "Language", "includes": ["English"], "excludes": [] },
    { "facet": "Location", "includes": ["Germany", "Italy", "France", "United Kingdom", "Spain", "Portugal"], "excludes": [] }
  ],
  "targetingParameters": [
    { "parameter": "Company", "targeted": true, "excluded": true },
    { "parameter": "Job", "targeted": true, "excluded": true }
  ],
  "detailed": true,
  "searchTerm": "KINTO Mobility",
  "matchedBy": "advertiser"
}
```

**Monitor rows** (mode `monitor`): per search and run one `summary` row (`status` `baseline`, `changed` or `unchanged`; `activeAds`, `newAds`, `stoppedAds`, `previousCheckAt`, `searchUrl`), and one `ad-change` row per ad with `changeType` `new` (ran in the active window, not seen before) or `stopped` (no longer ran in the window), with the ad fields above.

### Input

```json
{
  "searchTerms": ["Salesforce", "https://www.linkedin.com/company/68529", "https://www.linkedin.com/ad-library/search?keyword=ai%20agents&countries=US"],
  "keywords": ["revenue operations"],
  "payers": ["Caffelli LLC"],
  "countries": ["US", "GB"],
  "dateRange": "last-30-days",
  "maxAdsPerSearch": 100,
  "includeDetails": true
}
```

| Field | What it does |
| --- | --- |
| `searchTerms` | Advertiser names (every advertiser whose name contains the text), LinkedIn company links (exactly that company; vanity names are looked up once), Ad Library search links (their own filters apply) or ad links and ad ids (that ad with details). |
| `keywords`, `payers` | Searches by words in the ad copy and by the paying entity. |
| `mode` | `ads` (default) or `monitor`. |
| `countries` | Countries where the ads were shown (two-letter codes). Empty = all. |
| `dateRange`, `startDate`, `endDate` | `all-time` (about the last 12 months), `last-30-days`, `current-month`, `current-year`, `last-year` or `custom` with dates (`YYYY-MM-DD` or `-30d`; the end date must be in the past). |
| `maxAdsPerSearch`, `maxResults` | Ads per search (default 50) and a cap for the run. |
| `includeDetails` | Read each ad's page (on by default): full text, payer, run dates, impressions, countries, targeting, landing page, media. Charged as `ad-detail` when LinkedIn shows the ad's EU transparency data (`detailed: true`), otherwise as `ad`. |
| `activeWithinDays`, `monitorName`, `maxActiveAdsPerSearch`, `maxChangesPerSearch` | Monitor mode: what counts as running, the name of the saved state, caps. |
| `includeErrorRows` | Add a free row for every input that could not be read. On by default. |

Input names of the most used LinkedIn Ad Library actors are accepted as they are (`startUrls`, `urls`, `resultsLimit`, `skipDetails`, `companies`, `keyword`, `payer`, `country`, `dateOption`, `maxItems`, `maxItemsPerSearch`, `maxRecords`, `scrapeAdDetails`, `onlyNewAds`, `monitorStoreName`, `proxy`), so an existing input can be pasted in.

### Use from code

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("arcadium/linkedin-ad-library").call(run_input={
    "searchTerms": ["https://www.linkedin.com/company/hubspot"],
    "countries": ["DE", "FR"],
    "maxAdsPerSearch": 50,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    if row.get("rowType") == "ad":
        print(row["firstShown"], row["formatLabel"], row["impressionsText"], row.get("landingDomain"))
```

JavaScript, a daily competitor watch (schedule it in Apify):

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

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('arcadium/linkedin-ad-library').call({
  mode: 'monitor',
  searchTerms: ['https://www.linkedin.com/company/hubspot', 'https://www.linkedin.com/company/salesforce'],
  monitorName: 'crm-vendors',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.filter((r) => r.rowType === 'ad-change').map((r) => [r.changeType, r.advertiserName, r.adUrl]));
```

### Pricing

You pay per row delivered, at the price of your Apify plan. Error rows and repeats are free.

| Apify plan | Ad (also each monitor change without details), per 1,000 | Ad with details (`includeDetails`, default), per 1,000 |
| --- | --- | --- |
| Free | $1.80 | $3.60 |
| Starter (Bronze) | $1.62 | $2.70 |
| Scale (Silver) | $0.90 | $1.35 |
| Business (Gold) | $0.50 | $0.90 |
| Platinum | $0.50 | $0.90 |
| Diamond | $0.50 | $0.90 |

Search checked (monitor summary): $2.70 per 1,000 on all plans.

Plus a one-off $0.001 per GB of memory when a run starts.

Set a maximum cost per run in the Apify run options and the actor stops before it goes over. `maxResults` caps the rows of a run.

### Use cases

- Competitor ad intelligence on LinkedIn: every ad a competitor ran in the last year, with copy, creative, landing page and the countries it reached.
- New-campaign alerts: schedule monitor mode daily and get only the ads that started or stopped.
- Sales signals: companies that started advertising (or advertise a hiring, product or event push) this week, by keyword.
- Agency and payer research: find every brand an agency pays for with a `payers` search.
- EU reach and targeting benchmarks: impression ranges, country split and targeting choices (DSA data).

### Limitations

- Only what the Ad Library shows anonymously. LinkedIn keeps ads for about a year after they ran.
- Run dates, impressions, country split, targeting and the landing link are published by LinkedIn for ads with EU transparency data; for other ads (for example ads shown only in the UK or the US) these fields stay empty, `detailed` is `false` and the row is charged as a plain `ad`.
- An advertiser-name search matches every advertiser whose name contains the text (as on the website). Use a company link for exactly one company.
- The list shows LinkedIn's shortened text; the full copy needs details.
- Video and image links are LinkedIn CDN links that expire after some time; download what you need to keep.
- The actor reads LinkedIn over Apify's datacenter proxy. When LinkedIn limits that pool, the run retries on fresh IPs and, if the limit persists, stops and reports the remaining inputs as free `blocked` error rows. Run again later.

### Privacy

Company advertisers are output by name. Thought-leader ads (a company promoting an employee's or creator's post) are output under the company with `postedByMember: true`; the person's name, headline and photo are not output. Ads a person runs under their own name are output with `advertiserType: "member"` and no name. Names of LinkedIn members mentioned or tagged in ads, the sender of message ads, email addresses and phone numbers are removed from all ad text. A payer name that may belong to a private person is withheld (`paidByWithheld: true`).

### FAQ

**How do I get exactly one company's ads?**
Paste its LinkedIn company link (`https://www.linkedin.com/company/hubspot` or `.../company/68529`). A plain name matches every advertiser whose name contains it.

**Why are run dates or impressions empty for some ads?**
LinkedIn publishes them only for ads with EU transparency data, and only on the ad's page: keep `includeDetails` on.

**How does monitor mode decide that an ad stopped?**
An ad counts as running when LinkedIn says it ran on one of the last `activeWithinDays` days (ending yesterday). It is reported as stopped on the first run after that.

**Something looks wrong in the output. Who do I tell?**
Open an issue on the actor page with the run link. We read them all.

# Actor input Schema

## `searchTerms` (type: `array`):

One per line: an advertiser name such as "HubSpot" (LinkedIn matches every advertiser whose name contains it), a company page link such as https://www.linkedin.com/company/hubspot (exactly that company), an Ad Library search link (its own filters are used), or an ad link / ad id (that one ad with its details).

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

Words or phrases to search the ad text for, for example "CRM" or "webinar". Each keyword is its own search.

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

Names of the entities that paid for the ads (often an agency, or the legal entity behind a brand), for example "Caffelli LLC". Each payer is its own search.

## `mode` (type: `string`):

ads = one row per ad (default). monitor = only what changed since your last run: new ads and ads that stopped running, plus one summary row per search.

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

Countries where the ads were shown, as two-letter codes, for example \["US"] or \["DE", "FR"]. Empty = all countries.

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

all-time (LinkedIn keeps about the last 12 months), last-30-days, current-month, current-year, last-year, or custom with the dates below.

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

YYYY-MM-DD, or relative such as -30d. Used with dateRange custom (set automatically when you give a date). LinkedIn allows the last 12 months.

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

YYYY-MM-DD, or relative such as -1d. Must be in the past (yesterday at the latest).

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

Maximum ads returned for each advertiser, link, keyword or payer.

## `includeDetails` (type: `boolean`):

Open each ad's page for the full ad text, run dates, total impressions, impressions by country, targeting, landing page, video and document links. Charged as 'Ad with details'. Off = the list version (advertiser, format, shortened text, headline, image).

## `maxResults` (type: `integer`):

Hard cap on charged rows for the whole run. Empty = no cap beyond 'Ads per search'.

## `activeWithinDays` (type: `integer`):

An ad counts as running when LinkedIn shows it ran on one of the last N days (ending yesterday). It is reported as stopped on the first run after that.

## `monitorName` (type: `string`):

Separate saved state per watch list, for example crm-vendors. Use a different name for each schedule.

## `maxActiveAdsPerSearch` (type: `integer`):

Upper bound of active ads listed per search and run. If a search has more, stopped ads are not reported for it.

## `maxChangesPerSearch` (type: `integer`):

Upper bound of change rows per search and run; the rest are reported on the next run.

## `includeErrorRows` (type: `boolean`):

Add a free row for every input that could not be read (code and message).

## `maxRetries` (type: `integer`):

Attempts per page after the first one (each on a fresh IP when blocked).

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

Leave empty: the actor uses Apify's datacenter proxy. Your own proxy URLs are used when given.

## Actor input object example

```json
{
  "searchTerms": [
    "HubSpot"
  ],
  "mode": "ads",
  "dateRange": "all-time",
  "maxAdsPerSearch": 50,
  "includeDetails": true,
  "activeWithinDays": 7,
  "monitorName": "default",
  "maxActiveAdsPerSearch": 1000,
  "maxChangesPerSearch": 500,
  "includeErrorRows": true,
  "maxRetries": 4
}
```

# Actor output Schema

## `results` (type: `string`):

All rows of this run in the default dataset.

## `view_overview` (type: `string`):

No description

## `view_transparency` (type: `string`):

No description

## `view_creative` (type: `string`):

No description

## `view_changes` (type: `string`):

No description

## `view_summaries` (type: `string`):

No description

## `view_errors` (type: `string`):

No description

## `record_stats` (type: `string`):

Requests, data volume, retries, per-input results and cost per result for this run.

# 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 = {
    "searchTerms": [
        "HubSpot"
    ],
    "mode": "ads",
    "dateRange": "all-time",
    "maxAdsPerSearch": 50,
    "includeDetails": true,
    "monitorName": "default"
};

// Run the Actor and wait for it to finish
const run = await client.actor("arcadium/linkedin-ad-library").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 = {
    "searchTerms": ["HubSpot"],
    "mode": "ads",
    "dateRange": "all-time",
    "maxAdsPerSearch": 50,
    "includeDetails": True,
    "monitorName": "default",
}

# Run the Actor and wait for it to finish
run = client.actor("arcadium/linkedin-ad-library").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 '{
  "searchTerms": [
    "HubSpot"
  ],
  "mode": "ads",
  "dateRange": "all-time",
  "maxAdsPerSearch": 50,
  "includeDetails": true,
  "monitorName": "default"
}' |
apify call arcadium/linkedin-ad-library --silent --output-dataset

```

## MCP server setup

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

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/EBltUbToiXdru3yte/builds/FZr6aExodxqfQ17yc/openapi.json
