LinkedIn Ad Library Scraper avatar

LinkedIn Ad Library Scraper

Pricing

from $4.99 / 1,000 results

Go to Apify Store
LinkedIn Ad Library Scraper

LinkedIn Ad Library Scraper

A fast, high-performance scraper built for lead generation, competitor analysis, and business intelligence. Extracts detailed business profiles, including name, contact details, emails, phone numbers, location, ratings, and reviews from LinkedIn. Supports custom search URLs, proxy rotation, and p...

Pricing

from $4.99 / 1,000 results

Rating

0.0

(0)

Developer

codingfrontend

codingfrontend

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

Apify actor to scrape ad listings from the LinkedIn Ad Library based on search queries.

Features

  • Search LinkedIn Ad Library by keyword or advertiser name
  • Filter ads by country/region
  • Extract advertiser names, ad text, dates, impressions, and media type
  • Automatic scrolling to load lazy-loaded results
  • Pagination support for multi-page results
  • Proxy support (residential proxies recommended)

Input

FieldTypeDefaultDescription
querystring"Google"Keyword or advertiser name to search for
maxItemsinteger50Maximum number of ad results to scrape (1–5000)
countrystring"US"Country code to filter ads by (e.g. US, GB, IN, DE)
proxyConfigurationobjectApify ResidentialProxy settings for the scraper

Example Input

{
"query": "Google",
"maxItems": 10,
"country": "US"
}

Output

Each scraped ad contains:

FieldTypeDescription
positionintegerResult position index
advertiserNamestringName of the advertiser
adTextstringText content of the ad
startDatestringDate the ad started running
endDatestringDate the ad stopped running
impressionsstringImpression count or range
linkstringURL to the ad entry in LinkedIn Ad Library
mediaTypestringType of ad creative (Text, Image, Video)
querystringThe search query used
countrystringThe country filter used
scrapedAtstringISO timestamp of when the data was scraped

Example Output

{
"position": 1,
"advertiserName": "Google",
"adText": "Build what's next with Google Cloud. Get started free.",
"startDate": "Jan 2025",
"endDate": "",
"impressions": "100K-500K",
"link": "https://www.linkedin.com/ad-library/detail/12345",
"mediaType": "Image",
"query": "Google",
"country": "US",
"scrapedAt": "2025-01-25T10:30:00.000Z"
}

Usage

Apify Console

  1. Go to the actor's page on Apify Console
  2. Set the input parameters
  3. Click "Start"

API

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_TOKEN' });
const run = await client.actor('your-username/linkedin-ad-library-scraper').call({
query: 'Google',
maxItems: 50,
country: 'US',
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
console.log(items);

Local Development

npm install
npm start

Project Structure

src/
├── main.js # Actor entry point — reads input, configures crawler
├── constants.js # Shared constants (URLs, scroll limits)
├── routes.js # Crawler route handlers (SEARCH)
└── utils/
└── extraction.js # Ad data extraction from page DOM