B2B ads & EU transparency

LinkedIn Ad Library Scraper

B2B brands test their positioning on LinkedIn in public. Collect their ads and landing pages, and for EU campaigns, read the impression ranges and targeting LinkedIn discloses.

On JMLP: 1 credit per result, from $0.025 per 1,000 results. Start with 500 free credits.

Ways to use this scraper.

Three examples to start from.

Compare B2B offers before a campaign

Before a SaaS campaign, tag three competitors’ ads by what they offer: a demo, a webinar, a report. If all three push demos, a useful report might stand out.

An offer comparison with the ad copy and links, and your test ideas next to it.

Research the audience and markets an advertiser uses

For ads shown in the EU, read the targeting fields and the impression shares by country. Write down what LinkedIn discloses separately from what you think the advertiser intended, because the two are easy to blur.

A short brief with source links, where impression ranges stay ranges.

Make an agency audit more specific

Before a pitch, go through the prospect’s own LinkedIn ads and landing pages. Questions built on their real ads land better than general advice.

A short creative audit that uses the prospect’s own ads as examples.

Your first run.

  1. Open the Actor on Apify and go to the Input tab. Switch to the JSON editor if you’d rather paste a configuration.
  2. Replace HubSpot with the advertiser name as LinkedIn displays it. Start with exactAdvertiserMatch true for a focused check. If that returns nothing, try false and inspect the advertiser names before accepting the broader matches.
  3. Choose DE for a small EU sample, maxAds 30 and scrapeAdDetails false. Once the advertiser matches, enable details to collect the available payer, date, targeting and impression fields.
  4. Start the run and keep an eye on the log. If it comes back empty, check which targets and filters were read before you conclude there’s nothing there.
  5. Open Storage → Dataset and read a few records. Export CSV for a quick look in a spreadsheet, or JSON if you need the nested fields.
First-run configuration
{
  "advertisers": ["HubSpot"],
  "countries": ["DE"],
  "maxAds": 30,
  "exactAdvertiserMatch": true,
  "scrapeAdDetails": false
}

Paste this into the Actor’s JSON input editor. Replace the example targets with yours before running.

Check the current input form on Apify

Ways to search.

Advertiser names and keywords can be combined to narrow a search. You can also reuse a filtered LinkedIn Ad Library URL. Exact advertiser matching is optional, and EU ad-detail fields are richer than those for many other markets.

Search methodWhen to use itWhat changes
Advertiser or brand nameWhen to use itYou have a competitor watchlist.What changesLinkedIn company names or company-page links. Name matching is loose by default and can include partners or agencies. Enable exactAdvertiserMatch if you want only the named advertiser.
Keyword discoveryWhen to use itYou want to find relevant results before choosing specific targets.What changesWords in the ad content. With advertisers also provided, every advertiser is searched for every keyword. Without advertisers, the keywords discover ads across companies.
Ad Library URLsWhen to use itYou already configured the search on the source website.What changesLinkedIn Ad Library search or detail links. Search URLs keep their own filters. A detail URL retrieves one ad; it is not a company-page URL or a LinkedIn job search.

Worth knowing

Adds payer, CTA, landing links, media and available EU run dates, impression ranges and targeting. One extra request per ad. Outside EU disclosures, some detail fields stay empty.

Compare the related scraper

What each input does.

In JSON, use the field names exactly as written below. In Apify’s form, add list items one at a time and keep numbers and true/false values as they are.

A default is what the Actor uses when you leave a setting out, and some settings have none. A prefill is an example Apify has already typed into the form, and it runs unless you change it. Check the prefilled targets and limits before you start; you always need at least one target of your own.

Targets and search inputs3
advertisers
ListForm prefill: ["HubSpot"]

LinkedIn company names or company-page links. Name matching is loose by default and can include partners or agencies. Enable exactAdvertiserMatch if you want only the named advertiser.

keywords
List

Words in the ad content. With advertisers also provided, every advertiser is searched for every keyword. Without advertisers, the keywords discover ads across companies.

startUrls
List

LinkedIn Ad Library search or detail links. Search URLs keep their own filters. A detail URL retrieves one ad; it is not a company-page URL or a LinkedIn job search.

Markets, dates and filters6
countries
List

Countries where ads were shown. Codes, names and groups such as EU or DACH are accepted. Several countries form a union, not a separate row for each country; EU detail disclosures vary by ad.

dateRange
TextDefault: all-time

Choose a preset or custom-date-range. The latter uses startDate and endDate. These describe the ad’s run period, not when you collected the record.

Suggested JSON values
all-time last-30-days current-month current-year last-year custom-date-range
startDate
Text

Beginning of a custom range, preferably YYYY-MM-DD. Supplying a custom date activates a custom-range search; use the matching dateRange value in copyable configurations for clarity.

endDate
Text

End of the custom range. Use YYYY-MM-DD or a supported relative date such as today. Keep the same window when comparing several advertisers.

sortBy
TextDefault: newest

newest starts with recent ads; oldest starts at the other end. With maxAds or maxAdsPerSearch, this changes the slice you see first, not the size of the archive.

Suggested JSON values
newest oldest
exactAdvertiserMatch
True or falseDefault: false

Keeps advertiser names matching the search after ignoring case and punctuation. Use for a brand-only audit. It can exclude subsidiaries with different legal names, so check sample results first.

Limits, details and proxies6
maxAds
IntegerForm prefill: 100

A hard cap on unique ads across the whole run, including all targets and markets. Start with 50. Leaving it empty removes this cap; a broad search can then become much larger.

maxAdsPerSearch
Integer

Cap each advertiser-keyword search separately. Pair with maxAds to stop one large advertiser from consuming the whole run. The global cap still wins if reached first.

scrapeAdDetails
True or falseDefault: true

Adds payer, CTA, landing links, media and available EU run dates, impression ranges and targeting. One extra request per ad. Outside EU disclosures, some detail fields stay empty.

maxConcurrency
IntegerDefault: 3

1-10 advertiser or keyword searches in parallel. Each search uses its own proxy sessions. Without a usable proxy, requests are paced one at a time.

detailConcurrency
IntegerDefault: 4

1-10 detail requests in parallel within each search. This is separate from maxConcurrency. Increasing both multiplies simultaneous work and proxy demand; keep the defaults for a first run.

proxyConfiguration
ObjectDefault: {"useApifyProxy":true}Form prefill: {"useApifyProxy":true}

A proxy spreads LinkedIn’s per-IP rate limit across sessions. Residential exits are generally more reliable than datacenter. If blocked, lower concurrency and check proxy availability rather than only retrying faster.

Advanced settings and recovery3
proxyRotations
IntegerDefault: 4

Retries refused work with a new proxy session. More retries can recover temporary blocks but add time and traffic. Keep the default until the log shows a reason to change it.

resume
True or falseDefault: true

Saves progress about every 30 seconds so an Apify restart or migration can continue the current run. Leave it on for normal use.

continueFromLastRun
True or falseDefault: false

Continues unfinished work from the previous run with matching input. Earlier results remain in that run’s dataset. Keep false for a fresh collection or a recurring snapshot.

This reference follows the Actor’s published input fields. Check the live form before changing a production workflow. Check the current input form on Apify.

Three setups to copy.

Each one is a separate run. Swap in your own targets, countries and dates, start small, and widen it only once the first results look right.

A focused EU advertiser audit

This pulls the last 30 days of HubSpot’s ads in Germany, matched on the exact name, with ad details switched on. Keep the payer and any impression data that comes back next to the source links. If a field comes back empty, leave it empty. Don’t fill it in with an estimate.

A focused EU advertiser audit
{
  "advertisers": ["HubSpot"],
  "countries": ["DE"],
  "dateRange": "last-30-days",
  "exactAdvertiserMatch": true,
  "maxAds": 50,
  "scrapeAdDetails": true
}

Discover messages across advertisers

Search three topics across the EU without advertiser restrictions. Each search gets at most 25 ads, so this configuration can yield up to 75 unique ads even though the global cap is 100. Overlap can reduce that total further.

Discover messages across advertisers
{
  "keywords": ["marketing automation", "sales CRM", "lead generation"],
  "countries": ["EU"],
  "maxAds": 100,
  "maxAdsPerSearch": 25,
  "scrapeAdDetails": false
}

Compare a fixed campaign period

Compare two advertisers in Germany and France during September 2026. Countries form a combined search filter. Change the dates, inspect loose advertiser matches and use the per-search cap to stop one brand dominating the sample.

Compare a fixed campaign period
{
  "advertisers": ["HubSpot", "Salesforce"],
  "countries": ["DE", "FR"],
  "dateRange": "custom-date-range",
  "startDate": "2026-09-01",
  "endDate": "2026-09-30",
  "maxAds": 100,
  "maxAdsPerSearch": 50,
  "exactAdvertiserMatch": false,
  "scrapeAdDetails": true
}

After the first run.

Keep ad IDs and advertiser names with the creative text, source links and whatever detail fields came back. EU ads can include the payer, impressions by country and targeting, and elsewhere you’ll see less. Treat the nested JSON as the source record, flatten only what you report on, and never read a blank as zero.

  1. Look at the dataset and the run’s SUMMARY record. Did you hit your cap? Were any inputs skipped? Open a few source links to make sure the records are what you think they are.
  2. Whatever you save, keep the original IDs and add collected_at and run_id. CSV is fine for flat columns; keep the JSON when arrays or nested details matter.
  3. Once a configuration works, save it as an Apify Task and schedule it. Leave continueFromLastRun false for repeated snapshots, and deduplicate by source ID without throwing away the dates you saw each record.
  4. In Make or n8n, trigger on a successful run, fetch the dataset and map the fields into Sheets or your warehouse. Looker Studio works best from a reporting table, and dbt is the place to flatten and test the warehouse models.
  5. The same JSON works with Apify’s API. With Claude and the Apify MCP server, name this Actor, have Claude check the live schema first, and give it explicit targets, markets and limits.

Resume is not a fresh snapshot

resume protects the current run if Apify restarts it. continueFromLastRun picks up an earlier run with the same configuration, and the earlier records stay in the earlier dataset, so you combine the two to get everything. If that run hit its cap, raise the cap before continuing. For a picture of what changed today, start fresh.

Follow the Sheets, Claude, Looker and BigQuery setup guides
Run this Actor from the API

Save one configuration above as input.json. Set APIFY_TOKEN to your Apify API token in your terminal, then send the file as the request body.

Start the run
curl --fail-with-body --request POST \
  --url "https://api.apify.com/v2/actors/jmlp~linkedin-ad-library-scraper/runs" \
  --header "Authorization: Bearer $APIFY_TOKEN" \
  --header "Content-Type: application/json" \
  --data-binary @input.json

The response contains a run ID and defaultDatasetId, not finished results. Wait for the run to succeed, set DATASET_ID to that dataset ID, then fetch its items. For large datasets, use limit and offset to page through the export.

Fetch the dataset
curl --fail-with-body \
  --url "https://api.apify.com/v2/datasets/$DATASET_ID/items?format=json" \
  --header "Authorization: Bearer $APIFY_TOKEN"

Apify’s run and export API reference
Dataset export options

If something looks off.

Change one setting at a time and keep the cap small. The run summary usually tells you what went wrong.

The results belong to the wrong advertiser.

Keeps advertiser names matching the search after ignoring case and punctuation. Use for a brand-only audit. It can exclude subsidiaries with different legal names, so check sample results first.

The listing exists, but detailed fields are missing.

Adds payer, CTA, landing links, media and available EU run dates, impression ranges and targeting. One extra request per ad. Outside EU disclosures, some detail fields stay empty.

Detailed requests start getting blocked.

A proxy spreads LinkedIn’s per-IP rate limit across sessions. Residential exits are generally more reliable than datacenter. If blocked, lower concurrency and check proxy availability rather than only retrying faster.

The run succeeded but returned nothing

Succeeded only means the Actor finished, not that the source sent anything back. Look at SUMMARY.inputProblem, SUMMARY.problem and the log for missing targets, unsupported filters or refused requests, then try one target you know has data, with fewer filters.

Fewer records than expected

Usually it’s a limit: the global cap, a per-search or per-page cap, or what the platform covers. Deduplication also removes records that several searches found, and a site’s headline count can include records its public pages never show. Check for unfinished jobs before you call the dataset complete.

Use the results in your tools.

Google Sheets

Add ad_id, advertiser_name, format, headline, CTA and landing link, plus a column for the offer type. Store impression ranges as text so the sheet doesn’t turn them into numbers.

Read the setup

Claude + MCP

Ask Claude to group the offers and summarize the targeting disclosures, citing ad_library_url. Tell it to keep its audience guesses apart from what the fields say.

Read the setup

Looker Studio

Compare formats and offers by advertiser. Show impressions as a lower and an upper bound, and add a filter for EU ads, since only those carry the detail.

Read the setup

BigQuery + dbt

Key dated observations by ad_id, with country shares and carousel cards in child tables. Store the payer separately from the advertiser, because they aren’t always the same company.

Read the setup
Copy a prompt for Claude
Prompt for Claude + Apify MCP
Inspect jmlp/linkedin-ad-library-scraper, then collect up to 50 HubSpot ads in DE with details and exact advertiser matching. Group offers and CTAs, cite ad_library_url, and summarize only the targeting and impression disclosures actually present. Do not infer spend or conversions.

The fields you’ll get.

Keep the collection time and original IDs with your records. You’ll need them to check where a result came from or compare it with a later run.

Before you draw conclusions

Dates, impression ranges and targeting are published for ads shown in the EU, and elsewhere they’re often missing. A targeting flag doesn’t give you the exact audience. Name searches can pick up agencies and partners unless you turn on exactAdvertiserMatch, and impressions say nothing about spend or results.

ad_id / ad_library_url
Stable ID and the original public ad record.
advertiser_name / paid_by
The advertiser and entity that paid for the ad.
body / headline / cta_text
The published creative text and action.
image_urls / video_urls / carousel_cards
Available creative files and carousel contents.
impressions / impressions_by_country
Published EU impression ranges and country shares.
targeting / shown_in_eu
Available targeting disclosures and whether EU transparency data is present.

Common questions.

Do I need a LinkedIn account or cookies?

No. It reads the public LinkedIn Ad Library, so there’s no login or cookie involved. You need an Apify account to run it.

Why are impression or targeting fields missing?

LinkedIn only publishes them for ads shown in the EU. Check shown_in_eu, and whether details were switched on, before you read anything into a blank.

Source and current product details: JMLP’s LinkedIn Ad Library Actor on Apify.

Need a scraper or a pipeline built for you?

Send me the sites you’re interested in and the question behind them. I’ll tell you whether scraping is the right way to answer it, and what it would take.