A simple Node.js + Playwright script to extract names from LinkedIn Recruiter search results and export them to CSV.
- Headed or headless Chromium via Playwright
- Incremental scrolling to load all results
- Pagination support (handles the
startparameter automatically) - CSV output per filter, deduplicated
- Graceful cleanup on Ctrl + C, writes partial CSV
- Fully configurable via
config.json
- Node.js v16+
- npm (bundled with Node.js)
- A LinkedIn Recruiter seat with saved-search URLs
git clone https://github.com/asht0nmb/linkedin_scraper.git
cd linkedin_scraper
npm install # installs dependencies & downloads Chromium
cp config.template.json config.jsonOpen config.json and update:
{
"filters": [
{
"name": "your_filter_name",
"url": "https://www.linkedin.com/talent/...&start=0&uiOrigin=..."
}
// add more filters as needed
],
"navigationWait": 5000, // ms to wait after each page load
"scrollDistance": 200, // px per scroll step
"scrollWait": 500, // ms between scroll steps
"nameSelector": "span[data-test-row-lockup-full-name] a"
}- filters: array of
{ name, url }—the URL must include your saved search andstart=0. - navigationWait, scrollDistance, scrollWait: tweak for your network/machine speed.
- nameSelector: CSS selector for the profile name element.
Note:
PER_PAGEis hard-coded to 25 inscrape.js(LinkedIn shows 25 profiles per page).
npm run scrape-
The script launches Chromium and navigates to your first filter’s URL.
-
Log in (complete 2FA) and press ENTER in the terminal.
-
It will iterate each filter, paginate, scroll, collect names, and write CSVs:
▶️ Scraping filter: your_filter_name → Navigating to start=0 • Got 25 names → Navigating to start=25 • Got 18 names ✅ Wrote 43 names to linkedin_names_your_filter_name.csv -
When complete, the browser closes and you’ll see
All done!.
| Command | Description |
|---|---|
npm install |
Install dependencies & auto-download Chromium |
npm run scrape |
Run the scraper |
npm test |
(stub) placeholder |
- Headless mode: set
headless: trueinchromium.launch() - Output directory: adjust the CSV file path in
scrape.js - Add columns: modify the CSV writer header in
scrape.js - Error handling: extend the Ctrl + C handler or wrap calls in
try/catch
MIT © 2025 asht0nmb