LinkedIn Ad Library Scraper
Pricing
from $2.00 / 1,000 linkedin ad results
LinkedIn Ad Library Scraper
Collect ads from the public LinkedIn Ad Library by company name, keyword, or URL. Extracts ad text, MP4 video links, UTM destination URLs, paying entities, EU impressions, and targeting settings without login.
Pricing
from $2.00 / 1,000 linkedin ad results
Rating
0.0
(0)
Developer
Frank-Ringo Gutacker
Maintained by CommunityActor stats
0
Bookmarked
3
Total users
2
Monthly active users
6 days ago
Last modified
Categories
Features
Share
Scrape ads from the public LinkedIn Ad Library by company name, keyword, or Ad Library URL, without a LinkedIn login. For each ad you get the advertiser, ad format, headline and ad copy, and with detail pages switched on also the destination URL with its UTM parameters, video links, the paying legal entity, run dates, and EU impression and targeting disclosures. Export the results as JSON, CSV, or Excel, or call the Actor through the Apify API.
What data can you extract from the LinkedIn Ad Library?
| Data | Fields | Needs fetchAdDetails |
|---|---|---|
| Ad identity | adId, adLibraryUrl, query, queryType, scrapedAt | No |
| Advertiser | advertiserName, advertiserLogoUrl | No |
| Advertiser (detail page) | advertiserCompanyId, advertiserLinkedinUrl, paidForBy (legal entity paying for the ad) | Yes |
| Creative | format, formatLabel, adHeadline, adBodyText, previewImageUrl, imageUrls | No (ad copy is complete only with details) |
| Video | videoUrl, videoStreams (MP4 links with bitrate, when LinkedIn exposes them) | Partly; full list needs details |
| Call to action and destination | ctaText, landingPageUrl (full utm_* and hsa_* parameters), landingDomain | Yes |
| Run dates | firstShownDate, lastShownDate, daysActive, isActive (null when LinkedIn shows no dates) | Yes |
| EU Digital Services Act data | impressionsRange, impressionsMin, impressionsMax, countryImpressions, targetingSegments, targetingFacets | Yes |
A full record is shown under Sample Output.
Why scrape LinkedIn ads? Use cases
- Competitor ad monitoring: collect the ads a competitor currently runs on LinkedIn, with headline, copy, format, and landing page.
- Campaign and UTM research: read the destination URLs and tracking parameters to see which landing pages and campaign naming schemes an advertiser uses.
- Long-running ads: set
minDaysActiveto keep only ads that have run for at least that many days, a rough signal of ads an advertiser keeps paying for. - Creative swipe files: gather image, video, carousel, and document ads by keyword or format for design and copy inspiration.
- EU transparency analysis: for ads shown in the EU, read the disclosed impression ranges, country shares, and targeting settings.
- Lead research: see which companies advertise a topic (for example a keyword such as
SOC2) and which entity pays for the ads.
How to scrape the LinkedIn Ad Library
- Open the Actor on Apify and go to the Input tab.
- Enter at least one company name in Company / Advertiser Names, a search term in Keywords, or an Ad Library URL in Direct LinkedIn Ad Library URLs.
- Optionally set a country (
DEorDE,FR,NL), ad format, date window, Max Ads per Query, and Fetch Ad Detail Pages (needed for destination URLs, run dates, and EU data). - Start the run. The default proxy is Apify Residential (see the cost section below).
- Open the Output tab and download the dataset as JSON, CSV, Excel, or HTML, or read it through the API.
To run it regularly, create a Schedule in Apify Console, or call it from n8n, Make, Python, or an MCP client (see Integrations).
How much does it cost to scrape the LinkedIn Ad Library?
You pay per returned ad, with no start fee: ad costs $0.002 per ad ($2.00 per 1,000), and ad-detail costs another $0.002 per ad ($2.00 per 1,000) when the ad's detail page was loaded.
| Run | Calculation | Event cost |
|---|---|---|
1,000 ads, search results only (fetchAdDetails off) | 1,000 x $0.002 | $2.00 |
1,000 ads with detail data (fetchAdDetails on) | 1,000 x $0.002 + 1,000 x $0.002 | $4.00 |
24 ads (the default maxAdsPerQuery) with detail data | 24 x $0.004 | $0.096 |
These figures assume every detail page loads successfully. They are the full price: platform usage, including the Apify Residential proxy traffic that platform runs use, is paid by the Actor owner and not charged to you. Ads that are inspected but filtered out (for example by minDaysActive) are not billed. The billing rules are listed in full under Pricing.
How it works
This scraper reads ads from the public LinkedIn Ad Library (linkedin.com/ad-library) by company name, keyword, or direct URL. It uses plain HTTP/2 requests without a LinkedIn login or browser automation, so your LinkedIn account is never involved and runs stay within 256 MB RAM. The HTTP client keeps an in-memory cookie jar for the anonymous session cookies LinkedIn sets during the run; nothing is stored between runs.
Search results give you the ad ID, company name, ad format, headline, body preview, and image thumbnail. Turning on fetchAdDetails loads each ad's detail page as well. That fills in untruncated ad copy, click-through URLs with their full utm_* and hsa_* query parameters, progressive MP4 video links sorted by bitrate, the legal entity paying for the ad, first and last shown dates, and EU Digital Services Act data (impression ranges, country shares, and whether job, company, or retargeting lists were targeted or excluded).
If you only want long-running ads, set minDaysActive to a threshold such as 30 or 60. Shorter campaigns are filtered out before being written to the dataset. Each inspected ad needs its own detail-page request, and ads that are filtered out are not billed, so scanning is bounded: a query stops after 50 consecutive inspected ads without a match (hit rate below roughly 6%), and in any case after 5 x maxAdsPerQuery inspected ads (at most 5,000). The same stop rule applies to the adFormat and advertiser-name filters. When a scan is stopped, the log states the numbers (inspected, collected, detail fetches) and RUN_SUMMARY.inspectionStops counts it. If that stops a query too early for you, raise maxAdsPerQuery or narrow the search with countries and dateOption. LinkedIn shows no run dates ("Ran from") for some ads, mostly new ones. minDaysActive skips those ads because their age is unknown; they count as non-matches for the scan stop above and are reported in RUN_SUMMARY.undatedAdsSkipped and in the log, so a query that ends empty tells you why. The detail requests for skipped ads are made but not billed to you; without minDaysActive, such ads are delivered with firstShownDate, lastShownDate, daysActive and isActive set to null.
Input Example
{"advertisers": ["HubSpot", "Personio"],"countries": "DE","adFormat": "ALL","maxAdsPerQuery": 24,"fetchAdDetails": true,"minDaysActive": 14}
Input Fields
| Field | Type | Default | Notes |
|---|---|---|---|
advertisers | string[] | [] | Company or advertiser names (provide at least one of advertisers, keywords, or adUrls; single-field query, company, or advertiser also accepted). LinkedIn matches the name anywhere inside an advertiser's name, so only ads whose advertiser name equals the requested name or starts with it (ignoring case, punctuation and legal forms such as Inc./GmbH) are kept: HubSpot keeps "HubSpot, Inc." and "HubSpot for Developers" but drops "IXTENSA HubSpot". An advertiser whose LinkedIn name puts something in front of the brand (for example "DB Deutsche Bahn") is only kept if you enter that exact displayed name. Dropped ads are not charged and are counted in RUN_SUMMARY.advertiserMismatchDropped. Use keywords to search without this filter. |
keywords | string[] | [] | Search terms across all LinkedIn ads |
adUrls | string[] | [] | Direct /ad-library/search or /ad-library/detail/<id> URLs. Only https://www.linkedin.com/ad-library/... (or linkedin.com) URLs are accepted; anything else is listed as a failed input in RUN_SUMMARY and is never fetched. Duplicate inputs (same advertiser or keyword ignoring case, same URL) are processed once. Direct detail URLs are processed before all search inputs, so an ad you request by its detail URL is delivered with its detail data even when a search in the same run would also find it (every ad is delivered at most once per run; the search then skips it as a duplicate). |
countries | string | "ALL" | "ALL" or ISO-2 codes like "DE" or "DE,FR,NL" |
adFormat | string | "ALL" | ALL, IMAGE, VIDEO, CAROUSEL, DOCUMENT, EVENT, TEXT |
dateOption | string | "ALL" | ALL, last-30-days, current-month, current-year, last-year, custom-date-range |
startDate | string | "" | Start date YYYY-MM-DD when dateOption is custom-date-range (LinkedIn allows the past 12 months) |
endDate | string | "" | End date YYYY-MM-DD when dateOption is custom-date-range |
maxAdsPerQuery | integer | 24 | Max ads per query (1 to 5000) |
fetchAdDetails | boolean | false | Load detail pages for UTM links, MP4 streams, dates, and EU disclosures |
minDaysActive | integer | 0 | Minimum run length in days (0 disables filtering; > 0 automatically enables fetchAdDetails). Scanning stops after 50 consecutive ads without a match. |
concurrency | integer | 8 | Parallel detail-page requests (1 to 20); only used when detail pages are loaded |
proxyConfiguration | object | {"useApifyProxy": true, "apifyProxyGroups": ["RESIDENTIAL"]} | Platform runs default to Apify RESIDENTIAL proxies because LinkedIn blocks cloud/AWS datacenter IPs (HTTP 403) and Apify Proxy restricts linkedin.com on datacenter pools (HTTP 597). You can also supply custom external residential/ISP proxyUrls ({"useApifyProxy": false, "proxyUrls": ["http://user:pass@host:port"]}). Local runs (apify run) automatically skip Apify Proxy unless APIFY_USE_PROXY_LOCALLY=1, and accounts without RESIDENTIAL access fall back to direct HTTP/2 (expect HTTP 403 there). A proxy connection error is retried on a fresh proxy session. The run switches to direct requests only when one request has failed on 3 different proxy sessions in a row while no other request got a response through the proxy in the meantime; a short proxy outage that hits several parallel requests at once does not switch it. The switch is logged as a warning and counted in RUN_SUMMARY (proxyErrors, proxyFallbackActivations). |
Sample Output
{"query": "HubSpot","queryType": "advertiser","adId": "1638499894","adLibraryUrl": "https://www.linkedin.com/ad-library/detail/1638499894","advertiserName": "HubSpot","advertiserCompanyId": "68529","advertiserLinkedinUrl": "https://www.linkedin.com/company/68529","paidForBy": "HubSpot, Inc.","format": "VIDEO","formatLabel": "Video Ad","creativeTypeRaw": "SPONSORED_VIDEO","adHeadline": "Mehr starke Kampagnen an den Start bringen.","adBodyText": "Gutes Marketing braucht Gespür. Marketing-Studio automatisiert die Kampagnenverwaltung, damit Sie sich darauf konzentrieren können, Ihre Ideen umzusetzen.","ctaText": "Learn more","landingPageUrl": "https://www.hubspot.de/products/marketing/studio?utm_source=linkedin&utm_medium=paid_brandstrategy&utm_campaign=BrandStrategy_VideoViews_DE_EMEA_DACH_MarketingStudio_AnnoyinglyGood-Q4-2026_InFeed-LAN_MarketingGabby_MarketingStudio-PP-15&trk=ad_library_ad_preview_headline_content","landingDomain": "www.hubspot.de","previewImageUrl": "https://media.licdn.com/dms/image/v2/D4E10AQFxQp_K5Eleow/videocover-high/B4EaHErJvwIgBI-/0/1794301011337?e=2147483647&v=beta&t=pvxBt-xelw93p75Z2m_Z7XUZMETnaQYsWbgagBrP5h8","videoUrl": "https://dms.licdn.com/playlist/vid/v2/D4E10AQFxQp_K5Eleow/progressive-servable-video/B4EaHErJvwIgAY-/0/1794301010627?e=2147483647&v=beta&t=eF7PSnFZjj-kuMYg-yZjr9wwo6IgpRlrtnJbk1B3o3c","firstShownDate": "2026-11-11","lastShownDate": "2026-11-13","daysActive": 3,"isActive": true,"impressionsRange": "20k-30k","impressionsMin": 20000,"impressionsMax": 30000,"countryImpressions": [{ "country": "Germany", "sharePercent": 99.0 }],"targetingSegments": {"Language": "Targeting includes English","Location": "Targeting includes Germany"},"targetingFacets": {"Audience": { "targeted": false, "excluded": true },"Demographic": { "targeted": false, "excluded": false },"Company": { "targeted": true, "excluded": true },"Education": { "targeted": false, "excluded": false },"Job": { "targeted": true, "excluded": false },"Member Interests and Traits": { "targeted": false, "excluded": false }},"detailsFetched": true,"scrapedAt": "2026-11-13T12:51:32Z"}
Date fields (firstShownDate, lastShownDate, daysActive, isActive): LinkedIn shows no run dates for some ads, mostly new ones. For those ads the four fields are null, even when detailsFetched is true (the detail page loaded and ad-detail is charged). They are also null when the detail page was not loaded. Treat null as "unknown", not as "not active".
Pricing
Pay-Per-Event with no start fee. Every returned ad triggers ad ($2.00 per 1,000 ads). When fetchAdDetails is enabled—or when minDaysActive > 0, which requires loading each ad's detail page to read firstShownDate and lastShownDate—returned ads whose detail page succeeded (detailsFetched: true) also trigger ad-detail ($2.00 per 1,000 ads). A direct /ad-library/detail/<id> URL in adUrls always loads the detail page, so a successful one is charged ad plus ad-detail, even with fetchAdDetails off. The ad event is charged when the record is written; ad-detail is charged only after that, and never for a record that was not written (for example when your spending limit is reached). Ads filtered out before dataset output are not billed, and query diagnostics are written free of charge to RUN_SUMMARY in the Key-Value Store.
Proxy traffic is not charged to you. Platform runs fetch LinkedIn through Apify RESIDENTIAL proxies. With pay-per-event pricing, that traffic and all other platform usage are paid by the Actor owner, so you pay only the events above. We have not measured the traffic per 1,000 ads; it depends on how many search pages and detail pages a run loads. Search pages are requested once per page of results. Detail pages (fetchAdDetails, minDaysActive > 0, or detail URLs) add one extra request per inspected ad, and ads that are inspected but then filtered out (minDaysActive, adFormat, advertiser-name filter, duplicates) cause that request without producing a billed event. The scan limits described above bound this, but a narrow filter on a large advertiser can still load many detail pages for few results. If you pass your own proxyUrls, your proxy provider bills you for that traffic.
Run Diagnostics (RUN_SUMMARY)
Every run writes RUN_SUMMARY to the Key-Value Store, even when it crashes or is aborted. It counts inputs as succeeded (at least one ad delivered, or all of its ads were already delivered by an earlier input), empty (LinkedIn answered with its "No results found" page, or every ad was filtered out) and failed, with errorType, httpStatus and a message per failed input in failedInputs. An HTTP 200 page that has neither ad cards nor the "No results found" marker (soft block, login wall, layout change) is a failed input (UnexpectedPage), not an empty one. With minDaysActive set, an input whose detail pages all failed is reported as failed (DetailFetchFailed) instead of empty. detailFetchFailures counts detail pages that could not be loaded; those ads are delivered without detail data and without the ad-detail charge (or skipped when minDaysActive could not be verified). If every input fails, the run is marked as failed. duplicatesSkipped counts ads that were found by more than one input. undatedAdsSkipped counts ads skipped by minDaysActive because LinkedIn shows no run dates for them, and belowMinDaysActiveSkipped counts ads skipped because they ran for fewer than minDaysActive days. budgetStopped counts inputs that were cut short (or never started) because your spending limit was reached or the run was aborted or migrated; they are neither succeeded nor empty, and after a restart they are run again from their saved progress, so every input is counted exactly once in the end. addonChargeErrors counts ad-detail charges that the platform rejected or that failed; the ad is still delivered (and never pushed again by a later input), only the add-on charge for it is missing, and a warning with the ad ID is logged. The counters that come from scanning result pages (detailFetchFailures, duplicatesSkipped, undatedAdsSkipped, belowMinDaysActiveSkipped, inspectionStops, advertiserMismatchDropped) are kept per input: when a cut-short input is rescanned after a restart its numbers replace the earlier ones instead of being added, and proxyErrors and proxyFallbackActivations are carried across restarts. An input that ran to its natural end is succeeded or empty even if an abort or migration was announced at the same moment. baseChargeErrors counts ads whose ad charge failed after the ad had already been written to the dataset (the SDK writes first, then charges); such an ad is delivered and counted in itemsPushed, is never pushed again, no ad-detail is charged for it, and a warning with the ad ID is logged. If the ad charge fails 3 times in a row (the charging API is unavailable), the Actor stops starting deliveries so no further ads are handed out unpaid: stoppedForChargeErrors is true in RUN_SUMMARY, the run is marked as failed with the message "Charging is unavailable; stopped to avoid delivering unpaid results", and delivered ads are kept. Resurrect the run to continue with the unfinished inputs; delivered ads are not pushed again. A successful charge resets the count.
Each ad is delivered and charged at most once per run: duplicates across advertisers, keywords and URLs are skipped before any detail request, and the delivered ad IDs and finished inputs are persisted (LINKEDIN_RUN_STATE), so a planned platform migration neither re-pushes nor re-charges ads: when the platform announces a migration, the Actor starts no further push or charge, saves its state immediately and continues in the new container with the remaining inputs. After an unplanned crash or resurrection, ads pushed after the most recent state save (the state is saved about every minute, so up to roughly a minute of deliveries) can be delivered and charged again; the Actor cannot rule that out.
Integrations (n8n, Make, MCP & Python)
n8n / Make / REST API (run-sync-get-dataset-items)
Use a standard HTTP Request node (POST, Authentication: Bearer Auth with your APIFY_TOKEN) to run this Actor and receive the extracted ads directly as JSON items:
curl -X POST "https://api.apify.com/v2/acts/gutacker~linkedin-ad-library/run-sync-get-dataset-items" \-H "Authorization: Bearer <APIFY_TOKEN>" \-H "Content-Type: application/json" \-d '{"advertisers": ["HubSpot", "Salesforce"],"countries": "DE","maxAdsPerQuery": 15,"minDaysActive": 7,"fetchAdDetails": true}'
AI Agents & Model Context Protocol (Claude, Cursor, n8n AI Agent)
Expose this Actor as a live tool to any MCP-compatible agent via the official Apify MCP Server:
{"mcpServers": {"apify": {"url": "https://mcp.apify.com/?actors=gutacker/linkedin-ad-library,gutacker/google-ads-transparency","headers": { "Authorization": "Bearer <APIFY_TOKEN>" }}}}
Python (apify-client)
from apify_client import ApifyClientclient = ApifyClient("<APIFY_TOKEN>")run = client.actor("gutacker/linkedin-ad-library").call(run_input={"advertisers": ["HubSpot"],"countries": "DE","maxAdsPerQuery": 15,"fetchAdDetails": True,})items = list(client.dataset(run["defaultDatasetId"]).iterate_items())
FAQ
Is it legal to scrape the LinkedIn Ad Library?
This Actor reads the public LinkedIn Ad Library pages, which do not require a login, and it does not use a LinkedIn account. This is not legal advice. Whether your use is allowed depends on your jurisdiction, LinkedIn's terms, and what you do with the data. Ad copy and advertiser fields can include names of companies and, for some ads, a person's profile, so handle the data according to the data-protection rules that apply to you, and consult a lawyer about your own use case.
Do I need a LinkedIn login or cookies?
No. The Actor makes anonymous HTTP requests and does not accept a LinkedIn account or cookies as input. Your LinkedIn account is never involved.
Can I use it with n8n, Make, or Claude via MCP?
Yes. Call the Apify API (for example the run-sync-get-dataset-items endpoint from an HTTP Request node in n8n or Make), use apify-client in Python, or add the Actor to the Apify MCP server for Claude, Cursor, or other MCP clients. Examples are in Integrations.
Why did my run return 0 results?
Open the RUN_SUMMARY record in the run's Key-Value Store. Common causes:
- LinkedIn answered "No results found" for that advertiser or keyword (counted as
empty). - With
minDaysActive, ads were skipped because they ran fewer days, or because LinkedIn shows no run dates for them (belowMinDaysActiveSkipped,undatedAdsSkipped). - With
advertisers, ads from advertisers whose name does not equal or start with your input were dropped (advertiserMismatchDropped). Usekeywordsto search without that filter, or enter the exact name shown on LinkedIn. - The
adFormat,countries, ordateOptionfilters were too narrow. - LinkedIn blocked the request. HTTP 403 usually means LinkedIn blocked the IP, for example when no working Residential proxy was available; see
failedInputsfor the error type and status.
If you gave no advertiser, keyword, or URL, the run fails right away with a message saying so.
How many ads can I get per run?
maxAdsPerQuery accepts 1 to 5,000 and applies to each advertiser, keyword, or URL separately. The default is 24. Scanning also stops early when many inspected ads in a row do not match your filters; the stop rules are described under How it works.
Which ad data is only available with detail pages?
Destination URLs with UTM parameters, call-to-action text, run dates, the paying legal entity, advertiser company ID and profile URL, and EU impression and targeting data come from each ad's detail page. Turn on fetchAdDetails (or set minDaysActive above 0, which turns it on) to get them. Impression and targeting data are disclosed by LinkedIn for EU ads, so other ads may have these fields empty.
Which proxy does it use, and can I use my own?
On the Apify platform the default is Residential proxy, because LinkedIn blocks datacenter IPs. The Apify proxy traffic is paid by the Actor owner, not charged to you. You can pass your own residential or ISP proxyUrls instead; your proxy provider then bills you for that traffic.
Other Scrapers by gutacker
Also available: Google Ads Transparency Scraper for Google Search and YouTube ads, EU Public Tenders & Winner Company Enricher for European procurement leads, Company KYB, DNS Tech Stack & NIS2 Readiness Check for GLEIF LEI and security verification, Career Site Jobs Scraper for Greenhouse/Ashby/Lever/Personio job boards, Shopify Store Spy for Shopify products and store contacts, and App Store & Google Play Reviews for mobile app reviews.