Skip to main content
Glama

Find LinkedIn Leads That Fit an ICP

li_search_leads

Find prospects who fit an ICP: give LinkedIn search filters (job titles, seniority, function, location, industry, company size, companies, schools, keywords and their exclusions) and get back a list of people with profile URL, name, location, current title and company, a short "about", premium and Open Profile flags. No browser and no LinkedIn account is used; this reads public search results from a third-party provider. The results are scraped public data, not a verdict: deciding who actually fits, and why, is still your job.

COST: 25 enrichment lookups per search PAGE that returns anyone (pages hold up to 25 people; a page of 3 costs the same as a page of 25), from the same shared pool as li_enrich_profiles. A search that finds nobody costs nothing. maxResults is rounded UP to whole pages and the whole window is reserved first. Pass estimateOnly=true first for a free preview of the most it would charge and what is left. At most 100 per call; continue with startPage (nextStartPage in the reply). LinkedIn shows at most 100 pages (2500 people) for one search, so narrow the filters to reach past that.

BATCH: put every company, title or place you want in ONE call: each list field matches ANY of its entries. Never loop one company per call: each call is charged a whole page however few people it finds, so per-company calls spend several times the lookups for the same people.

Each person is marked against YOUR team: alreadyContact (in your contacts, with status and campaigns) and doNotContact (on your team's or the install's do-not-contact list). Each is an object (yes), false (checked, not found) or null (could not check). A false is only "not under this URL": search results name people by LinkedIn's search id (/in/ACwAA…, case-sensitive), not their public profile URL, so someone you hold under their vanity URL can still read false here. truncated true means more people match than this call returned. unreadable counts rows the provider sent that could not be read; they are left out and never charged. Always relay message.

Each lead carries publicProfileUrl when the person was looked up before (free), else null. Pass the search-id profileUrl to any tool as it is: every tool that takes a profile URL resolves it to the public profile URL first (cache, then a provider lookup from the same pool, then the account's browser) and reports how in searchIds; imports store the vanity URL with the member id. li_resolve_profile_url does the same resolution on its own, read-only.

Siblings: li_enrich_profiles for the full profile of the people you pick (headline, experience, employer page; each row also carries publicProfileUrl, memberId and searchId); li_fetch_posts for their latest posts to write a personal opener; li_check_targets to see who is already in your pipeline; li_ingest_prospects to import the ones you choose with their prefilled copy.

Input Schema

NameRequiredDescriptionDefault
schoolsNoSchools they attended, by name, e.g. ["Stanford University"]. Up to 50.
keywordsNoFree text LinkedIn matches anywhere on the profile, e.g. "fintech" or "B2B SaaS". LinkedIn search operators work (AND, OR, NOT, quotes).
functionsNoLinkedIn job functions: accounting, administrative, arts_and_design, business_development, community_and_social_services, consulting, education, engineering, entrepreneurship, finance, healthcare_services, human_resources, information_technology, legal, marketing, media_and_communication, military_and_protective_services, operations, product_management, program_and_project_management, purchasing, quality_assurance, real_estate, research, sales, customer_success_and_support.
locationsNoWhere the person lives, as place names LinkedIn resolves itself, e.g. ["Pune", "United Kingdom", "San Francisco Bay Area"]. Spell countries out: LinkedIn reads "UK" as Ukraine. Up to 70.
seniorityNoLinkedIn seniority levels: in_training, entry_level, senior, strategic, entry_level_manager, experienced_manager, director, vice_president, cxo, owner_partner. cxo is C-level; owner_partner is founders, owners and partners.
sessionIdNoAccount id from li_list_accounts. Needed (or sessionLabel) when you have more than one account; never guessed.
startPageNoThe LinkedIn results page to start on, default 1. To continue a search, pass the previous reply's nextStartPage with the SAME filters. LinkedIn stops at page 100.
maxResultsNoHow many people to return, default 25, at most 100. Rounded UP to whole pages of 25; each page that returns anyone is charged whole (25 lookups), and a search that finds nobody costs nothing.
industryIdsNoLinkedIn industry IDS (numbers as strings), not names. Common ones: 4 Software Development, 6 Technology, Information and Internet, 11 Business Consulting and Services, 14 Hospitals and Health Care, 25 Manufacturing, 27 Retail, 43 Financial Services, 44 Real Estate, 80 Advertising Services, 96 IT Services and IT Consulting, 104 Staffing and Recruiting, 1862 Marketing Services. Full list: https://github.com/HarvestAPI/linkedin-industry-codes-v2/blob/main/linkedin_industry_code_v2_all_eng_with_header.csv. Up to 50.
estimateOnlyNoPreview instead of searching: how many pages, the most lookups it could charge and what is left. Searches nothing, charges nothing and reserves nothing.
sessionLabelNoAccount by label, LinkedIn name, profile slug or member id (li_list_accounts). Needed (or sessionId) when you have more than one account; never guessed.
pastCompaniesNoPeople who USED to work at these companies (LinkedIn company page URLs). Up to 50.
pastJobTitlesNoPast job titles, as text. Up to 50.
excludeSchoolsNoLeave out people who attended these schools (by name). Up to 50.
companyHeadcountNoEmployee count of their CURRENT employer: self-employed, 1-10, 11-50, 51-200, 201-500, 501-1000, 1001-5000, 5001-10000, 10001+.
currentCompaniesNoPeople who work at these companies NOW, as LinkedIn company page URLs (https://www.linkedin.com/company/<name>/). A company name alone is refused. Up to 50, matched as ANY of them: put every target company in this one call, never one call per company.
currentJobTitlesNoCurrent job titles, as text LinkedIn matches, e.g. ["Founder", "Head of Growth"]. Up to 50.
excludeFunctionsNoLeave out these job functions (same values as functions).
excludeLocationsNoLeave out people living in these places (names, as for locations). Up to 70.
excludeSeniorityNoLeave out these seniority levels (same values as seniority).
profileLanguagesNoLanguage of their LinkedIn profile: Arabic, English, Spanish, Portuguese, Chinese, French, Italian, Russian, German, Dutch, Turkish, Tagalog, Polish, Korean, Japanese, Malay, Norwegian, Danish, Romanian, Swedish, Bahasa Indonesia, Czech.
yearsOfExperienceNoTotal years of experience: under_1, 1_to_2, 3_to_5, 6_to_10, over_10.
companyHqLocationsNoWhere the person's CURRENT employer is headquartered, as place names (same rules as locations). Up to 70.
excludeIndustryIdsNoLeave out these LinkedIn industry ids (numbers as strings, as for industryIds).
recentlyChangedJobsNoOnly people who changed jobs in the last 90 days (a common buying moment).
excludePastCompaniesNoLeave out people who worked at these companies (LinkedIn company page URLs). Up to 50.
excludePastJobTitlesNoLeave out people with any of these PAST titles. Up to 50.
yearsAtCurrentCompanyNoYears at their current employer: under_1, 1_to_2, 3_to_5, 6_to_10, over_10.
excludeCurrentCompaniesNoLeave out people working at these companies now (LinkedIn company page URLs), e.g. your own firm or existing customers. Up to 50.
excludeCurrentJobTitlesNoLeave out people whose CURRENT title matches any of these. Up to 50.
recentlyPostedOnLinkedInNoOnly people who posted on LinkedIn in the last 30 days (active, and li_fetch_posts will find something to open with).
excludeCompanyHqLocationsNoLeave out people whose employer is headquartered in these places. Up to 70.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / currentCompanies / description
      Previous value: -"People who work at these companies NOW, as LinkedIn company page URLs (https://www.linkedin.com/company/<name>/). A company name alone is refused. Up to 50."New value: +"People who work at these companies NOW, as LinkedIn company page URLs (https://www.linkedin.com/company/<name>/). A company name alone is refused. Up to 50, matched as ANY of them: put every target company in this one call, never one call per company."
    • changedInput schema / properties / maxResults / description
      Previous value: -"How many people to return, default 25, at most 100. Rounded UP to whole pages of 25 (pages are billed whole), and charged per person actually returned."New value: +"How many people to return, default 25, at most 100. Rounded UP to whole pages of 25; each page that returns anyone is charged whole (25 lookups), and a search that finds nobody costs nothing."
  2. Added

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only say non-read-only, non-destructive, open-world; the description adds the essentials the annotations cannot: no browser or LinkedIn account is used, data is scraped from a third-party provider, 25 lookups are charged per page even if partially filled, windows are reserved up front, empty searches are free, and LinkedIn caps at page 100. It also discloses the tri-state alreadyContact/doNotContact semantics with the URL-mismatch caveat for false, plus truncated and unreadable counters and the requirement to relay `message`.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose, return shape and cost lead, and the section headers (COST, BATCH, Siblings) make it scannable despite its length. Some material is restated — the whole-page charge appears in both COST and BATCH — and the profileUrl resolution paragraph is only tangentially about searching, but nothing is filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 32-parameter, credit-spending, open-world search with no output schema, every decision an agent must make is covered: cost and reservation model, pagination continuation, batching, empty-result behavior, the shape and caveats of the contact flags, and where to go next. Nothing needed to call it correctly or safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3 and the schema already documents each of the 32 fields. The description still adds real meaning on the non-obvious parameters: maxResults is rounded UP and the whole window reserved, startPage must reuse identical filters, estimateOnly reserves and charges nothing, and list fields match ANY entry so they belong in one call.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence gives a specific verb+resource ('Find prospects who fit an ICP'), then enumerates the filter families accepted and the fields returned (profile URL, name, location, title, company, about, premium flags). It is immediately distinguishable from li_enrich_profiles, li_fetch_posts and li_ingest_prospects, which are explicitly routed to later in the text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It prescribes concrete sequencing: run estimateOnly=true first for a free preview, then continue with startPage/nextStartPage using the SAME filters. It explicitly says when not to loop (per-company calls) and lists which sibling to use for each follow-on need (enrich the picked people, fetch posts for an opener, check the pipeline, import).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources