# LinkedIn Ad Library Scraper – Targeting, Impressions, Payers (`expensive_marquess/linkedin-ad-library-scraper`) Actor

Scrape ads from the LinkedIn Ad Library by advertiser, keyword, payer or company. Get ad text, images, videos, carousels, documents, landing pages, who paid, run dates, impressions by country and targeting. No login needed.

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

## Pricing

from $1.60 / 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, Targeting, Impressions & Payers

![LinkedIn Ad Library Scraper](https://api.apify.com/v2/key-value-stores/zJcuVPqbUFf5yLBhI/records/banner-linkedin-ad-library-scraper)

Scrape ads from the official [LinkedIn Ad Library](https://www.linkedin.com/ad-library) by **advertiser, keyword, payer or company page**. Get the full ad text, headline, images, **video files**, **carousel cards**, **document pages**, the **landing page**, **who paid** (often the media agency), **run dates**, **impressions by country** and the advertiser's **targeting** (languages, locations, and whether they target by audience, company, job, education, demographics or interests).

No LinkedIn account or cookies needed. Fast – plain HTTP, no browser.

### Why this LinkedIn ads scraper?

- 🧩 **Every format, fully** – single image, video (with MP4 links), carousels (every card), documents (page images), events and more.
- 🏢 **Who really pays** – the *Paid by* field often names the media agency behind the brand.
- 🎯 **Targeting & impressions** for EU ads – languages, locations, audience/company/job targeting and impressions by country.
- 🔗 **Any URL format works** – `linkedin.com/company/1035`, `de.linkedin.com/company/microsoft`, with or without `www`, plus Ad Library search and ad URLs.
- 💬 **Clear feedback** – empty runs explain what to try instead of silently returning nothing.

### What can you use it for?

- 🕵️ **B2B competitor research** – every LinkedIn ad a competitor runs, with format, message and landing page.
- 🎯 **Targeting intelligence** – see which countries and languages they target, and whether they target by job title, company or audience lists.
- 🏢 **Agency prospecting** – the *Paid by* field reveals which agency runs each brand's LinkedIn ads; search by **payer** to see an agency's whole client list.
- ✍️ **Creative swipe files** – collect documents, carousels and videos that B2B leaders run.
- 🤖 **Automations & AI agents** – clean JSON for n8n, Make, Zapier and the Apify MCP server.

### New

- 🎬 **Only these ad formats** – e.g. scrape only video ads; other formats are skipped before loading and never charged.
- 🙋 **`isPersonAd`** – flags thought-leader ads run from a person's profile instead of a company page.

### Input

| Field | What it does |
|---|---|
| **Advertisers, keywords or URLs** | Advertiser names (`Microsoft`), keywords, company URLs (`linkedin.com/company/1035`), Ad Library search URLs, or ad URLs |
| **Treat plain text as** | Advertiser name, keyword, or payer |
| **Countries** | Ads shown in selected countries |
| **Date range** | All time, last 30 days, current month/year, last year, or custom dates |
| **Max ads per query** | 0 = all |
| **Include full details** | Full text, landing page, payer, dates, impressions and targeting (on by default) |

```json
{
  "queries": ["Microsoft", "https://www.linkedin.com/company/1035"],
  "countries": ["DE", "FR"],
  "dateRange": "last-30-days",
  "maxAdsPerQuery": 200,
  "includeDetails": true
}
```

### Output

```json
{
  "adId": "1585279184",
  "adFormat": "Document",
  "advertiserName": "Microsoft",
  "advertiserCompanyId": "1035",
  "advertiserUrl": "https://www.linkedin.com/company/1035",
  "adText": "Wenn die Hälfte Ihrer Woche für Briefings, Präsentationen und Statusupdates draufgeht…",
  "headline": null,
  "destinationUrl": null,
  "imageUrls": [],
  "videoUrls": [],
  "carouselCards": [],
  "documentPageUrls": ["https://media.licdn.com/dms/image/v2/D4E10AQEr7VGPF1GZxA/ads-document-..."],
  "paidBy": "ZENITH UK (MEDIA) LIMITED",
  "firstShown": "2026-10-02",
  "lastShown": "2026-10-04",
  "totalImpressions": "20k-30k",
  "impressionsByCountry": [{ "country": "Germany", "share": "92%" }],
  "targeting": {
    "language": ["Deutsch"],
    "location": ["Deutschland, Österreich"],
    "parameters": {
      "Company": { "targeted": true, "excluded": true },
      "Job": { "targeted": true, "excluded": false },
      "Audience": { "targeted": false, "excluded": false }
    }
  },
  "adLibraryUrl": "https://www.linkedin.com/ad-library/detail/1585279184"
}
```

### Good to know

- LinkedIn shows **run dates, impressions and targeting only for ads that ran in the EU** (Digital Services Act). Ads that ran only elsewhere have the creative, advertiser and payer, but these fields are empty.
- Advertiser search is a text match: "Microsoft" also finds "Microsoft Surface", "Microsoft in Business", etc. Use a **company URL** to get one exact company page.
- Video and image URLs are signed by LinkedIn and can expire – download them soon after the run.

### Pricing

Pay per ad, plus a small extra per ad when full details are on – see the **Pricing** tab. Set **Maximum cost per run** to cap spending.

### FAQ

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

**Something missing or broken?** Open an issue in the **Issues** tab – I usually reply within a day.

⭐ **If this scraper saved you time, please [leave a review](https://apify.com/expensive_marquess/linkedin-ad-library-scraper/reviews) – it really helps!**

### More tools from this developer

- [YouTube Channel Email Finder – creator emails & socials by niche](https://apify.com/expensive_marquess/youtube-channel-email-finder)
- [Telegram Channel Scraper – messages, views, reactions, no login](https://apify.com/expensive_marquess/telegram-channel-scraper)
- [Google Ads Transparency Scraper – every Google ad of any advertiser](https://apify.com/expensive_marquess/google-ads-transparency-scraper)
- [TikTok Ads Library Scraper – ads with targeting & impressions](https://apify.com/expensive_marquess/tiktok-ads-library-scraper)
- [Ad Library All-in-One – Google + TikTok + LinkedIn ads in one format](https://apify.com/expensive_marquess/ad-library-all-in-one)

# Actor input Schema

## `queries` (type: `array`):

Any mix of: advertiser names (Microsoft), keywords, LinkedIn company URLs (linkedin.com/company/1035), Ad Library search URLs, or ad URLs (linkedin.com/ad-library/detail/...).

## `searchType` (type: `string`):

How plain-text entries are searched. URLs are detected automatically.

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

Only ads shown in these countries.

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

Only ads shown in this period.

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

Used when Date range is Custom.

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

Used when Date range is Custom.

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

0 = all ads.

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

Keep only these formats (e.g. Video). Other ads are skipped before details are loaded and are not charged. Leave empty for all formats.

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

Opens each ad for the full text, landing page, who paid, run dates, impressions by country and targeting (language, location, audience/company/job/education targeting). LinkedIn shows dates, impressions and targeting only for ads that ran in the EU.

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

LinkedIn rate-limits quickly; keep the proxy on.

## Actor input object example

```json
{
  "queries": [
    "Microsoft",
    "https://www.linkedin.com/company/1035",
    "https://www.linkedin.com/ad-library/detail/1585279184"
  ],
  "searchType": "advertiser",
  "countries": [
    "ALL"
  ],
  "dateRange": "all",
  "maxAdsPerQuery": 24,
  "includeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

No description

## `allResults` (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 = {
    "queries": [
        "Microsoft"
    ],
    "maxAdsPerQuery": 24,
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("expensive_marquess/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 = {
    "queries": ["Microsoft"],
    "maxAdsPerQuery": 24,
    "proxyConfiguration": { "useApifyProxy": True },
}

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

```

## MCP server setup

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