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

Scrape the LinkedIn Ad Library with no login: competitor ads, creatives, headlines, CTAs, advertiser & paying entity, run dates, total impressions, impressions by country and full targeting. Search by keyword, company or payer. Monitoring mode returns only new ads. Export JSON, CSV, Excel.

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

## Pricing

from $2.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 a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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 — Competitor B2B Ads, Creatives & Impressions

Extract **every ad your competitors are running on LinkedIn** — full creatives, headlines, ad copy, CTAs, and the data other scrapers miss: **advertiser company ID, the legal paying entity, exact run dates, total impressions, impressions by country, and complete targeting** (language, locations, audience, company, job and interest facets). Search by **keyword, company, or payer**, and turn on **Monitoring mode** to capture only newly-launched ads on a schedule.

No login, no cookies, no browser — fast JSON extraction straight from LinkedIn's public Ad Library.

### Why this LinkedIn Ad Library scraper?

Most LinkedIn ad scrapers only read the search cards and return a name, a headline, and an image. This actor opens every ad's detail page and ships the **richest dataset in the category** — the fields that actually drive competitive and B2B intelligence:

| Data | Typical scrapers | This actor |
|---|---|---|
| Advertiser name + **LinkedIn company ID** | partial | ✅ |
| **Paying entity** ("Paid for by…") | ❌ | ✅ |
| Headline, full ad copy, CTA button | partial | ✅ |
| **Destination / landing URL** (with the advertiser's own UTMs) | ❌ | ✅ |
| Creative type (single image, video, carousel, document, event…) | ❌ | ✅ |
| Image & video creative URLs | partial | ✅ |
| Exact **first/last shown dates** | ❌ | ✅ |
| **Total impressions** range | ❌ | ✅ |
| **Impressions by country** | ❌ | ✅ when published |
| **Full targeting** (language, locations, audience, company, job, interests) | ❌ | ✅ |
| Search by keyword **and** company **and** payer | partial | ✅ |
| **Monitoring mode** — only new ads each run | ❌ | ✅ |

### Use cases

- **Competitor ad intelligence** — see exactly which ads a competitor is running, the creative, the offer, the CTA, and where the click goes. Track their messaging and campaign cadence over time.
- **B2B creative & messaging research** — build a swipe file of the best-performing B2B ads by topic or industry; learn the hooks, formats, and CTAs that work in your space.
- **Demand-gen & paid-social benchmarking** — compare impressions, run lengths, and targeting across competitors to size their spend and reach.
- **Agency competitive decks** — pull a client's whole category in minutes: every advertiser, every live ad, with impressions and targeting.
- **Lead & partner signals** — discover which companies are actively advertising (and at what scale) on LinkedIn — a strong buying/growth signal for sales and BD.
- **DSA / ad-transparency research** — the LinkedIn Ad Library is published for transparency; this actor structures it for analysis at scale.

### How to use

1. [Sign up for Apify](https://console.apify.com/sign-up) — the free plan is enough to try this actor.
2. Open the **LinkedIn Ad Library Scraper**, enter keywords, company IDs/URLs, or payer names (or paste Ad Library URLs), and click **Start**.
3. Watch results stream into the dataset table.
4. **Export** as JSON, CSV, Excel, XML, or RSS — or pull results programmatically via the [Apify API](https://docs.apify.com/api/v2).

### Input

```json
{
    "keywords": ["marketing automation"],
    "companyIds": ["68529"],
    "companyUrls": ["https://www.linkedin.com/company/1337"],
    "payers": ["HubSpot, Inc."],
    "countries": ["US", "GB"],
    "enrichAdDetails": true,
    "maxAds": 200,
    "monitorMode": false
}
````

- **keywords** — search the Ad Library by keyword (matches advertiser names and ad copy). Each keyword is one search.
- **companyIds** — numeric LinkedIn company IDs to pull every ad an advertiser is running (e.g. `68529` = HubSpot).
- **companyUrls** — LinkedIn company URLs or Ad Library URLs; numeric `/company/<id>` and `?companyIds=` links resolve automatically.
- **payers** — search by the "Paid for by" entity, useful when an advertiser pays under a different legal name.
- **startUrls** — paste Ad Library search URLs (`/ad-library/search?…`) or individual ad URLs (`/ad-library/detail/<id>`).
- **countries / dateFrom / dateTo** — optional filters applied to every search.
- **enrichAdDetails** *(default true)* — open each ad's detail page for the full record (company ID, paying entity, run dates, impressions, impressions by country, targeting, destination URL, creatives). Turn off for a cheaper, cards-only run.
- **maxAds / maxAdsPerQuery** — caps (0 = no limit).
- **monitorMode** *(default false)* — output only ads not seen in previous runs; pair with [Schedules](https://docs.apify.com/platform/schedules) to track new ads automatically.
- **proxyConfiguration** — proxy settings (Apify Proxy by default).

### Output

One record per ad (`type: "ad"`):

```json
{
    "type": "ad",
    "adId": "1439476536",
    "adUrl": "https://www.linkedin.com/ad-library/detail/1439476536",
    "advertiserName": "HubSpot",
    "advertiserCompanyId": "68529",
    "advertiserCompanyUrl": "https://www.linkedin.com/company/68529",
    "advertiserLogoUrl": "https://media.licdn.com/.../hubspot_logo",
    "creativeType": "SPONSORED_STATUS_UPDATE",
    "creativeTypeLabel": "Single image",
    "headline": "Register for the webinar",
    "bodyText": "Using AI in sales but seeing little impact? It's the missing context…",
    "ctaText": "Learn more",
    "destinationUrl": "https://hubs.la/Q04ktvQ90?utm_source=linkedin&utm_medium=paid",
    "imageUrls": ["https://media.licdn.com/.../image-shrink_1280/..."],
    "videoUrl": null,
    "payingEntity": "HubSpot, Inc.",
    "firstShownDate": "Jun 11, 2026",
    "lastShownDate": "Jun 13, 2026",
    "totalImpressions": "5k-10k",
    "impressionsByCountry": [{ "country": "United States", "impressions": "2k-3k" }],
    "targeting": {
        "language": { "included": ["English"], "excluded": [] },
        "location": { "included": ["United States", "United Kingdom"], "excluded": [] }
    },
    "targetingSummary": "Language: English · Location: United States, United Kingdom · …",
    "searchType": "companyId",
    "searchTerm": "68529",
    "scrapedAt": "2026-06-13T12:00:00.000Z"
}
```

#### What to expect (field coverage)

The LinkedIn Ad Library is advertiser- and platform-populated, so some fields appear only when LinkedIn publishes them. Verified across many advertisers, you can typically expect:

| Field | Coverage |
|---|---|
| advertiserName, company ID, creative type, ad URL | ~100% |
| headline / body copy, CTA, creatives | ~95% (varies by ad format) |
| paying entity, first/last shown dates | ~98% |
| **total impressions** | ~95% |
| **impressions by country** | when published (LinkedIn notes it can take up to 48h for new ads) |
| **targeting** (language, location, audience…) | when the advertiser's targeting is disclosed |
| destination URL | when the ad links off-platform |

A blank field means LinkedIn didn't publish that value for that ad — never that scraping failed. Nothing is dropped, so you always get the richest record available.

### Automate & schedule

Run this actor on autopilot and pull results into your own stack:

- **[Apify API](https://docs.apify.com/api/v2)** — start runs, fetch datasets, and manage schedules over REST.
- **[apify-client for JavaScript](https://docs.apify.com/api/client/js/)** and **[apify-client for Python](https://docs.apify.com/api/client/python/)** — official SDKs.
- **[Schedules](https://docs.apify.com/platform/schedules)** — run it daily/weekly to watch competitors for new ads. Turn on **Monitoring mode** and each scheduled run returns only ads it hasn't seen before — the scheduler triggers the run, the actor handles the de-duplication, no conflict between the two.
- **[Webhooks](https://docs.apify.com/platform/integrations/webhooks)** — trigger downstream actions (Slack alert, CRM update, creative dashboard) the moment a new ad appears.

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

const client = new ApifyClient({ token: 'MY_APIFY_TOKEN' });

const run = await client.actor('scrapesage/linkedin-ad-library-scraper').call({
    companyIds: ['68529'],
    enrichAdDetails: true,
    monitorMode: true,
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(`Got ${items.length} new LinkedIn ads`);
```

### Integrate with any app

Connect the dataset to 5,000+ apps — no code required:

- **[Make](https://docs.apify.com/platform/integrations/make)** — multi-step automation scenarios.
- **[Zapier](https://docs.apify.com/platform/integrations/zapier)** — push new competitor ads straight into Slack, Notion, or your CRM.
- **[Slack](https://docs.apify.com/platform/integrations/slack)** — get notified when a monitored competitor launches a new ad.
- **[Google Drive / Sheets](https://docs.apify.com/platform/integrations/drive)** — auto-export every run to a spreadsheet.
- **[Airbyte](https://docs.apify.com/platform/integrations/airbyte)** — pipe results into your data warehouse.
- **[GitHub](https://docs.apify.com/platform/integrations/github)** — trigger runs from commits or releases.

### Use with AI assistants (MCP)

The output is clean, LLM-ready JSON. Call this actor from Claude, ChatGPT, or any agent framework through the **[Apify MCP server](https://docs.apify.com/platform/integrations/mcp)** — ask your assistant to "list every LinkedIn ad HubSpot is running, with the offer, CTA and targeting" and let it run the scraper for you.

### More scrapers from scrapesage

Build a complete **competitor ad-intelligence stack** — see what your rivals run across every major ad platform, then go wider on B2B intel:

- **[Google Ads Transparency Scraper](https://apify.com/scrapesage/google-ads-transparency-scraper)** — every ad an advertiser runs on Google Search, Display & YouTube.
- **[Facebook Ad Library Scraper](https://apify.com/scrapesage/facebook-ad-library-scraper)** — competitor ad intelligence across Meta & Instagram.
- **[LinkedIn Jobs Scraper](https://apify.com/scrapesage/linkedin-jobs-scraper)** — job postings as hiring-intent and growth signals.
- **[Eventbrite Scraper](https://apify.com/scrapesage/eventbrite-scraper)** — events plus organizer leads (ticket prices, emails, socials).
- **[Sched Conference Scraper](https://apify.com/scrapesage/sched-conference-scraper)** — speakers, sessions and sponsors from conference sites.
- **[Whova Event Scraper](https://apify.com/scrapesage/whova-event-scraper)** — attendees, sessions, speakers and sponsors from Whova event apps.
- **[Bark Listing Scraper](https://apify.com/scrapesage/bark-listing-scraper)** — service-provider leads from Bark.

### Tips

- **Whole-competitor sweep**: pass a company ID (or a `/company/<id>` URL) to pull every live ad an advertiser is running, then keep `enrichAdDetails` on for impressions and targeting.
- **Category research**: use a `keyword` (e.g. `cybersecurity`) to map every advertiser and ad in a topic. LinkedIn returns ads newest-first.
- **Recurring monitoring**: combine **Monitoring mode** with a [Schedule](https://docs.apify.com/platform/schedules) so each run only returns ads launched since the last one — perfect for a "new competitor ads" Slack feed.
- **Cost control**: turn off `enrichAdDetails` for a fast, cards-only pass (advertiser, creative type, headline, copy, ad URL), then re-run with enrichment on only the ads you care about.

### FAQ

**How do I scrape all the ads from one company?** Put its numeric LinkedIn company ID in `companyIds` (or paste the `/company/<id>` URL in `companyUrls`). You'll get every ad that advertiser is currently running.

**Where do I find a company's ID?** It's the number in the company's LinkedIn URL, or in the Ad Library URL when you filter by an advertiser. You can also paste the company/Ad Library URL and the actor resolves it.

**Does it need a LinkedIn login or cookies?** No. The LinkedIn Ad Library is public for ad-transparency, and this actor reads it directly — no account, cookies, or API key.

**Can I monitor competitors for new ads?** Yes. Turn on **Monitoring mode** and schedule the actor. The first run captures everything as a baseline; every run after returns only ads it hasn't seen — and it does not interfere with the Apify scheduler.

**Can I export to Google Sheets, CSV, or Excel?** Yes — one click in the dataset view, or automatically on every run via the [Google Drive integration](https://docs.apify.com/platform/integrations/drive).

**A field is empty — why?** LinkedIn publishes impressions-by-country and targeting only for some ads (and notes country data can take up to 48 hours to appear). Empty means LinkedIn didn't publish it for that ad — the scraper never drops data it can see.

**Is scraping the LinkedIn Ad Library legal?** This actor collects publicly available, transparency-mandated data only. You're responsible for using the data in compliance with applicable laws (e.g. GDPR/CCPA for personal data) and LinkedIn's terms.

### Need help?

Open an issue on the actor's **Issues** tab, or visit the [Apify help center](https://help.apify.com/). Feature requests are welcome — this actor is actively maintained.

# Actor input Schema

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

Search the LinkedIn Ad Library by keyword (matches advertiser names and ad copy), e.g. <code>marketing automation</code>, <code>cybersecurity</code>. Each keyword is one search.

## `companyIds` (type: `array`):

Numeric LinkedIn company IDs to pull every ad an advertiser is running, e.g. <code>68529</code> (HubSpot). Find the ID in a company's LinkedIn URL or paste the URL under <b>Company URLs</b> below.

## `companyUrls` (type: `array`):

LinkedIn company URLs (<code>https://www.linkedin.com/company/68529</code>) or Ad Library URLs. Numeric <code>/company/\<id></code> URLs and <code>?companyIds=</code> links are resolved automatically; vanity slugs fall back to a keyword search.

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

Search by the entity that paid for the ads (the "Paid for by" name), e.g. <code>HubSpot Inc.</code>. Useful when an advertiser pays under a different legal entity.

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

Paste LinkedIn Ad Library URLs directly: search pages (<code>/ad-library/search?...</code>) or individual ad pages (<code>/ad-library/detail/\<id></code>). Used in addition to the inputs above.

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

Optional ISO country codes to restrict results to ads shown in those countries, e.g. <code>US</code>, <code>GB</code>, <code>DE</code>. Leave empty for all countries.

## `dateFrom` (type: `string`):

Only include ads shown on or after this date (YYYY-MM-DD).

## `dateTo` (type: `string`):

Only include ads shown on or before this date (YYYY-MM-DD).

## `enrichAdDetails` (type: `boolean`):

Open each ad's detail page to capture the full record: advertiser company ID, paying entity, exact run dates, total impressions, impressions by country, complete targeting (language, locations, audience, company, job & interest facets), CTA and destination URL, and image/video creatives. Adds one fast request per ad. Turn off for a cheaper, cards-only run.

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

Maximum number of ads to scrape across all searches. Set 0 for no limit.

## `maxAdsPerQuery` (type: `integer`):

Cap the number of ads taken from each individual keyword / company / payer search (0 = no per-search limit).

## `monitorMode` (type: `boolean`):

Remember which ads were already returned in previous runs and output only newly-discovered ads each time. Pair it with Apify <b>Schedules</b> to track competitors' new ads automatically — it does not interfere with the scheduler. The first run returns everything as a baseline; later runs return only what's new.

## `monitorStateName` (type: `string`):

Named key-value store that holds the "already seen" ad IDs for monitoring mode. Use a different name per project so separate monitors don't share state.

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

Maximum number of pages fetched in parallel.

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

Proxy settings. The LinkedIn Ad Library is public, so Apify Proxy (the default) works well; switch to residential for very large jobs.

## Actor input object example

```json
{
  "keywords": [
    "marketing automation"
  ],
  "enrichAdDetails": true,
  "maxAds": 100,
  "maxAdsPerQuery": 0,
  "monitorMode": false,
  "monitorStateName": "linkedin-ad-library-monitor",
  "maxConcurrency": 8,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

All scraped ad records as JSON items in the default dataset.

# 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 = {
    "keywords": [
        "marketing automation"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapesage/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 = { "keywords": ["marketing automation"] }

# Run the Actor and wait for it to finish
run = client.actor("scrapesage/linkedin-ad-library-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "keywords": [
    "marketing automation"
  ]
}' |
apify call scrapesage/linkedin-ad-library-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scrapesage/linkedin-ad-library-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "LinkedIn Ad Library Scraper — Competitor B2B Ads & Creatives",
        "description": "Scrape the LinkedIn Ad Library with no login: competitor ads, creatives, headlines, CTAs, advertiser & paying entity, run dates, total impressions, impressions by country and full targeting. Search by keyword, company or payer. Monitoring mode returns only new ads. Export JSON, CSV, Excel.",
        "version": "1.0",
        "x-build-id": "vLiriqWMHCQS9kO0c"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scrapesage~linkedin-ad-library-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scrapesage-linkedin-ad-library-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/scrapesage~linkedin-ad-library-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scrapesage-linkedin-ad-library-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/scrapesage~linkedin-ad-library-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scrapesage-linkedin-ad-library-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "keywords": {
                        "title": "Keywords",
                        "type": "array",
                        "description": "Search the LinkedIn Ad Library by keyword (matches advertiser names and ad copy), e.g. <code>marketing automation</code>, <code>cybersecurity</code>. Each keyword is one search.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "companyIds": {
                        "title": "Company IDs",
                        "type": "array",
                        "description": "Numeric LinkedIn company IDs to pull every ad an advertiser is running, e.g. <code>68529</code> (HubSpot). Find the ID in a company's LinkedIn URL or paste the URL under <b>Company URLs</b> below.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "companyUrls": {
                        "title": "Company URLs",
                        "type": "array",
                        "description": "LinkedIn company URLs (<code>https://www.linkedin.com/company/68529</code>) or Ad Library URLs. Numeric <code>/company/&lt;id&gt;</code> URLs and <code>?companyIds=</code> links are resolved automatically; vanity slugs fall back to a keyword search.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "payers": {
                        "title": "Payer names",
                        "type": "array",
                        "description": "Search by the entity that paid for the ads (the \"Paid for by\" name), e.g. <code>HubSpot Inc.</code>. Useful when an advertiser pays under a different legal entity.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Paste LinkedIn Ad Library URLs directly: search pages (<code>/ad-library/search?...</code>) or individual ad pages (<code>/ad-library/detail/&lt;id&gt;</code>). Used in addition to the inputs above.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "countries": {
                        "title": "Countries",
                        "type": "array",
                        "description": "Optional ISO country codes to restrict results to ads shown in those countries, e.g. <code>US</code>, <code>GB</code>, <code>DE</code>. Leave empty for all countries.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "dateFrom": {
                        "title": "Date from",
                        "type": "string",
                        "description": "Only include ads shown on or after this date (YYYY-MM-DD)."
                    },
                    "dateTo": {
                        "title": "Date to",
                        "type": "string",
                        "description": "Only include ads shown on or before this date (YYYY-MM-DD)."
                    },
                    "enrichAdDetails": {
                        "title": "Enrich ad details",
                        "type": "boolean",
                        "description": "Open each ad's detail page to capture the full record: advertiser company ID, paying entity, exact run dates, total impressions, impressions by country, complete targeting (language, locations, audience, company, job & interest facets), CTA and destination URL, and image/video creatives. Adds one fast request per ad. Turn off for a cheaper, cards-only run.",
                        "default": true
                    },
                    "maxAds": {
                        "title": "Max ads",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Maximum number of ads to scrape across all searches. Set 0 for no limit.",
                        "default": 100
                    },
                    "maxAdsPerQuery": {
                        "title": "Max ads per search",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Cap the number of ads taken from each individual keyword / company / payer search (0 = no per-search limit).",
                        "default": 0
                    },
                    "monitorMode": {
                        "title": "Monitoring mode (only new ads)",
                        "type": "boolean",
                        "description": "Remember which ads were already returned in previous runs and output only newly-discovered ads each time. Pair it with Apify <b>Schedules</b> to track competitors' new ads automatically — it does not interfere with the scheduler. The first run returns everything as a baseline; later runs return only what's new.",
                        "default": false
                    },
                    "monitorStateName": {
                        "title": "Monitoring store name",
                        "type": "string",
                        "description": "Named key-value store that holds the \"already seen\" ad IDs for monitoring mode. Use a different name per project so separate monitors don't share state.",
                        "default": "linkedin-ad-library-monitor"
                    },
                    "maxConcurrency": {
                        "title": "Max concurrency",
                        "minimum": 1,
                        "maximum": 20,
                        "type": "integer",
                        "description": "Maximum number of pages fetched in parallel.",
                        "default": 8
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Proxy settings. The LinkedIn Ad Library is public, so Apify Proxy (the default) works well; switch to residential for very large jobs.",
                        "default": {
                            "useApifyProxy": true
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
