| name | salesnav-lead-search |
| description | Run ad-hoc Sales Navigator lead searches with all 33+ filter types, fetch full profiles, and export results as JSON. |
salesnav-lead-search
Run ad-hoc Sales Navigator lead searches with all 33+ filter types, fetch full profiles, and export results as JSON.
Prerequisites
- Node.js 22+
- Chrome with remote debugging enabled, and a logged-in
www.linkedin.com/sales/... tab kept open
- [chrome-cdp skill]
- LinkedIn Sales Navigator subscription
Requests run inside your Chrome tab (via CDP), not from Node — this is what lets them past LinkedIn's sales-api edge. So a Sales Navigator tab must stay open for every command, not just auth. If no /sales/ tab is open, open one (see chrome-cdp "Agent guidance"): node skills/chrome-cdp/scripts/cdp.mjs open https://www.linkedin.com/sales/home.
Setup
One-time auth -- validates your logged-in Sales Navigator session:
node salesnav-lead-search.mjs auth
Usage
Search leads
node salesnav-lead-search.mjs search --title="CTO" --headcount="E,F,G"
node salesnav-lead-search.mjs search --company="Microsoft" --seniority="VP,CXO" --region="San Francisco Bay Area"
node salesnav-lead-search.mjs search --keyword="machine learning" --industry="Technology" --years-experience="6-10"
node salesnav-lead-search.mjs search --title="VP Engineering" --company="Stripe" --exclude-company="Google"
node salesnav-lead-search.mjs search --changed-jobs --seniority="CXO" --headcount="G,H,I"
node salesnav-lead-search.mjs search --postal-code="94105" --radius=25 --title="Engineering Manager"
node salesnav-lead-search.mjs search --title="CTO" --start=25 --count=25
Show all filters
node salesnav-lead-search.mjs filters
Fetch full profiles
node salesnav-lead-search.mjs profiles ACwAABJVBJEB1234,ACwAABJVBJEB5678
node salesnav-lead-search.mjs profiles "urn:li:fsd_profile:ACoAABJVBJEB..."
Search + fetch profiles in one step
node salesnav-lead-search.mjs search-profiles --title="VP Engineering" --headcount="D,E"
node salesnav-lead-search.mjs search-profiles --title="CTO" --headcount="E,F" --max=50
All 33+ Filter Types
Company group
| Flag | Filter Type | Notes |
|---|
--company="Microsoft" | CURRENT_COMPANY | typeahead, multi, supports --exclude-company |
--headcount="B,C,D" | COMPANY_HEADCOUNT | B=1-10, C=11-50, D=51-200, E=201-500, F=501-1000, G=1001-5000, H=5001-10000, I=10001+ |
--past-company="Google" | PAST_COMPANY | typeahead, multi, supports --exclude-past-company |
--company-type="PUBLIC" | COMPANY_TYPE | multi |
--company-hq="United States" | COMPANY_HEADQUARTERS | typeahead, multi, supports --exclude-company-hq |
Role group
| Flag | Filter Type | Notes |
|---|
--function="Engineering" | FUNCTION | multi |
--title="CTO,VP Engineering" | CURRENT_TITLE | multi |
--seniority="VP,CXO" | SENIORITY_LEVEL | multi |
--past-title="Software Engineer" | PAST_TITLE | multi |
--years-at-company="1-2,3-5" | YEARS_AT_CURRENT_COMPANY | multi |
--years-in-position="1-2,3-5" | YEARS_IN_CURRENT_POSITION | multi |
Personal group
| Flag | Filter Type | Notes |
|---|
--region="San Francisco Bay Area" | REGION | typeahead, multi, supports --exclude-region |
--postal-code="94105" | POSTAL_CODE | use with --radius=25 |
--industry="Technology" | INDUSTRY | multi |
--first-name="John" | FIRST_NAME | text |
--last-name="Smith" | LAST_NAME | text |
--profile-language="en,es" | PROFILE_LANGUAGE | multi |
--years-experience="5-10" | YEARS_OF_EXPERIENCE | multi |
--group="..." | GROUP | multi |
--school="Stanford" | SCHOOL | multi |
Buyer Intent group
| Flag | Filter Type | Notes |
|---|
--follows-company | FOLLOWS_YOUR_COMPANY | toggle |
--viewed-profile | VIEWED_YOUR_PROFILE | toggle |
Best Path In group
| Flag | Filter Type | Notes |
|---|
--relationship="F,S" | RELATIONSHIP | F=1st, S=2nd |
--connection-of="..." | CONNECTION_OF | typeahead |
--past-colleague | PAST_COLLEAGUE | toggle |
--shared-experiences | WITH_SHARED_EXPERIENCES | toggle |
Recent Updates group
| Flag | Filter Type | Notes |
|---|
--changed-jobs | RECENTLY_CHANGED_JOBS | toggle |
--posted-on-linkedin | POSTED_ON_LINKEDIN | toggle |
Workflow group
| Flag | Filter Type | Notes |
|---|
--persona="..." | PERSONA | typeahead |
--account-list="..." | ACCOUNT_LIST | multi |
--lead-list="..." | LEAD_LIST | multi |
--in-crm="..." | LEADS_IN_CRM | multi |
--interacted-with="..." | LEAD_INTERACTIONS | multi |
--saved="..." | SAVED_LEADS_AND_ACCOUNTS | multi |
How it works
- auth -- Uses CDP to find an open Sales Navigator tab, validates the session (
li_at + JSESSIONID), and writes a marker session.json. Cookies stay in Chrome — every request runs in-page with credentials:'include'.
- search -- Builds a RESTLI query string from CLI flags with the correct filter format (
type:FILTER_TYPE,values:List((id:...,text:...,selectionType:INCLUDED|EXCLUDED))), calls salesApiLeadSearch with decorationId=LeadSearchResult-16.
- filters -- Prints all 33+ filter types with usage examples.
- profiles -- Calls
salesApiProfiles in batches of 25 with the full decoration string to fetch positions, education, skills, contact info, etc.
- search-profiles -- Combines search (with full pagination and 3-5s rate-limit delays) and profile fetch into one command.
Data storage
~/.local/share/showrun/data/salesnav-lead-search/
session.json Auth marker (no cookies stored)
cache/
search-<slug>-<timestamp>.json Search results
profiles-<timestamp>.json Profile data
search-profiles-<slug>-<ts>.json Combined search+profile data
Session expiry
If you get 401/403 errors, re-run:
node salesnav-lead-search.mjs auth
Sessions typically last several hours. Keep a logged-in Sales Navigator tab open in Chrome for all commands (requests run in-page).