# LinkedIn Ad Library Scraper (No Cookies or Login Required) (`curly/linkedin-ad-library-scraper`) Actor

Search LinkedIn Ad Library ads directly by advertiser, payer, keyword, country, date, impressions, and targeting. Get creatives, run dates, impressions, and targeting with no cookies, login, or proxy setup. ($0.50 USD per 1,000 results)

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

## Pricing

$0.50 / 1,000 ad results

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 (No Cookies or Login Required)

Search and scrape public ads from the LinkedIn Ad Library. Enter a company or advertiser, payer, keyword, countries, and date range directly in the Actor. Get structured ad creatives, advertiser details, run dates, formats, impression ranges, country distribution, and targeting when LinkedIn makes them public.

No LinkedIn cookies, account, login, or proxy setup is required. Proxies, rotation, retries, and pagination are included.

### Quick start

1. Enter at least one search filter, such as **Company or advertiser**, **Keyword**, or **Countries**.
2. Optionally choose a date range, payer, impression range, or targeting categories.
3. Set **Maximum ads per search**.
4. Click **Start** and download the results.

You do not need to open LinkedIn or construct a URL.

#### Recommended input: search fields

```json
{
  "advertiser": "JetBrains",
  "keyword": "AI",
  "countries": ["DE", "US"],
  "dateRange": "current-year",
  "maxResultsPerUrl": 10
}
```

Available search fields:

- `advertiser`: company or advertiser name
- `payer`: organization or person that paid for the ad
- `keyword`: word or phrase in the ad
- `countries`: one or more countries selected from the input list
- `dateRange`: any available date, last 30 days, current month, current year, last year, or a custom range
- `startDate` and `endDate`: required only for a custom date range
- `minImpressions` and `maxImpressions`: optional EU-region ad filters
- `includedTargetingCategories` and `excludedTargetingCategories`: optional EU-region ad filters
- `maxResultsPerUrl`: number of ads to return

The search fields map directly to LinkedIn Ad Library filters. Multiple countries and targeting categories can be selected without knowing LinkedIn's internal URL format.

#### Advanced URL mode

If you already have LinkedIn Ad Library URLs, leave every search field empty/default and use:

```json
{
  "urls": [
    "https://www.linkedin.com/ad-library/search?accountOwner=JetBrains&dateOption=current-year",
    "https://www.linkedin.com/ad-library/detail/1476666024"
  ],
  "maxResultsPerUrl": 10
}
```

Search-field mode and URL mode cannot be combined in one run. URL mode accepts up to 100 LinkedIn Ad Library search or detail URLs. The result limit applies separately to every search URL; direct detail URLs return at most one result. Duplicate URLs and ads are processed once. Other LinkedIn URLs and non-LinkedIn URLs are rejected.

### What you get

Each dataset item is one LinkedIn ad and can include:

- Ad ID, detail URL, search URL, and ad format
- Advertiser name, LinkedIn company URL, company ID, and logo
- Paying entity and public run period
- Public total-impression range and country distribution
- Included and excluded targeting segments
- Every public creative variant
- Creative text, headline, call to action, and destination URLs
- Image, video, document, event, and carousel details

Example result:

```json
{
  "ad_id": "1476666024",
  "ad_url": "https://www.linkedin.com/ad-library/detail/1476666024",
  "search_url": "https://www.linkedin.com/ad-library/search?accountOwner=Ketryx",
  "ad_format": "Event Ad",
  "advertiser": {
    "name": "Ketryx",
    "url": "https://www.linkedin.com/company/73267396",
    "company_id": "73267396",
    "logo_url": "https://media.licdn.com/example-logo.png"
  },
  "payer": "Ketryx Corporation",
  "run_period": {
    "start_date": "2026-07-27",
    "end_date": "2026-07-29",
    "is_active": false
  },
  "is_restricted": false,
  "impression_range": {
    "label": "< 1k",
    "estimated_min": 0,
    "estimated_max": 999
  },
  "impressions_by_country": [
    {
      "country": "United Kingdom",
      "share_label": "17%",
      "share_percent": 17
    }
  ],
  "targeting": [
    {
      "category": "Language",
      "included_values": ["English"],
      "excluded_values": [],
      "is_targeted": null,
      "is_excluded": null
    }
  ],
  "creative_variants": [
    {
      "variant_index": 0,
      "creative_type": "SPONSORED_UPDATE_EVENT",
      "body": "Example public ad text.",
      "headline": "Example event",
      "destination_url": "https://www.linkedin.com/events/example",
      "call_to_action": "Register",
      "external_urls": [],
      "media": [],
      "document": null,
      "event": {
        "title": "Example event",
        "url": "https://www.linkedin.com/events/example",
        "start_at": "2026-09-09T15:00:00.000Z",
        "end_at": null,
        "location": "Online"
      },
      "carousel_items": []
    }
  ],
  "scraped_at": "2026-07-29T12:00:00.000Z",
  "source": "linkedin_ad_library"
}
```

The output always uses the same complete schema. Fields that are not publicly exposed for a particular ad remain `null` or an empty array. No `_html` fields are returned.

### Price

The price is **$0.0005 per stored ad** — **$0.50 per 1,000 results**. You pay for returned dataset items, not failed requests or duplicates.

### Run with the API

```bash
curl -X POST \
  "https://api.apify.com/v2/acts/curly~linkedin-ad-library-scraper/run-sync-get-dataset-items?format=json" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  --data '{"advertiser":"JetBrains","keyword":"AI","countries":["DE"],"dateRange":"current-year","maxResultsPerUrl":10}'
```

The same input works with the Apify API client, schedules, webhooks, and integrations.

### Limits and responsible use

- Impression and targeting data is returned only when LinkedIn exposes it publicly for the ad.
- Some ads have multiple creative variants; all available variants are kept in the same result.
- Public page availability can vary by ad, country, and time.
- Use the Actor only for lawful purposes and comply with applicable privacy, data-protection, advertising, and platform rules.

### FAQ

#### Do I need LinkedIn cookies or an account?

No. The Actor accesses the public LinkedIn Ad Library without your LinkedIn credentials.

#### Do I need to configure a proxy?

No. Proxy access and rotation are included automatically.

#### How do I choose an advertiser or keyword?

Enter the advertiser or keyword directly in the Actor input. You can combine it with payer, country, date, impression, and targeting filters. The Actor builds the LinkedIn search URL and paginates automatically.

#### Can I still paste a LinkedIn Ad Library URL?

Yes. Use **Advanced URL mode** and leave all search fields empty/default. URL mode and search-field mode are intentionally mutually exclusive, so it is always clear which filters will be used.

#### Can I limit the number of ads?

Yes. Set **Maximum ads per search** to any number from 1 to 1,000. A value of `10` returns at most 10 ads from the structured search. In URL mode, it returns at most 10 ads from each search URL.

#### Why are impressions or targeting empty?

LinkedIn does not publish those values for every ad. The Actor does not invent missing data.

# Actor input Schema

## `advertiser` (type: `string`):

Search by the name of the company or advertiser shown on LinkedIn. You can combine this with the other search filters below.

## `payer` (type: `string`):

Optional: search by the organization or person that paid for the ad.

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

Optional: search public ads containing this word or phrase.

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

Optional: select one or more countries. Leave empty to search all countries.

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

Optional: limit ads by LinkedIn's native date presets, or choose a custom range.

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

Required only when Date range is Custom date range. LinkedIn currently supports ads created within the previous year.

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

Required only when Date range is Custom date range. LinkedIn accepts dates through yesterday.

## `maxResultsPerUrl` (type: `integer`):

Set the maximum number of ads returned from this structured search. In advanced URL mode, the limit applies separately to every search URL; detail URLs return one ad.

## `minImpressions` (type: `integer`):

Optional LinkedIn filter. This only returns matching ads shown in the EU region.

## `maxImpressions` (type: `integer`):

Optional LinkedIn filter. Must be greater than or equal to Minimum impressions.

## `includedTargetingCategories` (type: `array`):

Optional: require LinkedIn to show ads with inclusions in one or more public targeting categories. EU-region ads only.

## `excludedTargetingCategories` (type: `array`):

Optional: require LinkedIn to show ads with exclusions in one or more public targeting categories. Select a category in both lists to match either mode.

## `urls` (type: `array`):

Advanced fallback: paste existing LinkedIn Ad Library search or ad detail URLs. Leave every search field above empty/default when using URLs; the two input modes cannot be combined.

## Actor input object example

```json
{
  "advertiser": "JetBrains",
  "countries": [],
  "dateRange": "current-year",
  "maxResultsPerUrl": 10,
  "includedTargetingCategories": [],
  "excludedTargetingCategories": [],
  "urls": []
}
```

# Actor output Schema

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

No description

## `runSummary` (type: `string`):

No description

## `failedInputs` (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 = {
    "advertiser": "JetBrains",
    "countries": [],
    "dateRange": "current-year",
    "maxResultsPerUrl": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("curly/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 = {
    "advertiser": "JetBrains",
    "countries": [],
    "dateRange": "current-year",
    "maxResultsPerUrl": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("curly/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 '{
  "advertiser": "JetBrains",
  "countries": [],
  "dateRange": "current-year",
  "maxResultsPerUrl": 10
}' |
apify call curly/linkedin-ad-library-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/ICBOmPCZE6Tsu3D9C/builds/SjG9NFrDnadVFua8p/openapi.json
