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

See every ad a company runs on LinkedIn: ad text, images, videos, click-through links with UTM campaign tags and who paid, from the official LinkedIn Ad Library. EU ads add run dates, impressions, countries and targeting. Track new competitor ads. No login.

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

## Pricing

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

See every ad a company runs on LinkedIn. Type a company name, paste its LinkedIn page, or search a keyword, and get the ad text, images, videos, click-through links and who paid, straight from the official LinkedIn Ad Library.

- **All the ad content in plain fields:** headline, full ad text, call-to-action button, landing page with its UTM campaign tags, image and video files, carousel cards, event and document ads.
- **EU transparency data when LinkedIn publishes it:** for ads shown in the EU you also get the run dates, total impressions, impressions by country and the advertiser's targeting (languages, locations, and whether job, company, audience or interest targeting was used).
- **No LinkedIn account, login or cookies.** The Actor handles LinkedIn's bot check for you.

**Try it now:** the input is already filled in (HubSpot's 20 newest ads with details). Click **Start** and the ads appear in a table you can export to Excel, CSV or JSON. That example costs about two cents, which the $5 of free monthly credit on Apify's free plan covers.

**Price:** from **$0.30 per 1,000 ads**, and you pay only for ads you get. The full price table is in the Pricing section below.

### Example result

One ad, shortened (a real row from a run on 2026-11-13, advertiser search `Microsoft`, country Germany):

```json
{
  "advertiserName": "ScriptRunner - The #1 Microsoft Automation Platform",
  "paidBy": "ScriptRunner Software GmbH",
  "formatLabel": "Single Image Ad",
  "headline": "When is it time to stop building IT yourself?",
  "body": "Rail operator HLB shares why it moved beyond DIY – and how it kept its PowerShell expertise along the way. Real use cases, live on 25 Nov, 3 pm CET.",
  "callToAction": "Register",
  "landingDomain": "scriptrunner.com",
  "utm": { "utm_campaign": "FrankenScript", "utm_medium": "paidsocial", "utm_term": "webinar" },
  "firstShown": "2026-11-02",
  "lastShown": "2026-11-13",
  "daysRunning": 12,
  "impressionsText": "1k-5k",
  "topCountry": "United Kingdom",
  "targeting": { "location": { "includes": ["Germany", "Switzerland", "Netherlands", "Austria", "Belgium", "United Kingdom"] } },
  "adUrl": "https://www.linkedin.com/ad-library/detail/1603768123"
}
```

### What you get

The Actor reads the public [LinkedIn Ad Library](https://www.linkedin.com/ad-library/), where LinkedIn shows the ads that companies and people run on LinkedIn. You can search it four ways, all in one run:

- **Advertisers:** a company name (`HubSpot`), a LinkedIn company page link (`linkedin.com/company/hubspot`) or a company ID (`1035`). A page link or ID returns exactly that company's ads.
- **Keywords:** words in the ad (`webinar`, `"AI agent"`).
- **Paid by:** the company that paid for the ads, which is often a media agency.
- **Ad Library links:** search links copied from your browser (every filter in the link is used) and single ad links.

Each ad row has the advertiser (name, LinkedIn company ID and page, logo), who paid, the ad format, headline, text and image. With **Add ad details** (on by default) the Actor also opens each ad's page and adds the full text, the button, the click-through link with its UTM tags, the video file, carousel cards, event and document details, and, for ads shown in the EU, the run dates, impressions, impressions by country and targeting.

> This Actor is an independent tool. It is not made, endorsed or sponsored by LinkedIn. It reads LinkedIn's public Ad Library pages.

### What you can do with it

- **Spy on competitor LinkedIn ads.** Every ad a competitor runs, with the copy, creatives, offers and landing pages.
- **See their campaign structure.** UTM tags show campaign names, sources and terms; `paidBy` shows which agency runs the account.
- **See how they target in Europe.** Languages, countries and whether they target by job title, company, audience lists or interests, plus impressions and the countries where the ad was seen.
- **Find long-running ads.** `daysRunning` and `isActive` show which ads a company keeps paying for, which usually means they work.
- **Get new-ad alerts.** Turn on "Only new ads", schedule the run daily or weekly, and get only ads that appeared since the last run.
- **Build swipe files and AI training sets.** B2B ad copy, hooks, headlines and buttons in bulk.
- **Find who advertises on a topic.** A keyword search shows every company running ads about it, with the `ADVERTISERS` summary per company.

### Who uses it

- B2B marketers and demand-generation teams checking competitor campaigns
- LinkedIn ads managers and agencies looking for creative ideas and offers
- Sales teams finding companies that are actively spending on LinkedIn (a buying signal)
- SaaS founders and product marketers tracking positioning and launches
- Recruiters and employer-branding teams watching competitors' hiring ads
- Researchers and journalists studying online advertising in Europe

### Why this scraper

- **Four ways to search in one run:** company names, company page links or IDs, keywords, payers, and pasted Ad Library links. An ad found by more than one search is delivered and charged once.
- **Exact company, not namesakes:** a company page link is turned into LinkedIn's company ID, so you get that company's ads only. For names there is an optional exact-name filter (LinkedIn's name search also returns partners and pages with the same word in their name).
- **Works through LinkedIn's bot check:** LinkedIn blocks datacenter IPs and many residential IPs. The Actor keeps the residential IPs that pass, paces each one under LinkedIn's rate limit and retries blocked requests on new IPs, without you setting anything up.
- **Readable EU data:** impressions as numbers (`impressionsMin`, `impressionsMax`), impressions by country as a list, targeting as include/exclude lists, and run dates with `daysRunning` and `isActive`.
- **Campaign insight from links:** landing domain and UTM tags are split out of the click-through link.
- **Every ad format:** single image, video (direct MP4 link), carousel (every card), document, event, article, message and conversation (InMail) ads with all reply buttons, spotlight, follower and jobs ads.
- **Filters that LinkedIn lacks:** ad format, minimum or maximum impressions and exact advertiser name, on top of LinkedIn's own country, date, targeting and sort filters.
- **A summary per advertiser** (`ADVERTISERS` record): ads, active ads, formats, payers, first and last dates, the longest-running ad, countries, landing domains and UTM campaigns.
- **Pay only for what you get:** error rows, duplicates, ads left out by filters or by "Only new ads", and failed detail lookups are free.

#### Coming from another LinkedIn ads scraper?

| Common problem | How this Actor handles it |
| --- | --- |
| Runs fail or time out with "403 blocked" since LinkedIn added its bot check | The Actor finds residential IPs that pass, keeps them, paces them and retries blocked requests on new IPs. The run stops cleanly before its timeout and keeps everything collected. |
| A company name returns ads from other companies | Paste the company's LinkedIn page and get exactly its ads, or use the exact-name filter. |
| Targeting comes as a long block of text | Languages and locations are lists, and each targeting type (job, company, audience, interests, education, demographic) is a true/false field. |
| Impressions are text like "1k-5k" | You also get them as numbers, plus impressions by country with shares. |
| You pay extra for a residential proxy or have to bring your own | Proxy traffic is included in the price. |
| You pay again for ads you already have | "Only new ads" remembers what each search delivered and charges only for new ones. |

### How to use

1. Click **Try for free** (or **Start**) on this page.
2. Type company names or paste LinkedIn company pages in **Advertisers**, or fill **Keywords in the ad**, **Paid by** or **LinkedIn Ad Library links**.
3. Optional: pick **Countries**, a **Date range** or **Ad formats**. Pick an EU country to get run dates, impressions and targeting.
4. Click **Start**. Ads appear in the **Output** tab as they are collected. Download them as Excel, CSV, JSON or HTML, or use the API.

#### Input examples

A company's 20 newest ads with details (the prefilled example):

```json
{
  "advertisers": ["HubSpot"],
  "maxAdsPerSearch": 20
}
```

Three competitors by name and LinkedIn page, 25 ads each:

```json
{
  "advertisers": ["Salesforce", "https://www.linkedin.com/company/stripe", "Notion"],
  "maxAdsPerSearch": 25
}
```

Ads shown in Germany this month, with run dates, impressions and targeting, only from the advertiser with exactly this name:

```json
{
  "advertisers": ["Microsoft"],
  "countries": ["DE"],
  "dateRange": "current-month",
  "advertiserMatch": "exact",
  "maxAdsPerSearch": 150
}
```

Video and image ads about a topic in the EU that reached at least 10,000 people and target by job:

```json
{
  "keywords": ["cybersecurity"],
  "countries": ["DE", "FR", "NL"],
  "adFormats": ["VIDEO", "IMAGE"],
  "minImpressions": 10000,
  "targetingIncludes": ["JOB"],
  "maxAdsPerSearch": 50
}
```

A custom date range, oldest first:

```json
{
  "keywords": ["webinar"],
  "startDate": "2026-10-01",
  "endDate": "2026-10-31",
  "sortBy": "oldest"
}
```

Links from your browser, single ads and an agency (payer):

```json
{
  "adLibraryUrls": [
    { "url": "https://www.linkedin.com/ad-library/search?accountOwner=nvidia&countries=FR&dateOption=current-year" },
    { "url": "https://www.linkedin.com/ad-library/detail/1639063824" }
  ],
  "adUrls": ["1672061966"],
  "payers": ["Iprospect.com Inc."],
  "maxAdsPerSearch": 10
}
```

A fast list without details (cheapest, about a minute for 500 ads):

```json
{
  "keywords": ["webinar"],
  "maxAdsPerSearch": 500,
  "includeDetails": false
}
```

Weekly new-ad alerts (schedule this input):

```json
{
  "advertisers": ["https://www.linkedin.com/company/hubspot", "https://www.linkedin.com/company/salesforce"],
  "onlyNewAds": true,
  "watchlistName": "crm-rivals"
}
```

#### Input fields

| Field | What it does |
| --- | --- |
| `advertisers` | Company names, LinkedIn company page links (also showcase pages) or company IDs. |
| `keywords` | Words in the ad. Each keyword is one search. |
| `payers` | The "Paid for by" company, e.g. an agency. |
| `adLibraryUrls` | Ad Library search links (their filters are used) or single ad links. |
| `adUrls` | Single ad links or ad IDs. A single ad always comes with its details. |
| `countries` | Two-letter codes such as `US`, `GB`, `DE`. Empty = all countries. |
| `dateRange` | `all-time` (default), `last-30-days`, `current-month`, `current-year`, `last-year` or `custom`. |
| `startDate`, `endDate` | A custom range: `2026-10-01` or `30 days`. LinkedIn's custom range covers the last 12 months and ends yesterday. |
| `adFormats` | `IMAGE`, `VIDEO`, `CAROUSEL`, `DOCUMENT`, `EVENT`, `ARTICLE`, `MESSAGE`, `TEXT`, `SPOTLIGHT`, `FOLLOWER`, `JOBS`, `OTHER`. |
| `minImpressions`, `maxImpressions` | Only ads with at least / at most this many impressions (EU and Brazil ads; others are left out free). |
| `targetingIncludes`, `targetingExcludes` | Only ads whose targeting uses / excludes `LANGUAGE`, `LOCATION`, `AUDIENCE`, `DEMOGRAPHIC`, `COMPANY`, `EDUCATION`, `JOB`, `INTERESTS_AND_TRAITS` (LinkedIn applies this to EU and Brazil ads). |
| `advertiserMatch` | `linkedin` (default, as LinkedIn returns them) or `exact` (advertiser name must match the name you typed). |
| `sortBy` | `newest` (default) or `oldest`. |
| `maxAdsPerSearch` | Ads per advertiser, keyword, payer or link (default 100). |
| `maxResults` | Stop after this many ads in total. |
| `includeDetails` | Open each ad's page for the full details (default on). |
| `onlyNewAds`, `watchlistName` | Deliver only ads not seen in earlier runs of the same watchlist. |
| `maxConcurrency` | How many proxy IPs work at once (default 8, up to 32). |

### Output

Each ad is one row. A row with details (real row from 2026-11-13, advertiser search `Microsoft`, Germany; long links shortened):

```json
{
  "type": "ad",
  "adId": "1603768123",
  "adUrl": "https://www.linkedin.com/ad-library/detail/1603768123",
  "advertiserName": "ScriptRunner - The #1 Microsoft Automation Platform",
  "advertiserCompanyId": "16217038",
  "advertiserUrl": "https://www.linkedin.com/company/16217038",
  "advertiserType": "company",
  "advertiserProfileUrl": null,
  "advertiserLogoUrl": "https://media.licdn.com/dms/image/v2/.../company-logo_100_100/...",
  "paidBy": "ScriptRunner Software GmbH",
  "format": "SPONSORED_STATUS_UPDATE",
  "formatLabel": "Single Image Ad",
  "headline": "When is it time to stop building IT yourself?",
  "body": "Rail operator HLB shares why it moved beyond DIY – and how it kept its PowerShell expertise along the way. Real use cases, live on 25 Nov, 3 pm CET.",
  "bodyPreview": "Rail operator HLB shares why it moved beyond DIY – and how it kept its PowerShell expertise along the way. Real use case…",
  "callToAction": "Register",
  "callToActionOptions": [],
  "clickUrl": "https://www.scriptrunner.com/event/powershell-automation-beyond-diy-hlb?utm_campaign=FrankenScript&utm_source=linkedin&utm_medium=paidsocial&utm_term=webinar&utm_content=DYI+November&utm_id=916106903&hsa_acc=...&hsa_cam=916106903&hsa_ad=1603890963",
  "landingDomain": "scriptrunner.com",
  "utm": {
    "utm_campaign": "FrankenScript",
    "utm_source": "linkedin",
    "utm_medium": "paidsocial",
    "utm_term": "webinar",
    "utm_content": "DYI November",
    "utm_id": "916106903"
  },
  "imageUrl": "https://media.licdn.com/dms/image/v2/D4D10AQFv8DC-drpfLw/image-shrink_1280/...",
  "imageUrls": ["https://media.licdn.com/dms/image/v2/D4D10AQFv8DC-drpfLw/image-shrink_1280/..."],
  "videoUrl": null,
  "videoThumbnailUrl": null,
  "senderName": null,
  "firstShown": "2026-11-02",
  "lastShown": "2026-11-13",
  "daysRunning": 12,
  "isActive": true,
  "impressionsText": "1k-5k",
  "impressionsMin": 1000,
  "impressionsMax": 5000,
  "topCountry": "United Kingdom",
  "impressionsByCountry": [
    { "country": "United Kingdom", "share": 39, "shareText": "39%" },
    { "country": "Netherlands", "share": 18, "shareText": "18%" },
    { "country": "Germany", "share": 17, "shareText": "17%" },
    { "country": "Switzerland", "share": 11, "shareText": "11%" },
    { "country": "Belgium", "share": 10, "shareText": "10%" },
    { "country": "Austria", "share": 4, "shareText": "4%" }
  ],
  "targeting": {
    "language": { "includes": ["English"], "excludes": [], "text": "Targeting includes English" },
    "location": { "includes": ["Germany", "Switzerland", "Netherlands", "Austria", "Belgium", "United Kingdom"], "excludes": [], "text": "Targeting includes Germany, Switzerland and 4 others" }
  },
  "targetingFacets": {
    "audience": { "targeted": true, "excluded": false },
    "demographic": { "targeted": false, "excluded": false },
    "company": { "targeted": true, "excluded": true },
    "education": { "targeted": false, "excluded": false },
    "job": { "targeted": true, "excluded": false },
    "interestsAndTraits": { "targeted": false, "excluded": false }
  },
  "hasEuTransparencyData": true,
  "carouselCards": [],
  "event": null,
  "document": null,
  "versions": 1,
  "ranText": "Ran from Nov 2, 2026 to Nov 13, 2026",
  "detailsStatus": "ok",
  "position": 25,
  "input": "Microsoft",
  "inputType": "advertiser",
  "searchFilters": "DE",
  "scrapedAt": "2026-11-13T12:04:22Z",
  "schemaVersion": 1
}
```

#### Main fields

| Field | Meaning |
| --- | --- |
| `advertiserName`, `advertiserCompanyId`, `advertiserUrl` | The company (or person, for thought-leader ads: `advertiserType` = `person`, `advertiserProfileUrl`) shown on the ad. |
| `paidBy` | Who paid for the ad. Often a subsidiary or a media agency. |
| `format`, `formatLabel` | LinkedIn's ad type and its name, e.g. `SPONSORED_VIDEO` / `Video Ad`. |
| `headline`, `body`, `bodyPreview` | Headline, full ad text (with details) and the shortened text from the search results. |
| `callToAction`, `callToActionOptions` | The button text; message ads list every reply button. |
| `clickUrl`, `landingDomain`, `utm` | Where the ad sends people, the domain and the UTM tags of that link. |
| `imageUrl`, `imageUrls`, `videoUrl`, `videoThumbnailUrl`, `carouselCards` | Media links. `videoUrl` is the largest MP4. |
| `event`, `document` | Event ads: name, time, place, organizer and link. Document ads: page images. |
| `firstShown`, `lastShown`, `daysRunning`, `isActive` | EU ads: when the ad ran. `isActive` = shown today or yesterday. |
| `impressionsText`, `impressionsMin`, `impressionsMax` | EU ads: LinkedIn's impressions range and the same range as numbers. |
| `impressionsByCountry`, `topCountry` | EU ads: share of impressions per country. |
| `targeting`, `targetingFacets` | EU ads: languages and locations included or excluded, and which other targeting types were used. |
| `hasEuTransparencyData` | Whether LinkedIn published dates, impressions or targeting for this ad. |
| `detailsStatus` | `ok`, `not_found` (the ad was removed) or `failed: ...` (not charged). |
| `position` | Rank of the ad in the search results. |

The Output tab has ready views: **Ads**, **Dates, impressions and countries (EU ads)**, **Links and media**, and **All rows incl. errors**.

The run's key-value store also has `SOURCES` (per search: the Ad Library link, company ID, LinkedIn's total, pages read, why it stopped), `ADVERTISERS` (per advertiser: ads, active ads, formats, payers, dates, the longest-running ad, countries, landing domains and UTM campaigns) and `SUMMARY` (totals and charges).

### Pricing

Pay per event: you pay for results, not for the Apify platform usage or the proxy.

| Event | Free plan | Bronze | Silver | Gold and up |
| --- | --- | --- | --- | --- |
| Ad (each ad row) | $0.60 / 1,000 | $0.50 / 1,000 | $0.40 / 1,000 | $0.30 / 1,000 |
| Ad details (default on; per ad whose page was read) | $0.60 / 1,000 | $0.50 / 1,000 | $0.40 / 1,000 | $0.30 / 1,000 |
| Actor start (once per run, per GB of memory; the default 512 MB counts as one) | $0.002 | $0.002 | $0.002 | $0.002 |

**Free:** error rows, `no_ads` rows, duplicates, ads left out by your filters or by "Only new ads", and details that could not be read.

Examples at the Bronze price:

- 1,000 ads with details: **$1.00**.
- 1,000 ads without details: **$0.50**.
- The prefilled example (20 ads with details): **$0.022**.

Set a spending limit when you start the run (or in the API with `maxTotalChargeUsd`). The run stops cleanly when the limit is reached and keeps everything collected.

### Good to know

- **Dates, impressions and targeting exist only for ads shown in the EU** (LinkedIn publishes them under the EU Digital Services Act; Brazil ads have them too). For other ads LinkedIn shows the ad itself, the advertiser and who paid. In our HubSpot test 5 of 20 ads had EU data; filtering by an EU country gave EU data on every ad.
- **Company names are LinkedIn's own advertiser search,** which also returns pages with the same word (a `Microsoft` search returned 59 Microsoft ads among 150). Use a company page link or `advertiserMatch: exact` for one company only.
- **Impressions and audiences are LinkedIn's ranges** (such as `1k-5k`). Use them as a scale, not exact numbers.
- **Speed:** each IP is paced to stay under LinkedIn's rate limit. In our runs: 20 ads with details in about 50 seconds, 150 ads with details in about 80 seconds, 500 ads without details in about a minute. More parallel connections make big runs faster.
- **Filters the Actor applies itself** (ad format, impressions, exact name) check more ads than they deliver. The cybersecurity example above checked 454 ads in about 3.5 minutes to deliver 50; the ads left out are free. With an impressions filter a search checks at most 4 times Max ads per search (at least 200 ads) and then stops (`impressions_check_limit` in `SOURCES`).
- **Custom date ranges** cover the last 12 months and end yesterday (LinkedIn's rule).
- **Media links** are LinkedIn CDN links that can expire after some time. Download what you need soon after the run.
- **Only new ads:** the first run delivers up to "Max ads per search" and remembers every ad it saw. Later runs read the newest ads until they reach ads seen before, so a check with nothing new costs one or two pages and no ad charges.
- Only public data from LinkedIn's Ad Library is collected. Ads can contain public names of advertisers and of people who post thought-leader ads.

### FAQ

**Do I need a LinkedIn account, cookies or an API key?** No.

**Do I need to set up a proxy?** No. The Actor uses Apify's residential proxy by default, and proxy traffic is included in the price. If you pick Apify's automatic (datacenter) proxy, the Actor switches to residential, because LinkedIn's Ad Library blocks datacenter IPs. Proxy groups and proxy URLs you choose yourself are used as given.

**How do I get all ads of one company?** Paste its LinkedIn page (`https://www.linkedin.com/company/hubspot`) in Advertisers and set Max ads per search high enough. The `SOURCES` record shows LinkedIn's total for the search.

**Why do some ads have no dates or impressions?** LinkedIn publishes those only for ads shown in the EU (see `hasEuTransparencyData`). Add an EU country to the search to get only such ads.

**Why did a search return fewer ads than LinkedIn's total?** The search stops at Max ads per search. `SOURCES` shows the pages read and why each search stopped.

**Which memory should I use?** The default 512 MB is enough. More memory does not speed it up, and the start fee is charged per GB.

**Can I schedule it?** Yes. Save your input as a task, add a schedule, and turn on "Only new ads".

### Use it from code, n8n, Make or Zapier

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_APIFY_TOKEN>")
run = client.actor("panix/linkedin-ad-library-scraper").call(run_input={
    "advertisers": ["https://www.linkedin.com/company/hubspot"],
    "countries": ["DE"],
    "maxAdsPerSearch": 100,
})
for ad in client.dataset(run.default_dataset_id).iterate_items():
    print(ad.get("advertiserName"), ad.get("headline"), ad.get("impressionsText"), ad.get("adUrl"))
```

JavaScript (`npm install apify-client`):

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });
const run = await client.actor('panix/linkedin-ad-library-scraper').call({
    keywords: ['webinar'],
    maxAdsPerSearch: 100,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items.length, items[0]);
```

One HTTP call that runs the Actor and returns the rows:

```text
POST https://api.apify.com/v2/acts/panix~linkedin-ad-library-scraper/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>
Content-Type: application/json

{"advertisers": ["HubSpot"], "maxAdsPerSearch": 20}
```

- **n8n:** use the Apify node (Run an Actor and get dataset items) with `panix/linkedin-ad-library-scraper`, or an HTTP Request node with the URL above.
- **Make:** the Apify app, module "Run an Actor", then "Get Dataset Items".
- **Zapier:** the Apify app, action "Run Actor", then "Fetch Dataset Items"; send new ads to Slack, Sheets or email.
- **AI agents:** the Actor works through the Apify MCP server like any other Store Actor.

### Need something else?

Open an issue on the Actor's **Issues** tab. Requests for new fields and filters are welcome.

# Actor input Schema

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

Company names (HubSpot), LinkedIn company page links (linkedin.com/company/hubspot) or company IDs (1035). A company page link or ID gets exactly that company's ads; a name uses LinkedIn's advertiser-name search, which can also return similarly named advertisers (see Advertiser name match).

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

Words in the ad text or headline, e.g. webinar or "AI agent". Each keyword is one search.

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

Name of the company that paid for the ads (the 'Paid for by' line), e.g. an agency.

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

Search links copied from linkedin.com/ad-library (all filters in the link are used) or single ad links (linkedin.com/ad-library/detail/123). A single ad always comes with its details.

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

Only ads shown in these countries. Empty = all countries. Pick an EU country (e.g. Germany) to get ads with run dates, impressions and targeting.

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

When the ads ran. LinkedIn keeps ads of the last 12 months searchable by date.

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

First day, e.g. 2026-10-01, or a period such as '30 days'. Setting a date switches the date range to custom.

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

Last day, e.g. 2026-10-31. Empty = yesterday (LinkedIn's custom range ends before today).

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

Keep only these ad formats. Empty = all. Ads left out by this filter are free.

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

Only ads with at least this many impressions, e.g. 10000. LinkedIn applies this filter to ads shown in the EU and Brazil only.

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

Only ads with at most this many impressions.

## `targetingIncludes` (type: `array`):

Only ads whose advertiser targeted by these criteria, e.g. Job to find ads aimed at job titles.

## `targetingExcludes` (type: `array`):

Only ads whose advertiser excluded people by these criteria.

## `advertiserMatch` (type: `string`):

LinkedIn's name search also returns advertisers whose name contains the word (Oracle -> Oracle NetSuite partners). Exact keeps only ads of advertisers with exactly this name (case and Inc./Ltd. ignored); the others are left out free.

## `sortBy` (type: `string`):

Newest ads first (default) or oldest first.

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

How many ads to collect for each advertiser, keyword, payer or link.

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

Stop after this many ads across all searches. Empty = no total limit.

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

Opens each ad's page for the full ad text, click-through link with UTM tags, call to action, video file, carousel cards, company ID and who paid; for ads shown in the EU also run dates, impressions, impressions by country and targeting. Charged per ad with details; failed lookups are free.

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

Remember the ads of every search and deliver only ads not seen before. The first run delivers ads as usual and sets the baseline. Schedule the run daily or weekly.

## `watchlistName` (type: `string`):

Keeps separate memories for different monitoring tasks (letters, digits, - and \_).

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

Leave as is: LinkedIn's Ad Library blocks datacenter IPs, so the Actor uses Apify residential proxy and keeps the IPs that pass LinkedIn's bot check. Proxy traffic is included in the price.

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

How many proxy IPs work at the same time. Each one is paced to stay under LinkedIn's rate limit, so more connections make big runs faster.

## Actor input object example

```json
{
  "advertisers": [
    "HubSpot"
  ],
  "dateRange": "all-time",
  "advertiserMatch": "linkedin",
  "sortBy": "newest",
  "maxAdsPerSearch": 20,
  "includeDetails": true,
  "onlyNewAds": false,
  "watchlistName": "default",
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  },
  "maxConcurrency": 8
}
```

# Actor output Schema

## `results` (type: `string`):

All delivered rows. Filter by the type column: ad, no_ads or error. no_ads and error rows are free.

## `sources` (type: `string`):

The Ad Library search link, LinkedIn's total ad count, pages read, ads delivered and why each search stopped.

## `advertisers` (type: `string`):

Ads delivered per advertiser with formats, active ads, dates, countries, landing domains, UTM campaigns and the longest-running ad.

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

Totals, charged events, ads left out per filter, request statistics and warnings.

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

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

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

```

## MCP server setup

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