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

Scrape LinkedIn ads by company, keyword or payer: ad copy, images, videos, landing pages, CTA, run dates, impression ranges by country and advertiser targeting.

- **URL**: https://apify.com/maged120/linkedin-ad-library-scraper.md
- **Developed by:** [Maged](https://apify.com/maged120) (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 $6.00 / 1,000 results

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

**See every LinkedIn ad your competitors run.** Search by company, keyword or payer and get each ad's full copy, creative, call to action, landing page, run dates, **impression ranges by country** and the **targeting the advertiser chose**. One clean row per ad.

### What does LinkedIn Ad Library Scraper do?

LinkedIn Ad Library Scraper collects ads from the public [LinkedIn Ad Library](https://www.linkedin.com/ad-library/). Enter a company name, a keyword or a payer, or paste an Ad Library link. The Actor returns every matching ad, with images, videos, carousel cards, Message Ad text, landing pages with their UTM parameters, and the reach and targeting data LinkedIn publishes.

It runs on the Apify platform, so you get API access, scheduled runs (for example, a weekly sweep of your competitors' new ads), integrations with Google Sheets, Slack, Zapier and Make, and run monitoring.

### Why use LinkedIn Ad Library Scraper?

- **Competitor research**: see what messages, offers and formats competitors are pushing, and how long they keep each ad running.
- **B2B marketers and agencies**: build swipe files of high-performing LinkedIn creative and CTAs in minutes.
- **Targeting intelligence**: learn which countries, languages, job and company segments a competitor goes after.
- **Funnel teardown**: collect landing pages and UTM structures to map competitors' campaigns.
- **Sales intelligence**: spot companies that are actively spending on LinkedIn and what they're promoting.
- **Monitoring**: schedule the Actor to alert you when a competitor launches new ads.

### How to scrape LinkedIn ads

1. Click **Try for free** (or **Start**) on this page.
2. In **Companies, keywords or Ad Library links**, enter one or more searches, for example `HubSpot` or `Salesforce`.
3. Pick what plain-text searches match: the **advertiser**, a **keyword** in the ad, or the **payer**.
4. Optionally filter by **countries** and **date range**, and set **Max ads per search**.
5. Click **Start**, then open the **Output** tab or export the results as JSON, CSV, Excel or HTML.

### Input

| Field | Description |
|---|---|
| **Companies, keywords or Ad Library links** | One per line. A pasted Ad Library search link keeps its own filters, and a single ad link returns just that ad. |
| **Search by** | Match plain-text searches against the advertiser name, ad keywords or the payer. |
| **Countries** | Two-letter country codes (US, GB, DE…). Leave empty for all countries. |
| **Date range** | All time, last 30 days, this year, last year, or a custom range. |
| **Max ads per search** | Caps each search (0 = no limit). |
| **Include full ad details** | On by default. Adds impressions, targeting, payer, run dates, landing page, CTA, video and the full ad text. |

```json
{
    "searches": ["hubspot", "salesforce"],
    "searchBy": "advertiser",
    "countries": ["US", "GB"],
    "dateRange": "last-30-days",
    "maxAdsPerSearch": 100,
    "includeDetails": true
}
```

### Output

Each ad is one row. You can download the dataset in various formats such as JSON, HTML, CSV, or Excel.

```json
{
    "adId": "1558464383",
    "adUrl": "https://www.linkedin.com/ad-library/detail/1558464383",
    "searchQuery": "hubspot",
    "advertiserName": "HubSpot",
    "advertiserUrl": "https://www.linkedin.com/company/68529",
    "adFormat": "Single Image Ad",
    "paidBy": "HubSpot, Inc.",
    "startDate": "2026-09-24",
    "endDate": "2026-10-01",
    "bodyText": "End every week with five publish-ready posts that actually sound like you.",
    "headline": "From messy notes to publish-ready posts, fast.",
    "ctaText": "Learn more",
    "landingPageUrl": "https://www.hubspot.com/startups/resources/gtm/founder-led-brand-toolkit?utm_campaign=HSFS&utm_source=linkedin&utm_medium=paid",
    "imageUrls": ["https://media.licdn.com/dms/image/v2/.../4png"],
    "videoUrl": null,
    "carouselCards": [],
    "messageSender": null,
    "totalImpressions": "1k-5k",
    "impressionsByCountry": [
        { "country": "United States", "share": "41%" },
        { "country": "Australia", "share": "22%" },
        { "country": "Canada", "share": "18%" }
    ],
    "targeting": {
        "Language": "Targeting includes English",
        "Location": "Targeting includes United States, Australia, Canada, United Kingdom"
    },
    "targetingParameters": [
        { "parameter": "Audience", "targeted": true, "excluded": false },
        { "parameter": "Company", "targeted": false, "excluded": false },
        { "parameter": "Job", "targeted": true, "excluded": false }
    ],
    "detailsIncluded": true,
    "scrapedAt": "2026-10-01T20:30:00+00:00"
}
```

#### Data fields

| Field | Meaning |
|---|---|
| `advertiserName`, `advertiserUrl`, `advertiserLogo` | Who the ad runs for |
| `paidBy` | The legal entity that paid for the ad |
| `adFormat` | Single Image, Video, Carousel, Document, Message, Text Ad and more |
| `bodyText`, `headline`, `ctaText` | Full ad copy, headline and call-to-action button |
| `landingPageUrl` | Where the ad sends people, including UTM parameters |
| `imageUrls`, `videoUrl`, `videoThumbnail`, `carouselCards` | Creative assets |
| `messageSender` | The person a Message Ad is sent from |
| `startDate`, `endDate` | When the ad ran |
| `totalImpressions`, `impressionsByCountry` | Impression range and share by country |
| `targeting`, `targetingParameters` | Language and location targeting, and which audience, company, job, education, demographic and interest dimensions were targeted or excluded |

Run dates, impressions and targeting are only published by LinkedIn for some ads, mainly those subject to EU transparency rules. When LinkedIn doesn't disclose them, those fields are empty. Ads without a clickable destination (for example, some image posts) have no `landingPageUrl`.

#### Dataset views

- **Ads**: advertiser, copy, CTA, landing page, dates and impressions.
- **Reach & targeting**: impressions by country and full targeting for each ad.
- **Media**: images, videos, carousel cards and advertiser assets.

### How many results will I get?

| Input | Rows |
|---|---|
| 1 search, Max ads per search = 50 | Up to 50 rows |
| 3 searches, Max ads per search = 100 | Up to 300 rows |
| 1 single-ad link | 1 row |

You pay per ad saved. An ad that matches more than one of your searches is saved only once per run. Use **Max ads per search**, **Countries** and **Date range** to keep runs focused.

### Tips

- **Weekly competitor watch:** schedule a run with "Last 30 days" for your competitor list and connect it to Google Sheets or Slack.
- **Faster runs:** turn off **Include full ad details** when you only need ad copy and creatives.
- **Exact filters:** set up the search in the LinkedIn Ad Library website, then paste the link. All of its filters carry over.
- **Company names are fuzzy:** an advertiser search can also match partners and resellers with the brand in their name. Check `advertiserName` and `paidBy` to filter.

### FAQ

**Is it legal to scrape the LinkedIn Ad Library?**
The Actor only collects ads that LinkedIn publishes in its public Ad Library for transparency. It doesn't log in or access personal profiles. You are responsible for using the data in line with LinkedIn's terms and applicable law.

**Why do some ads have no impressions or targeting?**
LinkedIn doesn't disclose that data for every ad. See the note under Data fields.

**Found a bug or need a custom solution?**
Open an issue in the **Issues** tab. We usually reply within a day and can build custom versions on request.

***

⭐ **Found this Actor useful?** A quick review on the Store helps other users find it and keeps it maintained.

# Actor input Schema

## `searches` (type: `array`):

One search per line. Enter a company name (e.g. HubSpot), a keyword, or paste a LinkedIn Ad Library search link or a single ad link. Pasted links keep their own filters.

## `searchBy` (type: `string`):

How plain-text searches are matched. Ignored for pasted links.

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

Only return ads shown in these countries. Two-letter codes such as US, GB, DE. Leave empty for all countries.

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

Only return ads that ran in this period.

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

Used only with a custom date range.

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

Used only with a custom date range.

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

Stop each search after this many ads. 0 = no limit.

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

Adds impressions by country, targeting, payer, run dates, landing page, CTA, video and full ad text to every ad. Turn off for a faster, lighter run with preview data only.

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

Proxy used for the requests. Residential gives the most reliable results.

## Actor input object example

```json
{
  "searches": [
    "hubspot"
  ],
  "searchBy": "advertiser",
  "countries": [],
  "dateRange": "all",
  "maxAdsPerSearch": 50,
  "includeDetails": true,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `dataset` (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 = {
    "searches": [
        "hubspot"
    ],
    "maxAdsPerSearch": 50,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

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

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

```

## MCP server setup

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