# LinkedIn Ad Library Scraper — B2B Copy, Video & EU \[$3/1K] (`appropriate_ideal_ksi/linkedin-ad-library-pro`) Actor

\[$3.00/1K] Fast, zero-browser LinkedIn Ad Library scraper. Extract B2B ad copy, headlines, CTAs, direct MP4 video streams, carousel slides, Thought Leader creators, verified payers, landing URLs & EU DSA reach.

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

## Pricing

$3.00 / 1,000 ad results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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 — B2B Ad Copy, Video, Carousel & EU Reach

Extract active and historical B2B LinkedIn Ads for **any competitor company, keyword, country, or date range** directly from the **LinkedIn Ad Library**—at pure HTTP/2 speed in **256 MB RAM** with **zero headless browser overhead** and **zero residential proxy required**.

Built for B2B growth teams, ABM & outbound sales agents (`Clay`, `n8n`, `Make`, `MCP`), and paid social strategists who need **complete, untruncated LinkedIn creative & targeting data** without slow browser crashes or 24-ad pagination cutoffs:

- **Untruncated B2B Ad Copy:** Full post commentary and Sponsored Message / InMail copy with `…see more` UI noise cleanly stripped.
- **Every LinkedIn Ad Format:** Single Image Ads, Video Ads (**direct highest-bitrate MP4 stream URLs**), Carousel Ads (`carousel_cards` with per-card title, destination URL, and image), Document Ads (title, cover images, and manifest URL), Event Ads, Message Ads, Spotlight Ads, Job Ads, and **Thought Leader Ads** (with creator name & profile URL).
- **Clean Destination URLs & UTM Tags:** Extracts external `landing_page_url` and `landing_domain` with LinkedIn's synthetic `trk=ad_library_...` parameter stripped while preserving real advertiser `utm_source`, `utm_campaign`, and `utm_content` tags.
- **Verified Payer & Impression Dates:** Captures legal entity (`Paid for by ...`), canonical advertiser company URL, `first_impression_date`, and `last_impression_date` (`YYYY-MM-DD`).
- **EU / DSA & Global Reach + Targeting Facets:** Extracts `total_impressions_range` (`min`/`max` integers), full `country_impression_breakdown` percentages, `targeting_language`, expanded `targeting_locations`, and `targeting_company_facets` (`Company`, `Job`, `Audience`, `Seniority` inclusion/exclusion flags).
- **Stateful Daily Competitor Monitoring (`onlyNewAds`):** Remembers seen `ad_id`s in a named Apify Key-Value Store so scheduled daily/weekly runs only emit—and only charge for—brand-new competitor ads.

> **Tracking competitor Search & YouTube Ads too?** Pair this Actor with [**Google Ads Transparency Scraper Pro (`appropriate_ideal_ksi/google-ads-transparency-pro`)**](https://apify.com/appropriate_ideal_ksi/google-ads-transparency-pro) to combine B2B LinkedIn Ads + Google Search, Shopping & YouTube Ads into a unified competitive intelligence feed.

***

### Why B2B Teams & AI Agents Switch to LinkedIn Ad Library Pro

| Capability | Legacy LinkedIn Ad Scrapers | LinkedIn Ad Library Pro |
| :--- | :--- | :--- |
| **Pagination Beyond 24 Ads** | Breaks or requires brittle browser scrolling | **Native `searchPaginationFragment` cursor pagination** |
| **Crash Rate on 0-Ad Companies / Rate Limits** | ~10% run failures on empty queries or `429` bursts | **0% crash rate (graceful 0-ad exit + auto jitter backoff)** |
| **Video & Carousel Extraction** | Thumbnail only | **Direct high-bitrate MP4 `video_url` + full `carousel_cards`** |
| **Sponsored Message / InMail Copy** | Truncated or blank due to nested HTML tags | **Full multi-paragraph InMail body + CTA + offer link** |
| **Daily Competitor Alerting** | Re-scrapes & re-bills duplicate ads every day | **Built-in `onlyNewAds` stateful Key-Value deduplication** |
| **Engine Footprint** | Heavy Playwright / Chromium (`1–4 GB` RAM + proxy) | **Pure HTTP/2 Chrome-150 TLS (`256 MB` RAM, no proxy needed)** |

***

### Input Parameters

Search using **company names**, **keywords**, **direct URLs**, or any combination with country and date filters:

```json
{
  "companyNames": ["Notion", "HubSpot"],
  "keywords": ["ai agent"],
  "countries": ["US", "DE"],
  "dateOption": "last-30-days",
  "maxAdsPerTarget": 50,
  "maxTotalAds": 200,
  "includeAdDetails": true,
  "onlyNewAds": false
}
```

- **`companyNames`**: Competitor or advertiser names (`"Notion"`, `"HubSpot"`, `"Salesforce"`, `"Stripe"`).
- **`keywords`**: Words or phrases to match in ad copy/headlines (`"crm"`, `"soc 2"`, `"data warehouse"`).
- **`startUrls`**: Direct `linkedin.com/ad-library/search?...` URLs, `linkedin.com/ad-library/detail/<id>` URLs, or `linkedin.com/company/<slug>` URLs.
- **`countries`**: Optional ISO-2 country codes (`["US", "GB", "DE", "FR"]`). Leave empty for worldwide.
- **`dateOption`**: `"ALL"`, `"last-30-days"`, `"current-month"`, `"cur-year"`, `"last-year"`, or `"custom-date-range"` (with `startDate` & `endDate` in `YYYY-MM-DD`).
- **`onlyNewAds` + `monitorStoreName`**: Enable stateful deduplication across scheduled runs so Slack/Clay/webhook workflows only trigger when a competitor launches a new creative.

***

### Sample Output Record

```json
{
  "target_input": "HubSpot",
  "ad_id": "1638499894",
  "detail_url": "https://www.linkedin.com/ad-library/detail/1638499894",
  "advertiser_name": "HubSpot",
  "advertiser_url": "https://www.linkedin.com/company/68529",
  "advertiser_logo_url": "https://media.licdn.com/dms/image/v2/C4D0BAQF8H-SLmMDZlA/company-logo_100_100/0/1646683330132/hubspot_logo",
  "payer_name": "HubSpot, Inc.",
  "thought_leader_name": null,
  "thought_leader_member_url": null,
  "ad_format": "Video Ad",
  "creative_type": "SPONSORED_VIDEO",
  "body_text": "Gutes Marketing braucht Gespür. Marketing-Studio automatisiert die Kampagnenverwaltung, damit Sie sich darauf konzentrieren können, Ihre Ideen umzusetzen.",
  "headline": "Mehr starke Kampagnen an den Start bringen.",
  "cta_text": "Learn more",
  "landing_page_url": "https://www.hubspot.de/products/marketing/studio?utm_source=linkedin&utm_medium=paid_brandstrategy&utm_campaign=BrandStrategy_VideoViews_DE",
  "landing_domain": "hubspot.de",
  "image_urls": [
    "https://media.licdn.com/dms/image/v2/D4E10AQFxQp_K5Eleow/videocover-high/B4EaHErJvwIgBI-/0/1794301011337"
  ],
  "video_url": "https://dms.licdn.com/playlist/vid/v2/D4E10AQFxQp_K5Eleow/progressive-servable-video/B4EaHErJvwIgAY-/0/1794301010627",
  "carousel_cards": [],
  "first_impression_date": "2026-11-11",
  "last_impression_date": "2026-11-13",
  "is_restricted": false,
  "restriction_reason": null,
  "total_impressions_range": "30k-50k",
  "impressions_min": 30000,
  "impressions_max": 50000,
  "country_impression_breakdown": [
    { "country": "Germany", "share_text": "99%", "share_percent": 99.0 },
    { "country": "Switzerland", "share_text": "< 1%", "share_percent": 0.5 }
  ],
  "targeting_language": ["English"],
  "targeting_locations": ["Germany"],
  "targeting_company_facets": {
    "targeted": true,
    "excluded": true,
    "included_segments": [],
    "excluded_segments": []
  }
}
```

***

### High-ROI Workflows

1. **Clay / Outbound ABM Intent Signals:** Enrich target accounts in `Clay` or `n8n` with active LinkedIn Ad spend, Thought Leader partnerships, and exact product messaging hooks before sending outbound sequences.
2. **Automated Competitor Creative Alerts:** Schedule daily runs with `"onlyNewAds": true` and route new video MP4s, carousel decks, and lead-magnet offers straight to Slack or Notion.
3. **B2B Offer & UTM Reverse-Engineering:** Inspect competitor `landing_page_url` UTM taxonomy, gated ebooks (`Document Ad`), and webinar promotions (`Event Ad`) across `US`, `GB`, `DE`, and `FR`.
4. **Full-Funnel Paid & Lead Intelligence:** Combine with [**Google Ads Transparency Scraper Pro**](https://apify.com/appropriate_ideal_ksi/google-ads-transparency-pro) (`appropriate_ideal_ksi/google-ads-transparency-pro`) for Paid Search/YouTube ads and [**Google Maps Leads, Emails & Pixel Scraper Pro**](https://apify.com/appropriate_ideal_ksi/google-maps-leads-email-pro) (`appropriate_ideal_ksi/google-maps-leads-email-pro`) for local business emails, phones & ad-pixel detection.

# Changelog

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

# Actor input Schema

## `companyNames` (type: `array`):

List of company or advertiser names to extract LinkedIn Ads for (e.g. 'Notion', 'HubSpot', 'Salesforce', 'Stripe').

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

Search LinkedIn Ads containing specific words or phrases in ad copy or headlines (e.g. 'crm', 'ai agent', 'soc 2').

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

Paste any linkedin.com/ad-library/search..., linkedin.com/ad-library/detail/<id>, or linkedin.com/company/<slug> URLs directly.

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

Optional ISO-2 country codes where ads were served (e.g. \['US', 'GB', 'DE', 'FR']). Leave empty for all countries worldwide.

## `dateOption` (type: `string`):

Filter ads by impression recency, or select ALL to return all available LinkedIn Ad Library records.

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

Start date in YYYY-MM-DD format (required when Date Range Filter is 'custom-date-range').

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

End date in YYYY-MM-DD format (required when Date Range Filter is 'custom-date-range').

## `combineCompanyAndKeywords` (type: `boolean`):

When enabled and both Company Names and Keywords are provided, searches each (Company + Keyword) combination together instead of running them as separate targets.

## `maxAdsPerTarget` (type: `integer`):

Maximum number of unique LinkedIn Ads to extract per company, keyword, or start URL (Free Apify plan preview: up to 25/run; Paid Apify plans: up to 10,000/target).

## `maxTotalAds` (type: `integer`):

Optional hard global ceiling on total ads emitted across the entire run. Leave empty for no global cap beyond Max Ads per Company / Keyword.

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

Fetches each ad's detail page for untruncated body copy, verified payer entity, external landing URL, direct MP4 video stream, carousel cards, impression dates, and country/targeting breakdowns (included at no extra add-on charge).

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

Optional filter to only return (and charge for) specific LinkedIn ad formats: VIDEO, SINGLE_IMAGE, CAROUSEL, DOCUMENT, THOUGHT_LEADER, EVENT, MESSAGE, SPOTLIGHT, TEXT, FOLLOWER, or JOB. Leave empty for all formats.

## `excludeJobAds` (type: `boolean`):

Skip promoted LinkedIn Job Ads before billing so B2B marketers spying on SaaS competitors only pay for actual marketing creatives.

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

Deduplicates against a persistent Apify Key-Value Store across runs so daily/weekly scheduled monitors only return and charge for newly launched competitor ads.

## `monitorStoreName` (type: `string`):

Named Apify Key-Value Store used to remember previously seen ad IDs when 'Only New Ads' is enabled.

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

Optional proxy settings. Direct HTTP/2 Chrome-150 TLS impersonation works reliably out of the box with zero residential proxy cost.

## Actor input object example

```json
{
  "companyNames": [
    "Notion"
  ],
  "dateOption": "ALL",
  "combineCompanyAndKeywords": false,
  "maxAdsPerTarget": 25,
  "includeAdDetails": true,
  "excludeJobAds": false,
  "onlyNewAds": false,
  "monitorStoreName": "linkedin-ads-seen-state",
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Every extracted LinkedIn Ad record from the default dataset.

# 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 = {
    "companyNames": [
        "Notion"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("appropriate_ideal_ksi/linkedin-ad-library-pro").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 = { "companyNames": ["Notion"] }

# Run the Actor and wait for it to finish
run = client.actor("appropriate_ideal_ksi/linkedin-ad-library-pro").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 '{
  "companyNames": [
    "Notion"
  ]
}' |
apify call appropriate_ideal_ksi/linkedin-ad-library-pro --silent --output-dataset

```

## MCP server setup

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

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/IyUVzWW66Us4ex7es/builds/vcSM5haDYHoO72ZfO/openapi.json
