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

Scrape the public LinkedIn Ad Library by keyword, advertiser, payer, country, date or impressions. Get ad copy, CTA, landing URL, media, run dates, impression ranges, per-country reach and targeting in one flat row. No login.

- **URL**: https://apify.com/transparent_meteorite/linkedin-ad-library-scraper.md
- **Developed by:** [Detroit Web Agent - Open Data](https://apify.com/transparent_meteorite) (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 $1.31 / 1,000 ad with full 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

Scrape the public [LinkedIn Ad Library](https://www.linkedin.com/ad-library) and get every ad as one flat, analysis-ready row: ad copy, headline, call to action, landing page URL, images, videos and carousel cards, who paid for it, when it ran, the impression range, the share of impressions per country, and the language, location and audience targeting LinkedIn discloses. No LinkedIn login, no cookies to paste.

### What does LinkedIn Ad Library Scraper do?

- **Searches the Ad Library like the website does**: by keyword, advertiser, paying entity, country, date range and impression range, or straight from a search URL you built in the browser.
- **Pages through all results**: it follows LinkedIn's own infinite-scroll endpoint (24 ads per page) until your limit or the last page.
- **Opens every ad** (optional) and returns the full transparency record in the same row, so you never have to join two datasets.
- **Reads specific ads** from a list of ad URLs or numeric ad ids.
- **Parses the numbers for you**: `5k-10k` becomes `impressionsMin: 5000` and `impressionsMax: 10000`; each country share also gets an estimated impression range; "Ran from Nov 18, 2026 to Nov 22, 2026" becomes `ranFrom`, `ranTo` and `daysRunning`.
- **Includes the hidden targeting values**: LinkedIn collapses long location lists behind a "N others" button. Those values are in the page and end up in `targetingLocations` too.
- **Cleans links**: LinkedIn `trk=` tracking parameters are removed from landing page and advertiser URLs; UTM parameters set by the advertiser are kept, so you can see their campaign naming.

### Why use it?

- One row per ad with details included, covering every LinkedIn ad format: single image, video, carousel, document, message (InMail), job, article, event, text and spotlight ads.
- Format-specific fields are filled when they apply: carousel cards with title, link and image; the best-bitrate MP4 for video ads plus all sources; message sender and body for message ads; job title, company and location for job ads.
- Free status rows instead of failed runs: empty searches, removed ads, invalid input and blocked requests produce a row with a clear `status` and `statusMessage`, are never charged, and the run still ends successfully.
- A soft deadline: the run stops cleanly before your timeout and lists any ads it did not reach in the `NOT_STARTED` record.

### How it works

LinkedIn serves the Ad Library as public HTML behind Cloudflare. The scraper uses a real Chrome TLS fingerprint, loads each search page first to receive the same cookies a browser gets, spaces requests per IP, and when LinkedIn answers with a rate limit (429) or a challenge (403) it switches to a fresh proxy IP and retries. Each parallel worker has its own IP. The RESIDENTIAL proxy is the default because LinkedIn rate-limits datacenter IPs quickly.

### Input

| Field | What it does |
|---|---|
| `searchTerms` | Keywords, one search each (matches ad text and advertiser). |
| `advertisers` | Advertiser names (the account that ran the ad). |
| `payers` | The "Paid for by" entity, often an agency or legal entity. |
| `startUrls` | Ad Library search URLs copied from your browser; every filter in the URL is kept. |
| `adUrls` | Specific ads: `https://www.linkedin.com/ad-library/detail/<id>` or the bare id. |
| `countries` | 2-letter ISO codes (US, GB, DE...). Empty = all countries. |
| `dateOption` | All time, last 30 days, current month, current year, last year or custom range (`startDate`, `endDate`). |
| `minImpressionsThousands` / `maxImpressionsThousands` | Impression range filter, in thousands. |
| `maxAdsPerQuery` | Stop each search after this many ads (default 50). |
| `includeDetails` | On (default): open every ad for the full record. Off: summary rows from the results list, cheaper and faster. |
| `concurrency` | Parallel workers, each on its own proxy IP (default 4). |
| `proxyConfiguration` | Defaults to Apify RESIDENTIAL proxy. |

Example input:

```json
{
  "searchTerms": ["hubspot"],
  "countries": ["US", "DE"],
  "dateOption": "last-30-days",
  "maxAdsPerQuery": 100,
  "includeDetails": true
}
```

### Output

One row per ad. Main fields:

- Identity: `adId`, `adUrl`, `adFormat` (as LinkedIn names it), `adFormatCode`, `creativeType`
- Advertiser: `advertiserName`, `advertiserUrl`, `advertiserType` (company, showcase or person), `advertiserId`, `advertiserSlug`, `advertiserHeadline`, `advertiserLogoUrl`, `paidBy`
- Timing: `ranFrom`, `ranTo`, `daysRunning`, `availabilityText`
- Creative: `adText`, `headline`, `articleSubtitle`, `ctaText`, `ctas`, `destinationUrl`, `destinationDomain`, `allDestinationUrls`, `hashtags`, `commentaryLinks`, `imageUrl`, `imageUrls`, `videoUrl`, `videoThumbnailUrl`, `videoSources`, `carouselCards`, `messageSender`, `jobTitle`, `jobCompany`, `jobLocation`
- Reach: `totalImpressions`, `impressionsMin`, `impressionsMax`, `impressionsByCountry` (country, percent, estimated min and max), `topCountry`, `topCountryPercent`, `countryCount`
- Targeting: `targetingLanguages`, `targetingLocations` (and the `Excluded` versions), `targetingCategories` (Audience, Demographic, Company, Education, Job, Member Interests and Traits: targeted or excluded), `targetedCategories`, `excludedCategories`, `hasTransparencyData`
- Context: `searchQuery`, `position`, `searchUrl`, `status`, `scrapedAt`

#### Sample output

```json
{
  "status": "ok",
  "adId": "1634600163",
  "adUrl": "https://www.linkedin.com/ad-library/detail/1634600163",
  "adFormat": "Single Image Ad",
  "adFormatCode": "SINGLE_IMAGE",
  "advertiserName": "SAP @ Nagarro",
  "advertiserUrl": "https://www.linkedin.com/company/102230611",
  "advertiserType": "company",
  "advertiserId": "102230611",
  "paidBy": "Nagarro ES GmbH",
  "ranFrom": "2026-11-18",
  "ranTo": "2026-11-22",
  "daysRunning": 5,
  "headline": "Mehr Transparenz für Finance in der Pflege",
  "ctaText": "Anmelden",
  "destinationUrl": "https://www.nagarro.com/de/webinar/sap-cloud-erp-sozialwirtschaft",
  "destinationDomain": "nagarro.com",
  "totalImpressions": "5k-10k",
  "impressionsMin": 5000,
  "impressionsMax": 10000,
  "impressionsByCountry": [
    { "country": "Germany", "percent": 46, "lessThan": false, "estimatedMin": 2300, "estimatedMax": 4600 },
    { "country": "Switzerland", "percent": 37, "lessThan": false, "estimatedMin": 1850, "estimatedMax": 3700 },
    { "country": "Austria", "percent": 17, "lessThan": false, "estimatedMin": 850, "estimatedMax": 1700 }
  ],
  "targetingLanguages": ["Deutsch"],
  "targetedCategories": ["Demographic", "Job"],
  "hasTransparencyData": true,
  "searchQuery": "keyword: nagarro",
  "position": 1
}
```

Status rows (free) look like `{"status": "no_results", "statusMessage": "The Ad Library has no ads for this search and these filters. Not charged.", "input": "keyword: ..."}`.

### Use cases

1. **Competitor ad monitoring**: run your competitors as `advertisers` every week, sort by `ranFrom`, and see new creatives, offers, CTAs and landing pages as soon as they launch.
2. **B2B lead generation and sales triggers**: search a category keyword (for example "cybersecurity" or "webinar") and use `advertiserName`, `advertiserId` and `destinationDomain` to build a list of companies actively spending on LinkedIn ads right now.
3. **Agency research and creative swipe files**: collect headlines, ad copy, formats, video URLs and carousel cards for a niche, then compare messaging, formats and per-country reach across advertisers.
4. **Market and media analysis**: aggregate `impressionsMin`/`impressionsMax`, `impressionsByCountry` and targeting categories to estimate who is targeting which countries and audiences.

### Our edge, measured

Measured on Apify on 22 Nov 2026 (raw results are kept with the actor):

- **Reliability**: 10 of 10 cloud runs succeeded on 10 different keywords (hubspot, salesforce, cybersecurity, webinar, microsoft azure, payroll, recruiting, data analytics, nvidia, sap), each returning 30 ads with full details.
- **Same input, side by side** (keyword "hubspot", 25 ads, details on): this actor returned 25 of 25 ads, with 60 distinct fields and 23 fields filled in at least 80% of rows, in 15.8 seconds. Three other public LinkedIn Ad Library actors on the same input returned 15 to 20 ads, with 16 to 30 distinct fields and 12 to 15 fields filled in at least 80% of rows.
- **What the extra fields are**: parsed impression numbers, per-country estimated impressions, ISO run dates plus days running, landing domain, all CTAs, video sources, carousel cards, message, job and article fields, and the targeting category table.

### Pricing

Pay per event, no subscription. Current prices:

| Event | Free | Bronze | Silver | Gold | Platinum | Diamond |
|---|---|---|---|---|---|---|
| Actor Start | $0.002 | $0.002 | $0.002 | $0.002 | $0.002 | $0.002 |
| Ad with full details | $0.0018 | $0.00164 | $0.00147 | $0.00131 | $0.00131 | $0.00131 |
| Ad (summary only) | $0.0009 | $0.000818 | $0.000736 | $0.000655 | $0.000655 | $0.000655 |

Tier follows your Apify subscription plan.

Apify's free plan includes monthly platform credit that covers test runs.

Examples at the current price (one `ad-with-details` event per result; Free-plan tier):

| You pull | You pay |
|---|---|
| 100 results | $0.18 |
| 1,000 results | $1.80 |
| 10,000 results | $18.00 |

Scheduled runs stay cheap when each run only returns new records.

### Run it from code, n8n, Make or an AI agent

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("transparent_meteorite/linkedin-ad-library-scraper").call(run_input={"searchTerms": ["hubspot"], "maxAdsPerQuery": 50})
for ad in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(ad.get("advertiserName"), ad.get("adFormat"), ad.get("adUrl"))
```

Or with curl: `curl -X POST "https://api.apify.com/v2/acts/transparent_meteorite~linkedin-ad-library-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" -H "Content-Type: application/json" -d '{"searchTerms":["hubspot"],"maxAdsPerQuery":25}'`

- **n8n**: use the Apify node, operation "Run actor and get dataset", actor `transparent_meteorite/linkedin-ad-library-scraper`, then map `advertiserName`, `adText` and `adUrl` into your sheet or Slack node.
- **Make / Zapier**: the Apify app's "Run an Actor" step with the same input JSON, then "Get dataset items".
- **AI agents (Claude, ChatGPT, MCP)**: the actor is callable through the Apify MCP server (mcp.apify.com); an agent passes competitor names or keywords and reads back their live LinkedIn ads.

### FAQ

**Do I need a LinkedIn account or cookies?** No. The LinkedIn Ad Library is public; the scraper only reads public pages.

**Why do some ads have no impressions or targeting?** LinkedIn publishes impressions, per-country shares and targeting only for ads shown in the EU (Digital Services Act). Ads shown only outside the EU still have copy, media, advertiser, paid-by and run dates; `hasTransparencyData` tells you which kind you have.

**How far back does it go?** As far as the Ad Library itself: about one year of ads.

**Can I search by company page id?** Use the advertiser name in `advertisers`, or paste any search URL you built on the Ad Library website into `startUrls`.

**What about personal data?** Rows contain what LinkedIn publishes in its public ad transparency library: advertiser pages (companies or, for thought-leader ads, the public profile that ran the ad) and the paying entity. No private profile data is collected.

### Limits

- LinkedIn shows 24 ads per results page; a broad search with tens of thousands of results takes proportionally longer. Narrow with countries, dates or impressions for big pulls.
- Impression values are ranges set by LinkedIn; per-country estimates are those ranges multiplied by the published shares.
- LinkedIn changes its page layout from time to time. If a field goes missing, open an issue and it will be fixed.

### Related actors

- [Meta Ad Library scraper](https://apify.com/transparent_meteorite/meta-ad-library) for Facebook and Instagram ads.
- [Google Ads Transparency scraper](https://apify.com/transparent_meteorite/google-ads-transparency-scraper) for Google Search, YouTube and Display ads.
- [Ad footprint by domain](https://apify.com/transparent_meteorite/ad-footprint-by-domain) to see where a company advertises.

# Actor input Schema

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

Keywords to search in the Ad Library (matches ad text and advertiser). One search per line, e.g. hubspot, cybersecurity, webinar.

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

Advertiser (account owner) names, e.g. Microsoft, Salesforce. Each one is a separate search.

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

Search by the paying entity shown as 'Paid for by' (often an agency or legal entity).

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

Paste search URLs from https://www.linkedin.com/ad-library/search?... exactly as you built them in the browser. All filters in the URL are kept.

## `adUrls` (type: `array`):

Specific ads to read: https://www.linkedin.com/ad-library/detail/1234567890 or just the numeric id.

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

2-letter ISO country codes where the ad was shown (US, GB, DE...). Leave empty for all countries. Applies to search terms, advertisers and payers.

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

When the ads ran. Use Custom range with Start and End date. LinkedIn keeps about one year of history.

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

YYYY-MM-DD, only with Custom range.

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

YYYY-MM-DD, only with Custom range.

## `minImpressionsThousands` (type: `integer`):

Only ads with at least this many impressions, in thousands.

## `maxImpressionsThousands` (type: `integer`):

Only ads with at most this many impressions, in thousands.

## `maxAdsPerQuery` (type: `integer`):

Stop each search after this many ads (24 per results page).

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

On: open every ad for headline, CTA, landing URL, media, run dates, impressions, per-country reach and targeting. Off: faster, cheaper summary rows from the results list only.

## `concurrency` (type: `integer`):

How many ads are read in parallel, each on its own proxy IP.

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

LinkedIn rate-limits by IP. The RESIDENTIAL proxy is the reliable default.

## Actor input object example

```json
{
  "searchTerms": [
    "hubspot"
  ],
  "dateOption": "all",
  "maxAdsPerQuery": 50,
  "includeDetails": true,
  "concurrency": 4,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

No description

# 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"
    ],
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("transparent_meteorite/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 = {
    "searchTerms": ["hubspot"],
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("transparent_meteorite/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 '{
  "searchTerms": [
    "hubspot"
  ],
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call transparent_meteorite/linkedin-ad-library-scraper --silent --output-dataset

```

## MCP server setup

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