Apify example task · whoareyouanas/linkedin-ad-library-scraper
Research LinkedIn ad creatives from one company
Collect three LinkedIn Ad Library creatives for a sample company ID. Review available ad copy, advertiser, format, media links and retrieval level before substituting a different advertiser.
- Actor
- LinkedIn Ad Library Scraper & API: Ads and Targeting
- Result limit
- 3 (maxResults)
- Estimated cost
- Up to $0.0056
- Run options
- 0.5 GB memory · 180 s timeout
Example updated 2026-11-20 · actor build 0.3.7 · runs in your own Apify account
01 / About the actor
LinkedIn Ad Library Scraper & API: Ads and Targeting
Research LinkedIn ads by company ID, company name, keyword, or direct ad URL. Choose listing or full-detail mode and retain retrieval-level and coverage evidence for every exported ad.
Precise advertiser research
Use company IDs when you need a specific advertiser rather than an ambiguous company-name match.
Listing or full detail
Choose a lighter listing record or fetch supported detail fields with explicit fallback behavior.
Check search coverage
Review run summaries, retrieval levels, and source warnings before treating a search as complete.
02 / Input
The exact input this example runs.
Provide companyIds, companies, keywords, searches, or adUrls according to the documented search mode. Set maxResults and maxResultsPerSearch. Mode full does not guarantee every possible field is public.
{
"searches": [
{
"type": "companyId",
"value": "68529"
}
],
"mode": "full",
"maxResults": 3,
"maxResultsPerSearch": 3,
"maxConcurrency": 1
}| Field | Value in this example | What it controls |
|---|---|---|
| searchesChange this | {"type":"companyId","value":"68529"} | Objects with type (companyId, companyUrl, advertiser, keyword, searchUrl, adUrl), string value, optional label and per-search filters. Organization IDs must be strings. URL filters are authoritative; contradictory structured filters are rejected. Invalid searches are recorded while other valid searches continue. |
| modeChange this | "full" | Defaults to full in the Actor code. Listing records only source-visible card fields and marks truncated copy. Full additionally fetches each eligible unique detail. Missing source disclosure is not invented. Direct ad URLs always require full retrieval. |
| maxResultsChange this | 3 | Global delivered-ad limit; defaults to 100 in the Actor code. Zero removes this row limit while request/time/charge budgets still apply. |
| maxResultsPerSearch | 3 | Per-search unique usable match limit. Zero removes this row limit. |
| maxConcurrency | 1 | Upper request ceiling. Host pacing can reduce actual concurrency. |
Other inputs you can add (8)
| Field | Type / required | Default | Purpose |
|---|---|---|---|
| companies | array | Not specified | Advertiser name text or a public LinkedIn company URL. Names are text matches; URL slugs must resolve to a verified organization ID. |
| companyIds | array | Not specified | Positive numeric organization IDs supplied as strings. Returned advertiser identity is verified before exact matches are delivered. |
| keywords | array | Not specified | Independent text searches across ad copy. |
| adUrls | array | Not specified | HTTPS public /ad-library/detail/ or /ad-library/employer-brand/ URLs. Search filters do not apply to direct ads. |
| allowListingFallback | boolean | true | In full mode, deliver usable card data at the listing event price when detail retrieval fails. False withholds those ads and records their failures. |
| filters | object | Not specified | Optional countries (ISO alpha-2 array), payer text, dateRange, startDate and endDate. No country constraint by default. Date presets: all-time, last-30-days, current-month, current-year, last-year, custom. Custom dates require both YYYY-MM-DD dates. Unknown filters are rejected; last-7-days and last-90-days are not currently advertised. |
| maxRequests | integer | 5000 | Includes retries and company resolution. Reaching this budget produces an explicit partial summary. Minimum: 1 · Maximum: 1000000 |
| maxRunSeconds | integer | 900 | Operational deadline in seconds. Reaching it produces an explicit partial summary. Minimum: 1 · Maximum: 86400 |
03 / Make it yours
Change these fields for your own research.
01 · searches
Independent searches
Objects with type (companyId, companyUrl, advertiser, keyword, searchUrl, adUrl), string value, optional label and per-search filters. Organization IDs must be strings. URL filters are authoritative; contradictory structured filters are rejected. Invalid searches are recorded while other valid searches continue.
Example: {"type":"companyId","value":"68529"}
02 · mode
Collection mode
Defaults to full in the Actor code. Listing records only source-visible card fields and marks truncated copy. Full additionally fetches each eligible unique detail. Missing source disclosure is not invented. Direct ad URLs always require full retrieval.
Example: "full"
03 · maxResults
Global maximum unique ads
Global delivered-ad limit; defaults to 100 in the Actor code. Zero removes this row limit while request/time/charge budgets still apply.
Example: 3
Run it in three steps
- Open the example on Apify and select Try for free to copy it into your Apify account.
- Replace the sample values above with your own target and keep the limit small.
- Start the run, then export the dataset as JSON, CSV or Excel.
04 / Output
What the results table shows.
- Inspect retrievalLevel to distinguish full-detail records from usable listing fallbacks.
- Available targeting, impression ranges, documents, videos, and original files vary by source and ad format. Full detail means the actor's available-field checks passed, not that every field exists.
Columns in the “Ads” view
adId
Ad ID
advertiserName
Advertiser
advertiserCompanyId
advertiserCompanyId
format
Format
headline
Headline
body
Ad copy
imageUrl
Image
videoUrl
videoUrl
clickUrl
clickUrl
paidBy
paidBy
retrievalLevel
retrievalLevel
adUrl
Ad Library
scrapedAt
scrapedAt
A view selects columns for the table. The full JSON export keeps every field, including nested arrays and objects.
05 / Cost
What this example costs to run.
At most about $0.0056: up to 3 results at $0.0012 each (Full ad) plus $0.002 for the start event at 1 GB of memory. Fewer results cost less. The live Pricing tab on Apify is authoritative.
Actor Start
$0.002 per event · per GB of memory
Listing ad
Tiered by Apify plan
Full ad
Tiered by Apify plan
Prices checked 2026-11-22. Set a run spending limit in Apify when you widen the input.
06 / API
Run the same input from your code.
This call starts a billable run of LinkedIn Ad Library Scraper & API: Ads and Targeting with this example's input and returns the dataset items when it finishes. Synchronous calls wait up to five minutes; for longer runs, POST to /runs instead and read the run's default dataset when it succeeds. Keep the token in an environment variable.
curl --request POST \
'https://api.apify.com/v2/acts/whoareyouanas~linkedin-ad-library-scraper/run-sync-get-dataset-items?format=json' \
--header "Authorization: Bearer $APIFY_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"searches":[{"type":"companyId","value":"68529"}],"mode":"full","maxResults":3,"maxResultsPerSearch":3,"maxConcurrency":1}'Coverage & interpretation
Check the result before relying on it.
- Company-name and keyword searches can be ambiguous. Use IDs and review advertiser context.
- Impression ranges are not exact counts, and last-shown dates do not establish an ad's current activity. Original PDFs or every document page are not guaranteed.
Questions
About this example.
What does the "Research LinkedIn ad creatives from one company" example collect?
Collect three LinkedIn Ad Library creatives for a sample company ID. Review available ad copy, advertiser, format, media links and retrieval level before substituting a different advertiser. It runs LinkedIn Ad Library Scraper & API: Ads and Targeting, published by whoareyouanas on Apify.
Which input does this example use?
Independent searches (searches) set to {"type":"companyId","value":"68529"}; Collection mode (mode) set to "full"; Global maximum unique ads (maxResults) set to 3. The full JSON input is shown on this page.
How much does it cost to run this example?
At most about $0.0056: up to 3 results at $0.0012 each (Full ad) plus $0.002 for the start event at 1 GB of memory. Fewer results cost less. The live Pricing tab on Apify is authoritative.
How do I change it for my own research?
Open the example on Apify and select Try for free to copy it into your account, then edit Independent searches, Collection mode, Global maximum unique ads. Keep the result limit small for the first run and check the output before scaling up.
Can I run it from the API or on a schedule?
Yes. Send the same JSON input to the LinkedIn Ad Library Scraper & API: Ads and Targeting run endpoint with your Apify API token, or save the copied task in your Apify account and add a schedule. Results land in the run's default dataset as JSON, CSV or Excel.
More examples
Related tasks you can copy.
Compare Notion and Asana ads on LinkedIn
Use exact company URLs to sample public LinkedIn ad creatives from Notion and Asana. Compare available copy, payer information, formats and media links.
View exampleFind project management LinkedIn ads in Germany
Search LinkedIn ads for project management and apply Germany as the ad delivery country. Inspect available copy, payer and targeting fields in the returned sample.
View exampleFind LinkedIn cloud security ad examples
Search LinkedIn Ad Library for cloud security ads. Review advertiser names, copy and available creative formats before building a messaging brief.
View exampleLinkedIn Profile Scraper
Review public LinkedIn executive career history
Look up Satya Nadella’s public LinkedIn profile to inspect available headline, roles and education fields. Use a different public profile URL for your own research.
View exampleGuides