# LinkedIn Ad Library Scraper | Ads, Payers & Targeting (`genial_candlestand/linkedin-ad-library-scraper`) Actor

Get LinkedIn Ad Library ads: advertiser name, ad format, ad text, headline and images, plus payer, landing URL, run dates, impressions and targeting with details. Search by keyword, advertiser, payer, URL or ad ID, with country, date and impressions filters. No login.

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

## Pricing

from $1.53 / 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.
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

## LinkedIn Ad Library Scraper | Ads, Payers & Targeting

![LinkedIn Ad Library Scraper | Ads, Payers & Targeting](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/linkedin-com-ad-library-ad-transparency-banner-d8b01c1e.png)

Get ads from the public LinkedIn Ad Library as flat rows: the advertiser name and logo, the ad format, ad text, headline and creative images for every ad. Turn on ad details to also get who paid for the ad, the landing URL, the call to action, the video, run dates, the impressions band (total and by country) and targeting. Search by keyword, advertiser, payer, pasted URL or ad ID, with country, date, impressions and targeting filters, and no LinkedIn login.

### What does LinkedIn Ad Library Scraper do?

It searches the [LinkedIn Ad Library](https://www.linkedin.com/ad-library) the way you would in the browser, but for many keywords, advertisers and payers in one run, and saves one row per ad. Each row says which search found it (`queryType`, `query`, `searchUrl`, `position`, `searchTotalAds`). It is built for B2B marketers and agencies watching competitors' LinkedIn campaigns, sales teams looking for companies that are actively advertising, and researchers of political and EU ad transparency.

### How to scrape LinkedIn Ad Library ads

![How LinkedIn Ad Library Scraper works: Searches the public LinkedIn Ad Library for each keyword, advertiser or payer; Tries proxy sessions until one passes LinkedIn's firewall, then keeps it; Pages th](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/linkedin-com-ad-library-ad-transparency-how-7e375fae.png)

1. Open the actor in Apify Console and click **Try for free**.
2. Fill at least one of **Keywords**, **Advertisers**, **Paid for by**, **Start URLs** or **Ad IDs**. Every line is a separate search.
3. Optionally narrow the searches with **Countries**, **Date range**, **Min/Max impressions** and **Targeting includes/excludes**.
4. Tick **Include ad details** if you need the payer, landing URL, run dates, impressions and targeting.
5. Set **Max ads per search** and **Max ads in total**, then click **Start**.
6. Download the results as JSON, CSV, Excel or HTML, or read them through the API.

### How much does it cost to scrape LinkedIn Ad Library?

Price per event by Apify plan:

| Event | Free | Bronze | Silver | Gold and above |
|---|---|---|---|---|
| Ad | $1.80 per 1,000 | $1.71 per 1,000 | $1.62 per 1,000 | $1.53 per 1,000 |
| Ad details | $1.20 per 1,000 | $1.14 per 1,000 | $1.08 per 1,000 | $1.02 per 1,000 |
| Actor start | $0.00005 | $0.00005 | $0.00005 | $0.00005 |

A test run with the API example input below returned 30 rows in 13 s.

The actor uses pay-per-event pricing. On the Free plan:

- **Ad** — $0.0018 for each ad saved to the dataset ($1.80 per 1,000 ads).
- **Ad details** — $0.0012 extra for each ad whose ad page was opened ($3.00 per 1,000 ads with details in total). It is charged only for rows with `hasDetails: true`; rows from **Ad IDs** and ad URLs always have details.
- **Actor start** — $0.00005 once per run.

Not charged: an ad found again by another search in the same run (duplicates are removed), a detail page that failed (the row is saved from the search card without the extra charge), and searches with no results.

| Scenario | Events | Cost on the Free plan |
|---|---|---|
| 100 ads for one keyword, no details | 100 × Ad + start | ≈ $0.18 |
| 1,000 ads from 10 competitor advertisers, no details | 1,000 × Ad + start | ≈ $1.80 |
| 200 ads with details (payer, impressions, targeting) | 200 × Ad + 200 × Ad details + start | ≈ $0.60 |
| 20 known ad IDs | 20 × Ad + 20 × Ad details + start | ≈ $0.06 |

### Input

![LinkedIn Ad Library Scraper input example: Keywords, Date range, Include ad details, Max ads per search, Max ads in total](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/linkedin-com-ad-library-ad-transparency-input-5fe54bc8.png)

| Field | What it does |
|---|---|
| `queries` | Keywords searched in the ad text, one search per line |
| `advertisers` | Advertiser names (LinkedIn company or person names), one search per line; LinkedIn matches names loosely |
| `payers` | The "Paid for by" legal entity, one search per line |
| `startUrls` | Ad Library search URLs (filters are taken from the URL), ad URLs `https://www.linkedin.com/ad-library/detail/<id>` or company pages `https://www.linkedin.com/company/<id or name>` |
| `adIds` | Numeric ad IDs; each ad is returned with its full details, filters do not apply |
| `countries` | ISO 3166-1 alpha-2 codes or English names (`DE`, `United States`); empty = all countries |
| `dateOption` | `all-time` (default, last 12 months), `last-30-days`, `current-month`, `current-year`, `last-year` or `custom-date-range` |
| `startDate`, `endDate` | Custom range, `YYYY-MM-DD` or relative (`3 months`); filling a date switches to a custom range |
| `minImpressions`, `maxImpressions` | Impressions range, e.g. 10000 to 1000000 |
| `targetingIncluded`, `targetingExcluded` | Targeting kinds: Location, Language, Company, Job, Audience, Demographic, Education, Interests and traits |
| `includeDetails` | Open each ad page for the details (default off) |
| `maxItemsPerSearch` | Ads per search (default 100) |
| `maxItems` | Ads per run, all searches and ad IDs together (default 1000) |
| `proxyConfiguration` | Apify Proxy (default on, datacenter) |

The filters (countries, dates, impressions, targeting) apply to keyword, advertiser, payer and company-page searches. A pasted search URL keeps its own parameters, and ad IDs ignore filters.

Example input — the latest cybersecurity ads shown in Germany:

```json
{
  "queries": ["cybersecurity"],
  "countries": ["DE"],
  "dateOption": "last-30-days",
  "maxItemsPerSearch": 200,
  "includeDetails": false
}
```

### What data can you extract from LinkedIn Ad Library?

![LinkedIn Ad Library Scraper output example: Logo, Advertiser, Format, Headline](https://api.apify.com/v2/key-value-stores/Ll7RrWtDkZYOrBvfE/records/linkedin-com-ad-library-ad-transparency-output-41877818.png)

| Field | Description |
|---|---|
| `adId`, `url` | Ad Library ID and ad page |
| `queryType`, `query` | Which input found the ad: `keyword`, `advertiser`, `payer`, `url` or `adId`, and its value |
| `searchUrl`, `position`, `searchTotalAds` | The search URL, the ad's rank in it and LinkedIn's "N ads match" total (null for ad IDs and ad URLs) |
| `advertiserName`, `advertiserLogo`, `advertiserUrl` | Advertiser, its logo, and its LinkedIn page (details only) |
| `memberName`, `memberHeadline` | The person who posts a thought-leader ad for the advertiser (null for company ads) |
| `format`, `creativeType` | LinkedIn's format label (e.g. Single Image Ad, Video Ad, Carousel Ad, Document Ad, Article Ad) and creative type code (e.g. `SPONSORED_STATUS_UPDATE`) |
| `body`, `headline` | Ad text (card preview, may be cut with "…"; full text with details) and the headline under the creative |
| `imageUrl`, `imageUrls` | Main image (video poster for videos) and all creative images: carousel slides, document cover pages |
| `videoUrl`, `clickUrl`, `cta`, `paidBy` | Video file, landing page, call-to-action text and "Paid for by" entity (details only) |
| `ranFrom`, `ranTo`, `daysRunning` | Run dates as `YYYY-MM-DD` and days between them, both included (details only) |
| `impressions`, `impressionsMin`, `impressionsMax` | Impressions band as shown (e.g. `< 1k`, `1k-5k`) and its bounds as numbers; max is null for an open band (details only) |
| `impressionsByCountry` | Share of impressions per country, e.g. `Germany: 100%` (details only) |
| `targeting`, `targetingParameters` | Targeting segments, e.g. `Language: includes English`, and categories used, e.g. `Job: targeted` (details only) |
| `hasDetails` | `true` when the ad page was opened |
| `scrapedAt` | When the ad was extracted |

A real row from a keyword search without details (long URLs cut):

```json
{
  "adId": "1615837293",
  "url": "https://www.linkedin.com/ad-library/detail/1615837293",
  "queryType": "keyword",
  "query": "cybersecurity",
  "searchUrl": "https://www.linkedin.com/ad-library/search?keyword=cybersecurity",
  "position": 1,
  "searchTotalAds": 181851,
  "format": "Single Image Ad",
  "creativeType": "SPONSORED_STATUS_UPDATE",
  "advertiserName": "Cybersteps",
  "advertiserUrl": null,
  "advertiserLogo": "https://media.licdn.com/dms/image/v2/D4D0BAQGKiTPi5LJdHA/company-logo_100_100/…",
  "memberName": null,
  "memberHeadline": null,
  "body": "If your benefits could pay for a serious, job-ready cybersecurity qualification, would you say no?\n\nWith Bildungsgutsche…",
  "headline": "Germany's talent gap is real - thousands of cybersecurity roles unfilled. Get fully funded training via Bildungsgutschein. 0€ out of pocket.",
  "imageUrl": "https://media.licdn.com/dms/image/v2/D4D10AQGOFgQ1ET5MRg/image-shrink_1280/…",
  "imageUrls": ["https://media.licdn.com/dms/image/v2/D4D10AQGOFgQ1ET5MRg/image-shrink_1280/…"],
  "videoUrl": null,
  "clickUrl": null,
  "cta": null,
  "paidBy": null,
  "ranFrom": null,
  "ranTo": null,
  "daysRunning": null,
  "impressions": null,
  "impressionsMin": null,
  "impressionsMax": null,
  "impressionsByCountry": null,
  "targeting": null,
  "targetingParameters": null,
  "hasDetails": false,
  "scrapedAt": "2026-11-13T18:28:45.956Z"
}
```

### Use cases

- **Competitor watch** — track which ads competitors run on LinkedIn, in which formats and with which messages, by keyword or advertiser.
- **All ads of a company with details** — paste a company page URL or an advertiser name to get its ads with payer, landing URL, run dates, impressions and targeting.
- **Sales prospecting** — find companies that are actively advertising on a topic in a given country.
- **Transparency research** — search by "Paid for by" entity and date range to see who paid for which ads.
- **Enrich known ads** — pass ad IDs you already have to get their full details.

### Limitations

- LinkedIn keeps ads for the last 12 months only. It shows no spend and no exact impressions, only bands.
- Run dates, impressions and targeting appear mainly for ads served in the EU (impressions and targeting filters: EU and Brazil). Many detail rows have them empty.
- Without **Include ad details**, `body` is the card preview and can be cut. These fields stay null: `advertiserUrl`, `videoUrl`, `clickUrl`, `cta`, `paidBy`, `ranFrom`, `ranTo`, `daysRunning`, `impressions`, `impressionsMin`, `impressionsMax`, `impressionsByCountry`, `targeting` and `targetingParameters`.
- Every field except `adId`, `url`, `queryType`, `query`, `advertiserName`, `hasDetails` and `scrapedAt` can be null. For example, `headline`, `imageUrl` and `imageUrls` are missing for some ads, `memberName` and `memberHeadline` are filled only for thought-leader ads, and `clickUrl` is often missing for thought-leader posts.
- Document ads give their cover pages in `imageUrls`, not a file URL.
- LinkedIn's firewall blocks most IPs. The actor tries proxy sessions until one passes. If every try is blocked, the run fails with a message saying so.

### Tips and troubleshooting

- **0 rows?** The log names every search with no results. Check the spelling, try a looser keyword or remove filters. An unknown country or an inverted date or impressions range stops the run with an input error before any request.
- **One exact company:** advertiser names match loosely. Paste the numeric company page URL (`https://www.linkedin.com/company/68529`) into Start URLs instead.
- **Keyword plus advertiser in one search:** the form runs each entry as its own search. Build the search in the Ad Library website and paste its URL.
- **Dates:** the end date must be before today, so today or later is moved to yesterday. A start date older than 12 months is moved to the earliest allowed day. Both moves come with a warning.
- **More results:** popular keywords match hundreds of thousands of ads, so raise **Max ads per search** and **Max ads in total** together.
- **Blocked runs:** keep Apify Proxy on. The last tries of the session search use residential US proxy when your account has access to it.

### API, MCP and integrations

Run the actor from your code with the same JSON input as in Console. Your API token is in [Console → Settings → API & Integrations](https://console.apify.com/settings/integrations).

**Python** (`pip install apify-client`):

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("genial_candlestand/linkedin-ad-library-scraper").call(run_input={
    "queries": ["cybersecurity"],
    "maxItemsPerSearch": 30,
    "maxItems": 30,
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

**Node.js** (`npm install apify-client`):

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('genial_candlestand/linkedin-ad-library-scraper').call({
    "queries": ["cybersecurity"],
    "maxItemsPerSearch": 30,
    "maxItems": 30,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);
```

**HTTP** — one request runs the actor and returns the results (runs up to 5 minutes; longer ones: [run asynchronously](https://docs.apify.com/api/v2/act-runs-post)):

```bash
curl -X POST "https://api.apify.com/v2/acts/genial_candlestand~linkedin-ad-library-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"queries":["cybersecurity"],"maxItemsPerSearch":30,"maxItems":30}'
```

**AI agents (MCP).** Add the actor as a tool of the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp). Claude Code:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=genial_candlestand/linkedin-ad-library-scraper"
```

Claude Desktop, Cursor or VS Code: `{"mcpServers": {"apify": {"url": "https://mcp.apify.com?tools=genial_candlestand/linkedin-ad-library-scraper"}}}`. Then ask, for example:

- "Find LinkedIn ads about cybersecurity shown in Germany in the last 30 days and list their advertisers"
- "Get HubSpot's LinkedIn ads with payer, landing URL, run dates and impressions"
- "Which ads did Microsoft pay for on LinkedIn in October 2026?"

**Integrations.** Run it on a schedule with [Apify Schedules](https://docs.apify.com/platform/schedules) and send the results to Google Sheets, Slack, Zapier, Make, n8n or your webhook — see [Apify integrations](https://docs.apify.com/platform/integrations).

### FAQ

**Do I need a LinkedIn account or cookies?**<br>
No. The actor reads the public LinkedIn Ad Library without logging in.

**Can I get ads older than a year or the ad spend?**<br>
No. LinkedIn's Ad Library covers the last 12 months and shows impression bands, not spend.

**Why do some ads have no impressions or targeting even with details?**<br>
LinkedIn publishes run dates, impressions and targeting mainly for ads served in the EU. For other ads these fields are null.

**How is it different from other LinkedIn Ad Library actors?**<br>
Every search option is a form field (keywords, advertisers, payers, countries, dates, impressions, targeting), and search URLs, company pages and ad IDs work too. Impression bands are parsed into `impressionsMin`/`impressionsMax`, and run dates into ISO `ranFrom`/`ranTo` plus `daysRunning`. Duplicates across searches are removed and not charged. The price is $1.80 per 1,000 ads, or $3.00 with details, against $2 and $4 for the most used actor in this niche.

**Is it legal to scrape LinkedIn Ad Library?**<br>
The Ad Library is a public transparency tool, and the actor collects only what it shows to any visitor without login. You are responsible for how you use the data, including data protection rules for the names of people in thought-leader ads. Ask a lawyer if you are unsure.

### Also useful

- [Google Ads Transparency Scraper](https://apify.com/genial_candlestand/google-ads-transparency-scraper) — get the same advertiser's Google ads: formats, shown dates and impressions
- [Google Search Scraper](https://apify.com/genial_candlestand/google-search-results-scraper) — see competitors' Google text ads and organic ranks for the same keywords
- [Glassdoor Jobs Scraper](https://apify.com/genial_candlestand/glassdoor-jobs-scraper) — check whether advertising companies are also hiring, with salaries and ratings
- [Trustpilot Reviews Scraper](https://apify.com/genial_candlestand/trustpilot-reviews-scraper) — compare advertisers' reputation: star ratings, reviews and company replies

# Actor input Schema

## `queries` (type: `array`):

Search the ad text for these keywords, one search per line (e.g. "cybersecurity"). Give at least one of Keywords, Advertisers, Paid for by, Start URLs or Ad IDs. The filters below apply to every keyword.

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

Find the ads of these advertisers (LinkedIn company or person names, e.g. "HubSpot"), one search per line. LinkedIn matches names loosely; for one exact company paste its page URL (https://www.linkedin.com/company/68529) into Start URLs. The filters below apply to every advertiser.

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

Find ads by the legal entity that paid for them (the "Paid for by" line, e.g. "Microsoft"), one search per line. The filters below apply to every payer.

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

LinkedIn URLs: Ad Library search URLs (https://www.linkedin.com/ad-library/search?…, filters taken from the URL), ad URLs (https://www.linkedin.com/ad-library/detail/<id>) or company pages (https://www.linkedin.com/company/<id or name>). The filter fields below do not change pasted search URLs; they do apply to company pages. Other URLs are skipped with a warning.

## `adIds` (type: `array`):

Numeric LinkedIn Ad Library ad IDs (e.g. "1615837293"), one per line. Each ad is returned with its full details and charged as Ad + Ad details. Filters do not apply to ad IDs. Ad URLs go into Start URLs.

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

Only ads shown in these countries: ISO 3166-1 alpha-2 codes or English names ("DE", "United States"). Empty = all countries. An unknown country stops the run with an input error before any request.

## `dateOption` (type: `string`):

When the ads ran. LinkedIn keeps ads for the last 12 months only. "Custom range" uses Start date and End date; filling a date switches to a custom range automatically.

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

First day of a custom range: YYYY-MM-DD or relative ("3 months"). At most 12 months back; an older date is moved to the earliest allowed day with a warning. Empty in a custom range = 12 months ago.

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

Last day of a custom range: YYYY-MM-DD or relative. Must be before today (LinkedIn returns nothing for today or the future): today or later is moved to yesterday with a warning. Empty in a custom range = yesterday. Must be after Start date.

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

Only ads with at least this many impressions (e.g. 10000). Works alone or with Max impressions (then it must be lower). LinkedIn publishes impressions mainly for ads served in the EU and Brazil, so this filter keeps mostly such ads.

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

Only ads with at most this many impressions (e.g. 1000000). Works alone or with Min impressions; must be higher than Min impressions.

## `targetingIncluded` (type: `array`):

Only ads whose advertiser included targeting of these kinds (e.g. Location). A kind can be in both lists (= both included and excluded). LinkedIn shows targeting mainly for EU and Brazil ads.

## `targetingExcluded` (type: `array`):

Only ads whose advertiser excluded audiences of these kinds (e.g. Company).

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

Open every ad's page for the full text, payer, landing URL, call to action, video, run dates, impressions (total and by country) and targeting. Charged as an extra "Ad details" event per ad. Off = search-card data only (advertiser, format, text preview, images).

## `maxItemsPerSearch` (type: `integer`):

Stop each keyword, advertiser, payer or URL search after this many ads (24 per page). Popular keywords match hundreds of thousands of ads.

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

Stop the whole run after this many ads (all searches and ad IDs together). Duplicates found by several searches are counted and charged once.

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

Apify Proxy is needed: LinkedIn's firewall blocks most IPs, the actor tries several until one passes (datacenter first, a few residential US tries last).

## Actor input object example

```json
{
  "queries": [
    "cybersecurity"
  ],
  "dateOption": "all-time",
  "includeDetails": false,
  "maxItemsPerSearch": 100,
  "maxItems": 1000,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
```

# Actor output Schema

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

Dataset with all ads (one row per ad)

## `overview` (type: `string`):

The ads in the Overview view

# 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 = {
    "queries": [
        "cybersecurity"
    ]
};

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

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

```

## MCP server setup

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