SFOLN

Catalogue / Ad intelligence

LinkedIn Ads Library Scraper

sfoln/linkedin-ads-search · Social media, Lead generation, Ecommerce On request

Search the LinkedIn Ad Library by keyword, company name or ID, or look up ad URLs: advertiser, headline, body, CTA, landing URL, media, run dates, impressions and targeting, one row per ad. $1.50 per 1,000 ads + $0.004 per results page.

About

What it does

LinkedIn Ads Library Scraper searches the LinkedIn Ad Library by keyword, company name or company ID – or looks up ad URLs directly – and returns one dataset record per ad: advertiser and company page, ad type, headline, body text, call to action, landing URL, image / video / carousel media, run dates, impressions range, targeting summary and impressions by country. Filter by countries and date range. Built for B2B competitive research, ABM and demand-gen teams, agencies and AI agents.

Price

Price per delivered record

EventPricePer 1,000Charged for
LinkedIn ad
linkedin-ad
$0.0015$1.5 / 1,000Charged once per ad record delivered from the LinkedIn Ad Library (recordType ad). Duplicates, query summary rows and failed requests are not charged.
LinkedIn Ad Library request
linkedin-ads-query
$0.004$4 / 1,000Charged once per Ad Library results page fetched and once per ad URL looked up. A page without new ads is charged only when the upstream provider billed it. Failed requests are not charged.
LinkedIn ad details
linkedin-ad-details
$0.005$5 / 1,000Optional (includeAdDetails). Charged once per searched ad enriched from its ad page (impressions by country, full targeting, dates). Not charged when the details request fails.

Apify free plan: up to 10 items per run. Paid plans have no per-run cap; set maxTotalChargeUsd to cap spend.

Run

Call it from code, an agent or the Console

This API is private on Apify for now. Email us and we will publish it for you, usually within two working days. The calls below work once it is public. contact@sfoln.com

curl · synchronous run, rows in the response
curl -X POST "https://api.apify.com/v2/actors/sfoln~linkedin-ads-search/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"companies":["Microsoft"],"maxAdsPerQuery":10}'
mcp.json · hosted Apify MCP server
{
  "mcpServers": {
    "apify": {
      "type": "http",
      "url": "https://mcp.apify.com?tools=sfoln/linkedin-ads-search"
    }
  }
}
asynchronous run · for large batches
POST https://api.apify.com/v2/actors/sfoln~linkedin-ads-search/runs?maxTotalChargeUsd=1
GET  https://api.apify.com/v2/actor-runs/{runId}            # until status is SUCCEEDED
GET  https://api.apify.com/v2/datasets/{defaultDatasetId}/items?format=json

Authenticate with an Apify API token. MCP clients can instead sign in with OAuth when prompted. Example prompt for an agent: List the 20 most recent LinkedIn ads run by Microsoft and summarize their headlines, calls to action and landing pages.

Input

Input fields

Search the LinkedIn Ad Library by keyword, company name or company ID, or look up ad URLs. Each query returns one dataset record per ad plus one summary record.

FieldTypeDefaultMeaning
keywordsarray—Keywords
Keywords to search ad content for, one per line. Accounts on the Apify free plan can process up to 10 queries per run (keywords, companies, company IDs and ad URLs together).
companiesarray—Company names
Advertiser company names (e.g. Microsoft), one per line.
companyIdsarray—Company IDs
Numeric LinkedIn company IDs or linkedin.com/company/<id> URLs (most precise).
adUrlsarray—Ad URLs
LinkedIn Ad Library ad URLs (https://www.linkedin.com/ad-library/detail/<id>) to look up directly.
maxAdsPerQueryinteger50Max ads per query
Maximum ads returned per keyword, company or company ID (1–500). Range 1–500.
countriesarray—Countries
Optional 2-letter country codes the ads were shown in (e.g. US, CA).
startDatestring—Shown from (YYYY-MM-DD)
Optional; requires endDate. LinkedIn accepts dates from one year ago up to yesterday.
endDatestring—Shown until (YYYY-MM-DD)
Optional; requires startDate. Must be yesterday or earlier.
includeAdDetailsbooleanfalseInclude ad details
Open every found ad's detail page for impressions by country, full targeting and dates. Adds one linkedin-ad-details event per ad.
maxQueriesinteger100Max queries
Safety cap on keywords + companies + IDs + ad URLs processed in this run. Range 1–1000.
concurrencyinteger4Concurrency
Queries processed in parallel (1–8). Range 1–8.
itemTimeoutSecsinteger900Time limit per query (seconds)
Pagination (and ad-detail calls) for one keyword, company or ID stops cleanly shortly before this limit (60–3600). Raise it for very large per-query limits. Range 60–3600.
includeRawbooleanfalseInclude raw upstream response
Attach the unmodified upstream ad object(s) to each ad record under `raw` (larger output).
Example input
{
  "companies": [
    "Microsoft"
  ],
  "maxAdsPerQuery": 10
}

Output

One record per input item

Records land in the run's dataset; a synchronous call returns them directly. Each has a status (ok is charged; everything else is free) and a charged flag. The run's OUTPUT record totals items and charges.

FieldTypeMeaning
inputstring | objectInput
The input query this record belongs to.
recordTypestringRow type
ad (one per ad, charged linkedin-ad) | query (one summary per query, free).
statusstringStatus
ok | not_found | error | skipped_invalid | skipped_budget | skipped_free_plan
chargedbooleanCharged
Whether this record incurred a pay-per-event charge.
chargedEventstringCharged event
Pay-per-event event charged for this record.
sourcestringSource
Upstream data source (scrapecreators = ScrapeCreators API over the public ad library).
fetchedAtstringFetched at
ISO timestamp.
errorobjectError
code / message when status is not ok.
warningsarrayWarnings
Non-fatal notes (e.g. stopped early).
querystring | nullQuery
Keyword, company, company ID or ad URL the row belongs to.
queryTypestring | nullQuery type
keyword | company | companyId | adUrl.
positioninteger | nullPosition
1-based position within the query results.
adIdstring | nullAd ID
LinkedIn Ad Library ad ID.
adLibraryUrlstring | nullAd Library URL
Public LinkedIn Ad Library page of the ad.
advertiserstring | nullAdvertiser
Advertiser (paying company).
advertiserUrlstring | nullAdvertiser page
Advertiser's LinkedIn company page.
posterstring | nullPoster
Page or person shown as the poster.
promotedBystring | nullPromoted by
Promoting page for thought-leader ads.
adTypestring | nullAd type
e.g. Single Image Ad, Video Ad, Carousel Ad, Document Ad.
headlinestring | nullHeadline
Ad headline.
bodystring | nullBody
Ad introductory text.
ctaTextstring | nullCTA text
Call-to-action button text.
landingUrlstring | nullLanding URL
Destination URL (LinkedIn trk tracking parameter removed).
imageUrlstring | nullImage URL
Creative image.
videoUrlstring | nullVideo URL
Creative video.
carouselImageUrlsarrayCarousel images
Carousel card images.
startDatestring | nullStart date
ISO date the ad started running (null when LinkedIn hides it).
endDatestring | nullEnd date
ISO date the ad stopped running.
adDurationstring | nullRun text
LinkedIn's run description, e.g. Ran from Aug 10, 2025 to Aug 10, 2025.
totalImpressionsstring | nullImpressions
Impressions range, e.g. < 1k or 5k-10k.
impressionsByCountryarrayImpressions by country
Country and share of impressions (mostly from ad details).
targetingobject | nullTargeting
Targeting summary lines (language, location, audience, company…).
detailsFetchedboolean | nullDetails fetched
Record comes from (or was enriched by) the ad detail page.
detailsChargedEventstring | nullDetails event
linkedin-ad-details when details were charged for this ad.
adsDeliveredinteger | nullAds delivered
Ads delivered for this query (summary rows).
pagesFetchedinteger | nullPages fetched
Upstream pages / lookups fetched (summary rows).
queryFeesChargedinteger | nullRequest fees charged
linkedin-ads-query events charged (summary rows).
adDetailsChargedinteger | nullDetails charged
linkedin-ad-details events charged (summary rows).
totalResultsinteger | nullTotal results
Total matching ads reported by LinkedIn (summary rows).
stopReasonstring | nullStop reason
limit | end | budget | max_pages | deadline | error | empty_pages (summary rows).
Example record
{
  "input": {
    "kind": "company",
    "value": "Microsoft"
  },
  "recordType": "ad",
  "query": "Microsoft",
  "queryType": "company",
  "position": 1,
  "adId": "823975056",
  "adLibraryUrl": "https://www.linkedin.com/ad-library/detail/823975056",
  "advertiser": "Microsoft",
  "advertiserUrl": "https://www.linkedin.com/company/1035",
  "poster": "Microsoft",
  "promotedBy": null,
  "adType": "Single Image Ad",
  "headline": null,
  "body": "The countdown has begun – grab your discounted tickets now for #FabConEurope in Vienna! …",
  "ctaText": null,
  "landingUrl": "http://msft.it/6043sMFt3",
  "imageUrl": "https://media.licdn.com/dms/image/…",
  "videoUrl": null,
  "carouselImageUrls": [],
  "startDate": "2025-08-10T05:00:00.000Z",
  "endDate": "2025-08-10T05:00:00.000Z",
  "adDuration": "Ran from Aug 10, 2025 to Aug 10, 2025",
  "totalImpressions": "< 1k",
  "impressionsByCountry": [],
  "targeting": {
    "language": "Targeting includes English",
    "location": "Targeting includes Netherlands",
    "company": "Exclusion targeting applied"
  },
  "detailsFetched": false,
  "status": "ok",
  "charged": true,
  "chargedEvent": "linkedin-ad",
  "source": "scrapecreators",
  "fetchedAt": "2026-10-14T10:00:00.000Z"
}

Machine-readable

This page for agents