# LinkedIn Ad Library Scraper - Ads, Landing Pages & Targeting (`renzomacar/linkedin-ad-library-scraper`) Actor

Search the public LinkedIn Ad Library by company or keyword and get every ad: full copy, headline, call to action, landing page, image or video, who paid, run dates, impressions and targeting. No login, no cookies, details included.

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

## Pricing

$2.00 / 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.

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, Landing Pages & Targeting

Type a company name or a keyword and get the ads LinkedIn shows for it in its public Ad Library, one clean row per ad: full ad text, headline, call to action, landing page, images or video, the advertiser, who paid for it and, for ads shown in the EU, the run dates, impressions by country and the targeting used.

No LinkedIn account, no cookies, no browser. Every ad is opened for its full details and that is already in the price.

### What you can do with it

- **Competitor ad research**: see every ad a company is running on LinkedIn, the copy it uses and the pages it sends people to.
- **Landing page and offer tracking**: `destinationUrl` shows where each ad leads, with the advertiser's own UTM parameters.
- **Find who advertises on a topic**: search by keyword ("payroll software", "cybersecurity") and get the advertisers buying that audience.
- **B2B lead lists**: companies paying for LinkedIn ads have a marketing budget. `advertiserName`, `advertiserUrl` and `paidBy` give you the list.
- **Targeting and reach analysis**: for ads shown in the EU, see the languages, locations and audience segments targeted, and the impression range per country.
- **Creative libraries and AI agents**: flat JSON with copy, headline and media URLs, ready for a sheet, a database or a prompt.

### Input

| Field | What it does |
| --- | --- |
| **Advertisers** | Company names as they appear on LinkedIn, one per line. |
| **Keywords** | Words to look for in the ad text, one search per line. |
| **Ad Library search URLs** | Optional. Search URLs copied from linkedin.com/ad-library. |
| **Ads per search** | 1 to 10,000, newest first. |
| **Countries** | Optional two-letter codes (US, GB, DE...) to keep only ads shown there. |
| **Dates** | Any time, last 30 days, this month, this year, last year or a custom range. |
| **Open each ad for full details** | On by default. Turn it off for a faster list with advertiser, format, start of the text and image only. |

```json
{
    "advertisers": ["HubSpot"],
    "keywords": ["payroll software"],
    "maxAds": 100,
    "countries": ["FR", "DE"],
    "dateRange": "last30Days"
}
```

### Output

One row per ad. This is a real row (long URLs shortened here):

```json
{
    "search": "HubSpot",
    "searchType": "advertiser",
    "position": 1,
    "adId": "1609336373",
    "adUrl": "https://www.linkedin.com/ad-library/detail/1609336373",
    "format": "Single Image Ad",
    "creativeType": "SPONSORED_STATUS_UPDATE",
    "advertiserName": "HubSpot",
    "advertiserUrl": "https://www.linkedin.com/company/68529",
    "advertiserLogoUrl": "https://media.licdn.com/dms/image/v2/.../hubspot_logo",
    "paidBy": "HubSpot, Inc.",
    "text": "Vous envisagez de quitter Salesforce ou Marketo ? 🚀 Le 19 novembre à 11h, découvrez HubSpot en action et préparez votre changement de plateforme.",
    "headline": "Simplifiez votre marketing avec HubSpot",
    "description": "Réservez votre place maintenant.",
    "callToAction": "En savoir plus",
    "destinationUrl": "https://offers.hubspot.fr/demo-en-direct-passer-de-salesforce-a-hubspot?utm_campaign=...&utm_source=linkedin&utm_medium=paidsocial",
    "imageUrl": "https://media.licdn.com/dms/image/v2/.../image-shrink_1280/...",
    "imageUrls": ["https://media.licdn.com/dms/image/v2/.../image-shrink_1280/..."],
    "videoUrl": null,
    "slides": null,
    "availability": "Ran from Nov 5, 2026 to Nov 12, 2026",
    "startDate": "2026-11-05",
    "endDate": "2026-11-12",
    "impressionsText": "20k-30k",
    "impressionsMin": 20000,
    "impressionsMax": 30000,
    "impressionsByCountry": [
        { "country": "France", "share": "100%" },
        { "country": "Canada", "share": "< 1%" }
    ],
    "targeting": {
        "language": { "included": ["Français"] },
        "location": { "included": ["Paris et périphérie", "Lyon", "Nantes", "Puteaux"] },
        "parameters": [
            { "parameter": "Audience", "targeted": false, "excluded": true },
            { "parameter": "Company", "targeted": false, "excluded": true },
            { "parameter": "Job", "targeted": true, "excluded": false }
        ]
    },
    "detailsLoaded": true,
    "scrapedAt": "2026-11-17T04:01:56.621Z"
}
```

- `format` is LinkedIn's own label: Single Image Ad, Video Ad, Carousel Ad, Document Ad, Message Ad, Event Ad, Spotlight Ad, LinkedIn Article Ad and others.
- `slides` lists each card of a carousel ad with its title, link and image.
- `videoUrl` is the direct video file for video ads; the cover image is in `imageUrls`.
- `paidBy` is the legal entity that paid for the ad, which is often different from the page that shows it (agencies, resellers, parent companies).
- `impressionsMin` and `impressionsMax` are the two ends of the range LinkedIn publishes ("20k-30k").

In our tests, 900 ads with full details for three searches took 5 minutes, and 100 ads without details took 13 seconds.

### Price

**$2 per 1,000 ads, full details included.** You pay for the rows you get and nothing for starting a run. Proxy traffic is included. A run that returns no ads is not charged. Set a maximum cost per run and the Actor stops when it is reached.

### Good to know

- **Dates, impressions and targeting exist only for ads shown in the EU.** LinkedIn publishes them under the EU's transparency rules. For ads shown only elsewhere, those fields are `null` and you still get the copy, creative, landing page, advertiser and payer. Add EU countries in **Countries** when you need them on every row.
- **Advertiser search is loose**: "Salesforce" also returns partners and resellers with Salesforce in their name. Filter by `advertiserName` or `advertiserUrl` for an exact company.
- **Impressions are ranges**, not exact numbers, and LinkedIn does not publish spend.
- **Some formats have no landing page**: document, message and follow ads keep the user inside LinkedIn, so `destinationUrl` is `null`.
- **Message ads** show placeholders such as `%FIRSTNAME%` exactly as the advertiser wrote them.
- Media URLs are LinkedIn's own and expire after some weeks; download the files if you need to keep them.
- A search with no matches returns no rows and the run continues with the next search.
- The run summary (ads per search and LinkedIn's reported match count) is saved under the key `SUMMARY` in the run's key-value store.

### FAQ

**Do I need a LinkedIn account or cookies?** No. The Actor reads the public Ad Library, the same pages anyone can open without signing in.

**Do I have to configure proxies?** No. The connection is chosen automatically and its cost is part of the price per ad.

**Can I get all ads of one company?** Yes. Put the company in **Advertisers** and raise **Ads per search**. The log shows how many ads LinkedIn reports for each search.

**Can I monitor competitors every week?** Yes. Schedule the Actor with **Dates** set to "Last 30 days" and compare `adId` values between runs to see what is new.

**Can I run it from Python, n8n, Make or an AI agent?** Yes. It works through the Apify API, the Apify clients for Python and JavaScript, the integrations for n8n, Make and Zapier, and the Apify MCP server for Claude, ChatGPT and other agents.

**Is it legal?** The Actor only reads the public transparency library and does not log in. You are responsible for how you use the data.

# Actor input Schema

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

Company names as they appear on LinkedIn, one per line. LinkedIn matches the name loosely, so "Salesforce" also returns advertisers with Salesforce in their name; the advertiser of each ad is in the results.

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

Words to look for in the ad text, one search per line. Use this to see who advertises around a topic.

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

Optional. Paste search URLs copied from linkedin.com/ad-library; their filters are used as they are.

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

How many ads to return for each advertiser, keyword or URL, newest first.

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

Optional. Two-letter country codes (US, GB, DE, FR...) to keep only ads shown in those countries. Empty means all countries.

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

When the ad ran.

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

Used only when Dates is "Custom range". Format YYYY-MM-DD.

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

Used only when Dates is "Custom range". Format YYYY-MM-DD.

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

On: full ad text, headline, call to action, landing page, who paid, and for ads shown in the EU the run dates, impressions and targeting. Off: only what the search list shows (advertiser, format, start of the text, image), which is faster.

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

Optional. Leave it as it is: the Actor picks the connection by itself. Set it only to use your own proxy.

## Actor input object example

```json
{
  "advertisers": [
    "HubSpot"
  ],
  "maxAds": 25,
  "dateRange": "any",
  "includeDetails": true
}
```

# Actor output Schema

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

One row per ad, newest first for each search.

# 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"
    ],
    "maxAds": 25
};

// Run the Actor and wait for it to finish
const run = await client.actor("renzomacar/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"],
    "maxAds": 25,
}

# Run the Actor and wait for it to finish
run = client.actor("renzomacar/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"
  ],
  "maxAds": 25
}' |
apify call renzomacar/linkedin-ad-library-scraper --silent --output-dataset

```

## MCP server setup

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