# LinkedIn Ad Library Scraper — Competitor Ads & Creatives (`seemuapps/linkedin-ad-library-scraper`) Actor

Scrape every LinkedIn ad any company is running — ad copy, headlines, creatives, CTAs, landing pages and impressions — straight from the public ad library.

- **URL**: https://apify.com/seemuapps/linkedin-ad-library-scraper.md
- **Developed by:** [Andrew](https://apify.com/seemuapps) (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

$4.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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## LinkedIn Ad Library Scraper

Pull every ad a company is running on LinkedIn — ad copy, headlines, creatives, CTAs and landing pages — straight from the public LinkedIn Ad Library. No login, no cookies, no LinkedIn account needed.

### What you get

Every record is one ad, with:

- **Ad copy** — headline, description/body text, and the call-to-action button label
- **Creative** — image URL, video URL, or the full carousel image set
- **Advertiser** — name, LinkedIn company page URL, and logo
- **Format** — ad type (Single Image, Video, Carousel, Document, Sponsored Message) and creative type
- **Destination** — landing page and destination URL where available
- **Flight dates** — start and end date the ad ran
- **Reach** — total impressions and an impressions-by-country breakdown for ads covered by EU ad transparency rules
- **Targeting** — the targeting parameters LinkedIn discloses for the ad

### Use cases

- **Competitor ad research** — see exactly which campaigns a rival is funding right now, and for how long
- **Ad creative inspiration** — build a swipe file of high-performing B2B ad copy and creative in your category
- **Messaging and positioning analysis** — track how competitors describe their product, and when their messaging shifts
- **Demand-gen benchmarking** — compare ad volume, formats and flight lengths across a set of competitors
- **Agency pitching** — show a prospect what their competitors are spending ad budget on

### How to use

1. Pick a **Search mode**:
   - **Company** — every ad from one advertiser (enter a company name, e.g. `stripe`)
   - **Keyword** — every ad whose copy mentions a phrase (e.g. `crm software`)
2. Optionally narrow by **Countries** (ISO codes like `US`, `GB`, `DE`) and a **Start date** / **End date** range
3. Set **Max ads** (default 100; set `0` for unlimited)
4. Run the actor — results appear in the **Dataset** tab

#### Fetching more than one run's worth

The actor paginates automatically to fill your **Max ads**. To keep going past that, open the **Key-value store** tab after the run → copy the `NEXT_PAGE_ID` value → paste it into **Page ID** on your next run. If `NEXT_PAGE_ID` is `null`, you've fetched every matching ad.

### Output format

Each dataset record:

```json
{
  "adId": "1539200396",
  "adLibraryUrl": "https://www.linkedin.com/ad-library/detail/1539200396",
  "advertiser": "Stripe",
  "advertiserLinkedinPage": "https://www.linkedin.com/company/2135371",
  "headline": "How Manus AI monetised viral demand with Stripe",
  "description": "Manus AI went viral overnight. See how they launched payments in under a month and hit a $90M run rate with Stripe.",
  "cta": "Learn more",
  "adType": "Video Ad",
  "creativeType": "SPONSORED_VIDEO",
  "imageUrl": null,
  "videoUrl": "https://dms.licdn.com/playlist/vid/v2/...",
  "carouselImages": [],
  "destinationUrl": null,
  "startDate": "2026-06-02",
  "endDate": null,
  "totalImpressions": "10000-50000",
  "impressionsByCountry": [],
  "targeting": {},
  "searchQuery": "stripe"
}
```

Export to JSON, CSV, Excel or Google Sheets directly from the Apify console.

### Notes

- Flight dates and impression data are published by LinkedIn only for ads covered by EU ad transparency rules, so those fields are `null` for many ads outside the EU. Ad copy, creative and advertiser fields are available for every ad.
- Keyword search matches ad copy across all advertisers, so results include ads posted by individuals as well as company pages.

# Actor input Schema

## `searchMode` (type: `string`):

Search the ad library by advertiser name, or by a keyword that appears in the ad copy.

## `companyName` (type: `string`):

Advertiser to pull ads for, e.g. 'stripe'. Used when Search mode is 'Company'.

## `keyword` (type: `string`):

Phrase to search for inside ad copy, e.g. 'crm software'. Used when Search mode is 'Keyword'.

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

Optional ISO country codes to restrict results to, e.g. US, GB, DE. Leave empty for all countries.

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

Only return ads that ran on or after this date, in YYYY-MM-DD format. Leave empty for no lower bound.

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

Only return ads that ran on or before this date, in YYYY-MM-DD format. Leave empty for no upper bound.

## `maxItems` (type: `integer`):

Maximum number of ads to return in this run. Set 0 for unlimited (the run will paginate until the library is exhausted or the run times out).

## `pageId` (type: `string`):

Paste NEXT\_PAGE\_ID from the previous run's Key-value store to continue where that run stopped.

## Actor input object example

```json
{
  "searchMode": "company",
  "companyName": "stripe",
  "countries": [],
  "maxItems": 100
}
```

# Actor output Schema

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

One ad per record. Fields: adId, adLibraryUrl, advertiser, advertiserLinkedinPage, headline, description, cta, adType, creativeType, imageUrl, videoUrl, carouselImages, destinationUrl, startDate, endDate, totalImpressions, impressionsByCountry, targeting.

## `nextPageId` (type: `string`):

NEXT\_PAGE\_ID record in the default key-value store. Paste into Page ID on the next run to resume; null when every ad has been fetched.

# 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 = {
    "companyName": "stripe"
};

// Run the Actor and wait for it to finish
const run = await client.actor("seemuapps/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 = { "companyName": "stripe" }

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

```

## MCP server setup

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