# LinkedIn Ad Library Scraper & API: Ads, Impressions & Campaigns (`s_actors/linkedin-ad-library-scraper`) Actor

Scrape the LinkedIn Ad Library without login: every ad of a company, keyword or payer with full copy, CTA, image / video / carousel / document, run dates, impressions by country and targeting. Short links expanded to the real landing page, campaign ids and UTM tags, exact ad count per advertiser.

- **URL**: https://apify.com/s_actors/linkedin-ad-library-scraper.md
- **Developed by:** [Superior Actors](https://apify.com/s_actors) (community)
- **Categories:** Marketing, Social media, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.54 / 1,000 ad with details

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 & API: Competitor Ads, Impressions & Campaigns

**Scrape the LinkedIn Ad Library without login or cookies**: every ad a company runs on LinkedIn, or every ad that mentions a keyword, with the **full ad copy, headline, CTA, image / video / carousel / document**, the payer, run dates and, for ads shown in the EU, **total impressions, impressions by country and targeting** (language, location, audience, job, company...).

On top of what the Ad Library page shows, every ad gets its **real landing page** (short links like `hubs.la`, `bit.ly`, `lnkd.in` expanded), the **campaign ids and UTM tags** read from it (group the ads of one campaign, see the advertiser's own campaign names), the **company behind thought leader ads** ("Promoted by Stripe") and the **exact number of ads** each search matches on LinkedIn.

Use cases: competitor ad research and swipe files for B2B marketing, agency pitches, ad benchmarking by format and country, tracking new ads of rivals on a schedule, DSA / ad transparency research. A **LinkedIn Ad Library API** with clean JSON, CSV or Excel.

#### What makes it different

| | |
| --- | --- |
| 🔗 **Real landing page, not a short link** | `landingUrl` follows `hubs.la/...`, `bit.ly/...`, `lnkd.in/...` to the page the ad sends people to. Example: HubSpot's `hubs.la/Q04B5zLF0?utm_campaign=EMEA` ends on `offers.hubspot.de/live-demo-...` with the full campaign name `36021563-EMEA 2026 \| Q3 \| DACH [de] \| Regional \| Fall Spotlight` |
| 🧩 **Campaign ids and UTM tags** | `adAccountId`, `campaignGroupId`, `campaignId` (LinkedIn's `hsa_*` tracking parameters) and `utmCampaign`, `utmSource`, `utmMedium`, `utmContent`: see which ads belong to one campaign and how the advertiser names it |
| 🔢 **Exact ad count per advertiser** | `searchTotalAds` = how many ads LinkedIn holds for the search (Stripe: 3 703; "cybersecurity": 182 011), even when you take only the newest 20 |
| 👤 **Thought leader ads with their company** | Ads run from an employee's profile carry `companyName` / `companyId` of the company that promotes them; *Only this company* keeps them and drops namesakes |
| 📊 **Summary per search** | Record `SUMMARY`: formats, advertisers, campaigns, landing domains, impressions by country summed over the ads, first and last run date |
| 🔔 **Only new ads** | For scheduled runs: only ads earlier runs did not return; ads seen before are free |
| 🔒 **No account, no cookies** | Public Ad Library pages only; your LinkedIn account is never used |

#### Example

Input: company `Stripe`, keyword `cybersecurity`, 250 ads each. Real run, 25 Oct 2026, 500 ads in 3.5 minutes:

| Advertiser | Company | Format | Headline | CTA | Landing page | Impressions | Top country |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Stripe | Stripe | Single Image Ad | Read the cash flow insights guide | Download | stripe.com/in/lp/platform-cash-flow-insights | < 1k | Spain |
| Tyler Bryson (Chief Revenue Officer) | Stripe | Video Ad | | | | | |
| Chainguard | Chainguard | Single Image Ad | | | learn.chainguard.dev/... | | |

The same Stripe ad in the *Campaigns & UTM* view: paid by `JUST GLOBAL UK LTD`, `utmCampaign` = `EMEA-JG_Sold_Platforms_Pan-EMEA_EN_SLP_PROSP_NAL_Field`, targeting `English` in 14 European countries, ran 22 Oct 2026.

`SUMMARY` for the keyword `cybersecurity` (250 newest ads): 182 011 ads match; formats Single Image 189, Video 32, Article 14, Message 6; top advertisers Chainguard 32, Zscaler 20; 34 campaigns; top landing domains `learn.chainguard.dev`, `info.zscaler.com`; most impressions in France, Italy, the UK.

#### Input

| Field | What it does |
| --- | --- |
| **Companies (advertisers)** | Names as LinkedIn shows them (`HubSpot`) or company links (`linkedin.com/company/notionhq`: the name is read from the page). One search each |
| **Keywords in the ad text** | Phrases in the ad copy across all advertisers: find every company advertising a topic |
| **Payers** | The entity in "Paid for by" (`HubSpot, Inc.`) |
| **Ad Library links** | Search links built on linkedin.com/ad-library (replayed as they are) and ad links or IDs |
| **Countries** | Two-letter codes (`DE`, `FR`, `US`); empty = all |
| **Date range** | Last 30 days, this month, this year, last year or a custom range; the Ad Library keeps ads of the last 12 months |
| **Min / Max impressions** | Only ads with that many impressions (LinkedIn publishes impressions for EU ads only) |
| **Ad formats** | Keep only Single Image, Video, Carousel, Document, Message, Event, Article... ads; others are free |
| **Only this company** | Drop partners and namesakes LinkedIn's loose name search returns; keep the company's pages and the thought leader ads it promotes |
| **Max ads per search** | Newest first, 1-5 000 per company / keyword / payer / link |
| **Ad details** | On: the ad page of every ad (all fields below). Off: the search card only (cheaper) |
| **Expand short links** | Follow click URLs to the landing page (free, on by default) |
| **Only new ads** | Return only ads earlier runs of the same search did not return |

#### Output

| Field | Example |
| --- | --- |
| `adId`, `adUrl`, `format`, `creativeType` | 1652957566, https://www.linkedin.com/ad-library/detail/1652957566, Single Image Ad, SPONSORED_STATUS_UPDATE |
| `advertiserName`, `advertiserUrl`, `advertiserId`, `advertiserType`, `advertiserHeadline` | Tyler Bryson, https://www.linkedin.com/in/tybryson, member, Chief Revenue Officer |
| `companyName`, `companyId` | Stripe, 2135371 (the company behind the ad, also for thought leader ads) |
| `text`, `headline`, `headlineDescription`, `callToAction` | full ad copy, Read the cash flow insights guide, Download |
| `clickUrl`, `landingUrl`, `landingDomain` | https://hubs.la/Q04B5zLF0..., https://offers.hubspot.de/live-demo-..., offers.hubspot.de |
| `adAccountId`, `campaignGroupId`, `campaignId` | 517582366, 805100113, 896904583 |
| `utmCampaign`, `utmSource`, `utmMedium`, `utmContent`, `utmTerm` | 36021563-EMEA 2026 | Q3 | DACH \[de] | Regional | Fall Spotlight, linkedin, paidsocial |
| `imageUrls`, `videoUrl`, `videoPosterUrl`, `carouselCards`, `documentTitle`, `documentPages` | creative files (video in the best quality LinkedIn offers) |
| `paidBy`, `startDate`, `endDate`, `runDays` | HubSpot, Inc., 2026-10-20, 2026-10-25, 6 |
| `totalImpressions`, `impressionsMin`, `impressionsMax` | 10k-20k, 10000, 20000 (EU ads) |
| `impressionsByCountry`, `topCountry` | `[{country: Germany, share: 100%, sharePct: 100}]`, Germany |
| `targeting`, `targetingLanguages`, `targetingLocations` | `{Language: {includes: [Deutsch]}, Location: {includes: [Deutschland]}}` |
| `targetedCategories`, `excludedCategories` | `[Company, Job, Language, Location]`, `[Audience, Company]` |
| `euTransparency` | true when LinkedIn published impressions or targeting for the ad |
| `searchType`, `searchQuery`, `searchTotalAds`, `position` | advertiser, Stripe, 3703, 4 |
| `detailsLoaded`, `scrapedAt` | true, 2026-10-25T09:30:12+00:00 |

Dataset views: *Ads*, *Impressions & targeting*, *Campaigns & UTM*, *Creatives*. Record `SUMMARY` in the run's key-value store has one entry per search. An ad ID LinkedIn does not know returns a free row with `error`.

#### Pricing

Pay per event: **$0.001** per run, **$0.00089 per ad with details** (**$0.89 per 1 000 ads**) and **$0.00049 per ad from the search card only** ($0.49 per 1 000, when *Ad details* is off). Apify Scale plan: $0.69 / $0.44 per 1 000, Business plan and above: $0.54 / $0.39 per 1 000. Ads filtered out and ads seen in earlier runs (*Only new ads*) are free; landing pages are expanded for free.

| Example | Cost |
| --- | --- |
| 100 ads of one competitor with details | ~$0.09 |
| 1 000 ads of a keyword with details | ~$0.89 |
| 1 000 ads, search cards only | ~$0.49 |
| Daily check of 10 competitors, 15 new ads a day | ~$0.015 per run |

#### FAQ

**Is there a LinkedIn Ad Library API?** This Actor works as one: send the input as JSON through the Apify API and get the ads back as JSON, CSV or Excel. It reads the public Ad Library pages at linkedin.com/ad-library, the same ones you see in the browser.

**Why do some ads have no impressions or targeting?** LinkedIn publishes impressions, impressions by country and targeting only for ads shown in the European Union (Digital Services Act). Ads shown only outside the EU still have the creative, advertiser, payer and landing page. `euTransparency` tells which is which.

**Why does "HubSpot" return ads of other companies?** The Ad Library matches advertiser names loosely: it also returns "HubSpot for Developers", partner agencies with HubSpot in their name, and thought leader ads of HubSpot employees. Turn on **Only this company** to keep only HubSpot's own pages and the thought leader ads HubSpot promotes.

**How do I track a competitor's new LinkedIn ads?** Put the competitors in **Companies**, turn on **Only new ads** and schedule the Actor daily or weekly. Each run returns only ads the previous runs did not see.

**How far back does it go?** As far as the Ad Library: ads that ran in the last 12 months.

**Do I need a LinkedIn account or cookies?** No.

#### Tips

- For a swipe file of one competitor, add a country (where they advertise in the EU) to get impressions and targeting on every ad.
- `searchTotalAds` gives the size of a competitor's LinkedIn advertising even with *Max ads per search* = 1 (one cheap row per company).
- Use `campaignGroupId` / `utmCampaign` to group ads into campaigns; `landingDomain` shows which product or offer each campaign pushes.

#### Limits

- Impressions are ranges (`10k-20k`), as LinkedIn publishes them, not exact numbers; spend is not published.
- `campaignId` and UTM tags exist only when the advertiser uses tracking parameters in the ad's link (about 1 ad in 5); many ads (lead forms, video views, thought leader posts) have no click URL at all.
- A carousel card's own link and a document's full pages are not on the Ad Library page; the cover and the page count are.

#### Other ad intelligence and LinkedIn tools

| Actor | What it does |
| --- | --- |
| [Google Ads Transparency Scraper](https://apify.com/s_actors/google-ads-transparency-scraper) | Every Google ad of an advertiser or domain: text, images, video, regions, impressions in the EU |
| [LinkedIn Company Scraper](https://apify.com/s_actors/linkedin-company-scraper) | Exact employee count and headcount growth of companies |
| [LinkedIn Jobs Scraper](https://apify.com/s_actors/linkedin-jobs-scraper) | LinkedIn jobs without login, salaries from descriptions |
| [TikTok Top Ads Scraper](https://apify.com/s_actors/tiktok-top-ads) | Top TikTok ads from Creative Center in 28 countries: video, likes, CTR, landing page, retention curve |

#### For AI agents and API

```json
{
    "advertisers": ["HubSpot", "https://www.linkedin.com/company/notionhq/"],
    "keywords": ["payroll software"],
    "countries": ["DE", "FR"],
    "dateRange": "last-30-days",
    "maxAdsPerSearch": 100,
    "exactAdvertiserMatch": true,
    "includeDetails": true,
    "onlyNewAds": false
}
```

Each row is one ad with `advertiserName`, `companyName`, `format`, `text`, `headline`, `callToAction`, `landingUrl`, `startDate`, `endDate`, `totalImpressions`, `impressionsByCountry`, `targeting`, `campaignId`, `utmCampaign` and `adUrl`.

# Actor input Schema

## `advertisers` (type: `array`):

Company names as LinkedIn shows them ("HubSpot", "Notion") or company page links (linkedin.com/company/<name>: the Actor reads the name from the page). Each one is its own search of the Ad Library. LinkedIn matches names loosely: "HubSpot" also finds "HubSpot for Developers", partner agencies and employees' thought leader ads (see "Only this company").

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

Words or phrases in the ad copy across ALL advertisers ("payroll software", "AI agents"): find every company advertising a topic, not only the ones you know.

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

The legal entity that paid for the ads ("HubSpot, Inc."), as in "Paid for by" on the ad.

## `adLibraryUrls` (type: `array`):

Search links built on linkedin.com/ad-library (any filters: they are replayed as they are) and ad links (linkedin.com/ad-library/detail/<id>) or bare ad IDs.

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

Two-letter country codes where the ads were shown (DE, FR, US, GB...). Empty = all countries. Applies to companies, keywords and payers (an Ad Library link keeps its own).

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

When the ads ran.

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

First day, for "Custom range". Not earlier than 12 months ago.

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

Last day, for "Custom range".

## `minImpressions` (type: `integer`):

Only ads with at least this many impressions (e.g. 10000). LinkedIn publishes impressions for ads shown in the EU only, so this filter keeps EU ads only.

## `maxImpressions` (type: `integer`):

Only ads with at most this many impressions (EU ads only, as above).

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

Keep only these formats. Others are skipped before any charge. Empty = all formats.

## `exactAdvertiserMatch` (type: `boolean`):

For companies: keep only the company's own ads: its pages ("HubSpot", "HubSpot for Developers") and employees' thought leader ads it promotes ("Promoted by HubSpot"); drops partners and namesakes ("Avidly HubSpot Solutions"). Dropped ads are free.

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

Stop each company / keyword / payer / link after this many ads (newest first). Controls the cost. The exact total LinkedIn holds is in "searchTotalAds" anyway.

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

Opens every ad's page: full text, CTA, click URL and landing page, payer, run dates, impressions by country, targeting, campaign ids. Off = the search card only (advertiser, format, the first ~120 characters, headline, picture): faster and cheaper.

## `expandLandingPages` (type: `boolean`):

Follows the click URL (hubs.la, bit.ly, lnkd.in...) to the real landing page and reads the full UTM campaign name and campaign ids there. Free.

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

Return only ads that earlier runs with the same search did not return. Ads seen before are skipped for free.

## `maxConcurrency` (type: `integer`):

How many ad pages are loaded at the same time.

## Actor input object example

```json
{
  "advertisers": [
    "HubSpot"
  ],
  "dateRange": "",
  "exactAdvertiserMatch": false,
  "maxAdsPerSearch": 20,
  "includeDetails": true,
  "expandLandingPages": true,
  "onlyNewAds": false,
  "maxConcurrency": 8
}
```

# Actor output Schema

## `overview` (type: `string`):

One row per ad: advertiser, format, copy, CTA, landing page, run dates, impressions.

## `reach` (type: `string`):

EU ads: impressions range, share by country and targeting parameters.

## `campaigns` (type: `string`):

Ad account, campaign group and campaign ids and UTM tags from the landing page: group the ads of one campaign.

## `creatives` (type: `string`):

Images, video, carousel cards and documents of each ad.

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

Per company / keyword / payer: ads matched on LinkedIn, formats, campaigns, landing domains, impressions by country.

## `all` (type: `string`):

Every field of every ad.

# 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 = {
    "advertisers": [
        "HubSpot"
    ],
    "maxAdsPerSearch": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("s_actors/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 = {
    "advertisers": ["HubSpot"],
    "maxAdsPerSearch": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("s_actors/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 '{
  "advertisers": [
    "HubSpot"
  ],
  "maxAdsPerSearch": 20
}' |
apify call s_actors/linkedin-ad-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,s_actors/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/vGEAmFR82dsbCc40v/builds/kbu1AKsJH8sV6Oddc/openapi.json
