# LinkedIn Ad Library Scraper (Targeting Data, No Login) (`locaihost/linkedin-ad-library`) Actor

Scrape LinkedIn's Ad Library by company page, name or keyword. Get ad text, headline, format, button, landing page, images and videos, plus run dates, impressions, share by country and targeting for EU ads. Filter by country and date. Only-new mode. No login. From $1.00 per 1,000 ads.

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

## Pricing

Pay per event

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 (Targeting Data, No Login)

Get every ad a company or a keyword runs on LinkedIn, straight from LinkedIn's public Ad Library, with the impressions, run dates and targeting LinkedIn publishes for ads shown in the EU.

### What people use it for

- **Competitor ad research:** every ad a rival runs on LinkedIn, with its text, headline, format, button, landing page and creative.
- **B2B creative swipe files:** pull hundreds of ads for a keyword ("payroll software", "cybersecurity webinar") with their images, videos, carousels and documents.
- **Targeting and reach intelligence:** for ads shown in the EU, LinkedIn publishes the impressions range, the share by country, the run dates, and which targeting (job, company, audience, location, language) the advertiser chose.
- **Who pays for what:** the "Paid for by" line shows the agency or entity behind each ad.
- **New-ad alerts:** schedule it daily with "Only new ads" on and get only the ads that appeared since the last run.

### Quick start

1. Paste a company's LinkedIn page link (or type its name) and press **Start**.
2. Or call it from code with input like this:

```json
{
    "advertisers": ["https://www.linkedin.com/company/hubspot", "Salesforce"],
    "keywords": ["payroll software"],
    "countries": ["DE", "FR"],
    "dateRange": "last-30-days",
    "maxAds": 100,
    "includeDetails": true
}
```

You can also search on linkedin.com/ad-library with any filters and paste the link into **Ad Library links**, or paste one ad's link to get that ad with its details.

### What data can I get?

| Field | What it is |
|---|---|
| `adId`, `adLibraryUrl` | The ad's Ad Library ID and link |
| `advertiserName`, `advertiserType`, `advertiserLogoUrl` | The company running the ad (members are shown as "Individual advertiser", see Limits) |
| `advertiserId`, `advertiserUrl` | The company's LinkedIn ID and page (with ad details) |
| `format`, `formatLabel`, `creativeType` | image, video, carousel, document, message, article, event, text and other formats |
| `headline`, `bodyText`, `description` | The ad's copy (the search page cuts long texts; ad details give the full text) |
| `ctaText`, `linkUrl`, `linkDomain` | The button and where the ad sends people (with ad details) |
| `imageUrls`, `videoUrls`, `thumbnailUrls`, `cards` | The creative files, and each card of a carousel |
| `documentTitle`, `documentPageCount` | Document ads: title and page count |
| `paidForBy` | Who paid for the ad (with ad details) |
| `firstShown`, `lastShown`, `daysShown` | When the ad ran (ads shown in the EU, with ad details) |
| `impressionsText`, `impressionsMin`, `impressionsMax` | Total impressions range, as text and as numbers (EU, with ad details) |
| `impressionsByCountry` | Share of impressions per country (EU, with ad details) |
| `targeting` | Languages and locations targeted or excluded, and which targeting categories were used (EU, with ad details) |
| `variants`, `detailsStatus` | Versions of the ad, and whether its detail page was read |
| `searchInput`, `searchCountries`, `scrapedAt` | Which search found the ad, and when |

One real row (image links and lists shortened):

```json
{
  "adId": "1617945314",
  "adLibraryUrl": "https://www.linkedin.com/ad-library/detail/1617945314",
  "advertiserName": "Zellis",
  "advertiserType": "business",
  "advertiserId": "12978257",
  "advertiserUrl": "https://www.linkedin.com/company/12978257/",
  "advertiserLogoUrl": "https://media.licdn.com/dms/image/v2/D4E0BAQGhP1klcZnzwg/company-logo_100_100/...",
  "format": "image",
  "formatLabel": "Single Image Ad",
  "creativeType": "SPONSORED_STATUS_UPDATE",
  "headline": "Imagine no more manual payroll stress 😮",
  "bodyText": "Your payroll team answers the same questions every cycle. The Zellis Intelligent Assistant handles those routine queries for you ✅",
  "bodyTruncated": false,
  "description": null,
  "ctaText": "Learn more",
  "linkUrl": "https://www.zellis.com/lp/enterprise-payroll-software/?utm_campaign=6732e597-fdc7-4701-8242-a53f4e9c7369&utm_medium=abm&utm_source=Influ2&utm_term=%2B583988",
  "linkDomain": "zellis.com",
  "imageUrls": ["https://media.licdn.com/dms/image/v2/D4E10AQFSjqhB64CsVQ/image-shrink_1280/..."],
  "videoUrls": [],
  "cards": [],
  "paidForBy": "Influ2",
  "firstShown": "2026-10-29",
  "lastShown": "2026-10-30",
  "daysShown": 2,
  "impressionsText": "< 1k",
  "impressionsMin": 0,
  "impressionsMax": 1000,
  "impressionsByCountry": [],
  "targeting": {
    "language": { "included": ["English"], "excluded": [] },
    "location": { "included": ["Glasgow", "Ireland", "Leeds", "Hamburg", "India", "Brazil"], "excluded": [] },
    "parameters": [
      { "parameter": "Audience", "targeted": true, "excluded": true },
      { "parameter": "Job", "targeted": false, "excluded": false }
    ]
  },
  "variants": 1,
  "detailsStatus": "read",
  "searchInput": "\"payroll software\"",
  "searchCountries": ["DE"],
  "scrapedAt": "2026-11-01T14:46:31.574Z"
}
```

### How much does it cost?

You pay per ad returned. Prices per 1,000:

| Event | Free and Starter | Scale | Business |
|---|---|---|---|
| Ad | $1.00 | $0.75 | $0.55 |
| Ad with details ($, only with "Ad details" on, or for a pasted ad link) | $1.50 | $1.125 | $0.825 |

Plus a one-time $0.00005 per run.

**Free:** companies that can't be found, searches with no matching ads, ads already returned by an earlier run (with "Only new ads" on), and the same ad found by two of your searches (charged once). With "Ad details" on, an ad whose detail page can't be read is charged as a plain ad.

Apify's free $5 monthly credit covers about 5,000 ads.

### Limits, stated up front

- **Public ads only, logged out.** This Actor reads what anyone sees on the Ad Library without an account. It never logs in and never asks for cookies.
- **Impressions, targeting and run dates exist only for ads shown in the EU.** LinkedIn publishes them there under EU rules; for ads shown only elsewhere those fields are empty, and no tool can fill them. Pick an EU country (or every country) to get them. The share by country appears up to 48 hours after an ad starts.
- **The Ad Library keeps one year of ads.** Older ads are not available.
- **Company names are matched exactly.** "SAP" finds the advertiser named SAP, not SAP partners. For an exact match every time, paste the company page link with its number (linkedin.com/company/1115).
- **Members are not named.** When an ad runs from a person's profile (thought-leader ads), the advertiser is shown as "Individual advertiser" with no profile link or photo. Message ads' senders are not included.
- **Image and video links are signed by LinkedIn and expire.** Download the files you want to keep.
- Pages are read 24 ads at a time, and each detail page is one more request, so 1,000 ads with details take several minutes.
- Free plan: up to 1,000 ads per run. Any paid Apify plan removes the cap.

### Only new ads, and scheduling

Turn on **Only new ads** and schedule the Actor (Apify Console, Schedules) daily or weekly. Each run remembers the ads it returned for the same searches and filters, and skips them for free, so you get only ads that appeared since the last run. Changing the companies, keywords or filters starts a fresh memory.

### Integrations

- **API:** run it and read results with the Apify API or the JavaScript and Python clients.
- **n8n and Make:** use the Apify node or module, pick this Actor, and pass the input above.
- **Agents (MCP):** add it to Apify's MCP server and call it from any MCP client.
- **Exports:** CSV, Excel, JSON, XML from the dataset, or straight into Google Sheets.

### FAQ

**How much will a run cost me?** 100 ads cost $0.10 on the Starter price, or $0.15 with ad details. The run's maximum charge (in the run options) caps it: the Actor stops cleanly when it is reached.

**Can I use it through the API?** Yes. Every input field works the same through the API, and results come back as JSON, CSV or Excel.

**Can agents use it?** Yes, through Apify's MCP server. It is paid per event, so an agent pays only for the ads it gets.

**Is it legal?** The Ad Library is a public transparency tool that LinkedIn publishes for anyone to read without an account, and this Actor only reads what a logged-out visitor sees. You are responsible for how you use the data; check the rules that apply to you.

**Why is a field empty?** LinkedIn does not show it for that ad. Impressions, targeting and run dates exist only for ads shown in the EU; the button, link and company page come from the detail page, so turn on "Ad details" to get them.

**Why did a run end with "No ads matched"?** Nothing in the Ad Library matched your search with those filters. Nothing was charged. Try every country, a wider date range, or a broader keyword.

### More from locaihost data

- [Facebook Ad Library Scraper](https://apify.com/locaihost/facebook-ad-library): Facebook and Instagram ads, with EU and UK audience data.
- [Google Ads Transparency Scraper](https://apify.com/locaihost/google-ads-transparency): every Google ad a brand runs, with only-new mode.
- [LinkedIn Company Scraper](https://apify.com/locaihost/linkedin-company): firmographics from public company pages.
- [Website Tech Stack Checker](https://apify.com/locaihost/domain-intel): email provider, DNS, SSL and tech for any domain.

Did it help? A rating on the Store helps other people find it.

**Support:** open an issue on this Actor's Issues tab. We answer issues within 24 hours.

# Changelog

This Actor's version history is a separate document: https://apify.com/locaihost/linkedin-ad-library/changelog.md

# Actor input Schema

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

Every ad a company runs. Paste its LinkedIn page link (linkedin.com/company/hubspot) or type its exact name. A page link with a number (linkedin.com/company/68529) is exact; a name or a link with a name matches the advertiser of that exact name.

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

Search the text of ads, as the Ad Library keyword box does. Each keyword is its own search.

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

Search on linkedin.com/ad-library with any filters, then paste the link here: its own filters are used as they are. A single ad's link (linkedin.com/ad-library/detail/...) returns that ad with its details.

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

Ads shown in these countries. Empty means every country. Impressions, targeting and run dates are only published for ads shown in the EU, so pick an EU country to get them.

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

Ads shown in this period. The Ad Library keeps one year of ads.

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

YYYY-MM-DD, or a relative "30 days" / "2 weeks" / "3 months". Setting a date switches the range to custom.

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

YYYY-MM-DD, or a relative "7 days". Empty means today.

## `maxAds` (type: `integer`):

Stop each company, keyword or link after this many ads. 0 means every ad the search has.

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

Open each ad's detail page: the full ad text, button, destination link, the advertiser's company page and ID, who paid, and for ads shown in the EU the run dates, impressions range, impressions by country and targeting. Ads whose detail page was read are charged at the ad details price.

## `onlyNew` (type: `boolean`):

Skip ads an earlier run with the same searches and filters already returned (free). Turn on for scheduled runs to get only ads that appeared since.

## Actor input object example

```json
{
  "advertisers": [
    "https://www.linkedin.com/company/hubspot",
    "Salesforce",
    "https://www.linkedin.com/company/1035"
  ],
  "keywords": [
    "payroll software",
    "cybersecurity webinar"
  ],
  "startUrls": [
    "https://www.linkedin.com/ad-library/search?accountOwner=hubspot&countries=DE"
  ],
  "dateRange": "all",
  "startDate": "30 days",
  "maxAds": 20,
  "includeDetails": false,
  "onlyNew": false
}
```

# Actor output Schema

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

One row per ad: advertiser, format, headline, text, button, link, images and videos, run dates and impressions.

## `transparency` (type: `string`):

Company page, paid for by, run dates, impressions by country and targeting, where LinkedIn publishes them.

## `full` (type: `string`):

Every field of every ad, including carousel cards and document pages.

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

Ads per search, companies not found, skipped input, pages read and cost.

# 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": [
        "https://www.linkedin.com/company/hubspot"
    ],
    "maxAds": 20
};

// Run the Actor and wait for it to finish
const run = await client.actor("locaihost/linkedin-ad-library").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": ["https://www.linkedin.com/company/hubspot"],
    "maxAds": 20,
}

# Run the Actor and wait for it to finish
run = client.actor("locaihost/linkedin-ad-library").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": [
    "https://www.linkedin.com/company/hubspot"
  ],
  "maxAds": 20
}' |
apify call locaihost/linkedin-ad-library --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,locaihost/linkedin-ad-library"
        }
    }
}
```

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/icwjCAa2aCUKfCnPf/builds/A1Wy1DXzlRlS4eWDr/openapi.json
