# LinkedIn Ad Library Scraper - B2B Competitor Ads (No Login) (`adintel-labs/linkedin-ad-library-scraper`) Actor

Scrape B2B competitor ads from the LinkedIn Ad Library by company, keyword or payer: full ad copy, headline, CTA, landing page, media, run dates, EU impression ranges by country and targeting. No login or cookies, no personal profiles. $3 / 1,000 ads.

- **URL**: https://apify.com/adintel-labs/linkedin-ad-library-scraper.md
- **Developed by:** [Abi Fadeyi](https://apify.com/adintel-labs) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 ad scrapeds

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 competitor ads, impressions & targeting (no login)

**See every LinkedIn ad a B2B competitor runs — full copy, headline, CTA, landing page, media and (for EU ads) impressions by country and targeting — straight from LinkedIn's public Ad Library. No login, no cookies, no personal profiles.**

Scrape B2B ads from LinkedIn's **public [Ad Library](https://www.linkedin.com/ad-library/)** by **company/advertiser**, **keyword** or **payer** — without logging in and **without touching personal profiles**. Each record includes the **full ad copy, headline, CTA, landing page, image/video URLs, format, payer**, and for EU-delivered ads the **run dates, total impression range, impressions split by country and targeting disclosures** (language, location, audience, job, company, demographics…).

### What can you do with it?

- **B2B competitor ad research** — messaging, offers, formats (document, video, carousel, event) and how long each ad ran.
- **ABM & sales intelligence** — check which target accounts are actively advertising on LinkedIn and what they promote.
- **SaaS positioning research** — compare value props and CTAs across a category.
- **Agency audits** — export a prospect's LinkedIn ads with EU impression ranges before the pitch.
- **Monitoring** — schedule runs or use the Competitor Ad Tracker for launch/stop alerts.

### Quick start

1. Click **Try for free** (or *Start*) — the input is pre-filled with a small, fast example.
2. Change the brand / keyword, set *Max results*, and press **Start**.
3. Download the ads as JSON, CSV, Excel or HTML, or fetch them via API / integrations below.

```json
{
  "advertisers": ["shopify"],
  "maxResults": 20
}
```

Add `"countries": ["DE"]` to focus on EU-delivered ads, which carry impressions and targeting.

### Why this LinkedIn Ad Library scraper?

- **Public data only** — no cookies, no account, no member scraping. Safe for compliance-conscious teams.
- **Full detail** — opens each public ad detail page for full copy, CTA, landing URL, run dates, impressions and targeting.
- **Gets past Cloudflare reliably** — real browser + in-page requests (same fingerprint as a visitor), automatic session rotation and detail retries.
- **Clean B2B schema** — formats normalized (`SINGLE_IMAGE`, `VIDEO`, `CAROUSEL`, `DOCUMENT`, `MESSAGE`, `EVENT`, …), impressions parsed into numbers.

### Data fields

`adId`, `advertiserName`, `advertiserUrl`, `advertiserLogoUrl`, `paidBy`, `format`, `formatLabel`, `headline`, `bodyText`, `ctaText`, `landingPageUrl`, `imageUrls`, `videoUrl`, `videoPosterUrl`, `startDate`, `endDate`, `impressionsRange` `{min,max,text}`, `impressionsByCountry[]`, `targeting[]`, `targetingFlags[]`, `adUrl`, `scrapedAt`, optional `aiAnalysis`.

### Full input example

```json
{
  "advertisers": ["shopify", "hubspot"],
  "keywords": ["ai agents"],
  "countries": ["DE", "FR"],
  "dateOption": "last-30-days",
  "maxResults": 100,
  "includeDetails": true
}
```

### Sample output (real record, trimmed)

```json
{
  "platform": "linkedin",
  "adId": "1656964896",
  "advertiserName": "Shopify",
  "advertiserUrl": "https://www.linkedin.com/company/784652",
  "paidBy": "Shopify Inc.",
  "format": "SINGLE_IMAGE",
  "headline": "Shopify does B2B",
  "bodyText": "When your wholesale portal is this easy to use, buyers don’t need to call a rep. They just click 'buy again'.",
  "ctaText": "Learn more",
  "landingPageUrl": "https://www.shopify.com/case-studies/dermalogica-canada?utm_source=linkedIn&utm_medium=cpm&...",
  "startDate": "2026-10-23",
  "endDate": "2026-10-29",
  "impressionsRange": { "min": 5000, "max": 10000, "text": "5k-10k" },
  "impressionsByCountry": [{ "country": "United States", "share": "76%" }, { "country": "Canada", "share": "18%" }],
  "targeting": [{ "parameter": "Language", "text": "Targeting includes English" }],
  "adUrl": "https://www.linkedin.com/ad-library/detail/1656964896"
}
```

### Pricing (pay per event — no subscription)

You pay only for results. With Apify pay-per-event pricing there is no separate compute charge for this Actor — just the events below.

| Event | Price | Per 1,000 | When |
|---|---|---|---|
| `ad-scraped` | $0.003 | $3.00 | Each ad (with detail page) written to your dataset (primary) |
| `ai-ad-analysis` | $0.03 | $30.00 | Optional, only when enabled and successful |
| Actor start | $0.00005 | — | Apify standard start event, once per run |

Example: 1,000 LinkedIn ads with details = **$3.00**; 100 ads = $0.30.

Set **Max cost per run** (or `maxTotalChargeUsd` via the API) and the run stops cleanly at your budget. New Apify accounts get free monthly platform credit, which you can use to try this Actor.

### FAQ

**Why are impressions/targeting empty for some ads?** LinkedIn discloses them only for ads delivered in the EU (Digital Services Act). Add an EU country (e.g. `DE`) to `countries` to focus on those.

**Do you scrape LinkedIn profiles?** No. Only the public Ad Library. Thought-leader ads may display the posting member's name as part of the public ad creative; we do not visit or collect profiles.

**Proxy?** Apify default proxy works in our tests; switch to RESIDENTIAL if your log shows Cloudflare blocks.

**Can I run it on a schedule?** Yes. Create an Apify Schedule (daily, weekly, cron) for this Actor or a saved task. To get alerts only when something changes, use the [Competitor Ad Tracker](https://apify.com/adintel-labs/competitor-ad-tracker).

**Can I use it from an AI agent or my own app?** Yes — via the Apify API, the `apify-client` SDKs, n8n, Make, Zapier or the Apify MCP server. See *Integrations & API* below.

**Something broke or a field is missing?** Open an issue on the Issues tab with your run ID. We run automated health checks on every AdIntel Labs Actor daily and fix breakages as quickly as we can.

### Integrations & API

Use this Actor from code, no-code tools or AI agents:

- **REST API** — `POST https://api.apify.com/v2/acts/adintel-labs~linkedin-ad-library-scraper/run-sync-get-dataset-items?token=<APIFY_TOKEN>` with the input JSON as the body returns the ads directly (waits up to 5 minutes; use `/runs` + webhooks for longer jobs).
- **n8n** — Apify node (`@apify/n8n-nodes-apify`) → *Run an Actor and get dataset*, Actor `adintel-labs/linkedin-ad-library-scraper`.
- **Make** — Apify app → *Run an Actor* (run synchronously) → *Get Dataset Items*, or trigger on *Watch Actor Runs*.
- **Zapier** — Apify app → *Run Actor* action, or *Finished Actor Run* trigger + *Fetch Dataset Items* (for runs longer than Zapier's 30 s sync limit).
- **AI agents (MCP)** — add `https://mcp.apify.com?tools=adintel-labs/linkedin-ad-library-scraper` to Claude, Cursor, VS Code or any MCP client; the Actor appears as the tool `adintel-labs--linkedin-ad-library-scraper`.
- **Schedules & webhooks** — run it daily/weekly with Apify Schedules and push results to Slack, Google Sheets, Airtable, S3 and more.

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: process.env.APIFY_TOKEN });
const run = await client.actor('adintel-labs/linkedin-ad-library-scraper').call({"advertisers": ["shopify"], "maxResults": 20}, { maxTotalChargeUsd: 1 });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

```python
import os
from apify_client import ApifyClient  # pip install apify-client
client = ApifyClient(os.environ["APIFY_TOKEN"])
run = client.actor("adintel-labs/linkedin-ad-library-scraper").call(run_input={"advertisers": ["shopify"], "maxResults": 20})
for ad in client.dataset(run.default_dataset_id).iterate_items():  # apify-client 1.x: run["defaultDatasetId"]
    print(ad)
```

### More AdIntel Labs ad-library Actors

All built for the same job — competitor ad research — with a similar clean JSON schema and pay-per-ad pricing:

- [Google Ads Transparency Scraper](https://apify.com/adintel-labs/google-ads-transparency-scraper) — Search, Display & YouTube ads from the Google Ads Transparency Center
- [Facebook / Meta Ads Library Scraper](https://apify.com/adintel-labs/meta-ad-library-scraper) — Facebook & Instagram ads from the Meta Ad Library
- [TikTok Ads Scraper](https://apify.com/adintel-labs/tiktok-ad-library-scraper) — Creative Center Top Ads + EU Ad Library (Beta)
- [Bing / Microsoft Ad Library Scraper](https://apify.com/adintel-labs/microsoft-ad-library-scraper) — Bing search & shopping ads shown in the EU/EEA
- [Snapchat Ads Library Scraper](https://apify.com/adintel-labs/snapchat-ad-library-scraper) — Snap Ads Gallery creatives & impressions (EU + TR)
- [Pinterest Ads Library Scraper](https://apify.com/adintel-labs/pinterest-ad-repository-scraper) — Pinterest Ads Repository: reach & targeting (EU, NO, BR, TR)
- [Competitor Ad Tracker](https://apify.com/adintel-labs/competitor-ad-tracker) — scheduled alerts when competitors launch or stop ads on all 7 libraries

Browse them all at [apify.com/adintel-labs](https://apify.com/adintel-labs).

# Actor input Schema

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

Company / advertiser names as shown on LinkedIn (e.g. Shopify, HubSpot).

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

Words that appear in the ad copy.

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

Legal entity that paid for the ads ("Paid for by").

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

2-letter ISO codes where ads ran (e.g. DE, FR, US). EU countries unlock impression & targeting data. Empty = all.

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

Preset date range (custom range is used automatically when dates are set).

## `dateFrom` (type: `string`):

YYYY-MM-DD

## `dateTo` (type: `string`):

YYYY-MM-DD

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

Maximum ads returned for EACH advertiser / keyword / payer.

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

Open each ad's public detail page: full copy, CTA, landing URL, run dates, impressions, country split, targeting.

## `includeAiAnalysis` (type: `boolean`):

Adds aiAnalysis (angle, hook, offer, audience, emotional triggers, funnel stage) to each ad. Charged per successfully analysed ad only.

## `llmApiKey` (type: `string`):

OpenAI-compatible API key. Leave empty to use the Actor's built-in key (if configured).

## `llmModel` (type: `string`):

Model name for the OpenAI-compatible endpoint.

## `llmBaseUrl` (type: `string`):

OpenAI-compatible base URL (OpenAI, OpenRouter, Groq, xAI...).

## `detailConcurrency` (type: `integer`):

Parallel detail requests.

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

LinkedIn sits behind Cloudflare, which blocks most Apify datacenter IPs. RESIDENTIAL (default) is the reliable option; the Actor also auto-upgrades to RESIDENTIAL after a Cloudflare block.

## Actor input object example

```json
{
  "advertisers": [
    "shopify"
  ],
  "dateOption": "any",
  "maxResults": 50,
  "includeDetails": true,
  "includeAiAnalysis": false,
  "llmModel": "gpt-4o-mini",
  "llmBaseUrl": "https://api.openai.com/v1",
  "detailConcurrency": 3,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

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

Dataset of all LinkedIn Ad Library ads collected in this run.

## `runStats` (type: `string`):

Key-value store record with row counts, proxy details, and finish time.

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

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

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

```

## MCP server setup

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