linkedin_sn_search_users
Search LinkedIn users with Sales Navigator filters to find professionals by name, title, company, location, education, and other criteria for targeted outreach and recruitment.
Instructions
Advanced search for LinkedIn users using Sales Navigator filters
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| company_locations | No | Company location URN (geo:*) or name, or array of them | |
| company_sizes | No | Company size ranges | |
| company_types | No | Company types | |
| count | Yes | Maximum number of results (max 2500) | |
| current_companies | No | Current company URN (company:*) or name, or array of them | |
| current_titles | No | Exact words to search in current titles | |
| education | No | Education URN (company:*) or name, or array of them | |
| first_names | No | Exact first names to search for | |
| functions | No | Job functions | |
| industry | No | Industry URN (industry:*) or name, or array of them | |
| keywords | No | Any keyword for searching in the user profile. Using this may reduce result count. | |
| languages | No | Profile languages | |
| last_names | No | Exact last names to search for | |
| levels | No | Job seniority levels | |
| location | No | Location URN (geo:*) or name, or array of them | |
| past_companies | No | Past company URN (company:*) or name, or array of them | |
| past_titles | No | Exact words to search in past titles | |
| timeout | No | Timeout in seconds (20-1500) | |
| years_in_the_current_company | No | Years in current company ranges | |
| years_in_the_current_position | No | Years in current position ranges |
Implementation Reference
- src/index.ts:1071-1091 (handler)The handler function for the 'linkedin_sales_navigator_search_users' tool (corresponding to linkedin_sn_search_users endpoint). It builds request data from input parameters and calls the AnySite API endpoint for advanced LinkedIn Sales Navigator user search.async ({ keywords, count, timeout, first_names, last_names, current_titles }) => { const requestData: any = { count, timeout }; if (keywords) requestData.keywords = keywords; if (first_names) requestData.first_names = first_names; if (last_names) requestData.last_names = last_names; if (current_titles) requestData.current_titles = current_titles; log("Starting LinkedIn Sales Navigator users search with filters"); try { const response = await makeRequest(API_CONFIG.ENDPOINTS.LINKEDIN_SN_SEARCH_USERS, requestData); log(`Search complete, found ${response.length} results`); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; } catch (error) { log("LinkedIn Sales Navigator search error:", error); return { content: [{ type: "text", text: `LinkedIn Sales Navigator search API error: ${formatError(error)}` }], isError: true }; } }
- src/index.ts:1063-1070 (schema)Zod schema defining the input parameters for the linkedin_sales_navigator_search_users tool.{ keywords: z.string().optional().describe("Search keywords"), count: z.number().default(10).describe("Max results"), timeout: z.number().default(300).describe("Timeout in seconds"), first_names: z.array(z.string()).optional().describe("First names"), last_names: z.array(z.string()).optional().describe("Last names"), current_titles: z.array(z.string()).optional().describe("Current job titles") },
- src/index.ts:1061-1092 (registration)Registration of the 'linkedin_sales_navigator_search_users' tool using McpServer.tool() method, including name, description, input schema, and handler."linkedin_sales_navigator_search_users", "Advanced LinkedIn Sales Navigator user search", { keywords: z.string().optional().describe("Search keywords"), count: z.number().default(10).describe("Max results"), timeout: z.number().default(300).describe("Timeout in seconds"), first_names: z.array(z.string()).optional().describe("First names"), last_names: z.array(z.string()).optional().describe("Last names"), current_titles: z.array(z.string()).optional().describe("Current job titles") }, async ({ keywords, count, timeout, first_names, last_names, current_titles }) => { const requestData: any = { count, timeout }; if (keywords) requestData.keywords = keywords; if (first_names) requestData.first_names = first_names; if (last_names) requestData.last_names = last_names; if (current_titles) requestData.current_titles = current_titles; log("Starting LinkedIn Sales Navigator users search with filters"); try { const response = await makeRequest(API_CONFIG.ENDPOINTS.LINKEDIN_SN_SEARCH_USERS, requestData); log(`Search complete, found ${response.length} results`); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }] }; } catch (error) { log("LinkedIn Sales Navigator search error:", error); return { content: [{ type: "text", text: `LinkedIn Sales Navigator search API error: ${formatError(error)}` }], isError: true }; } } );
- src/index.ts:45-45 (helper)API endpoint constant used by the tool handler for the LinkedIn SN search users endpoint.LINKEDIN_SN_SEARCH_USERS: "/api/linkedin/sn_search/users",
- src/types.ts:128-149 (schema)Comprehensive TypeScript interface for LinkedinSalesNavigatorSearchUsersArgs in types.ts (not directly used in the tool registration).export interface LinkedinSalesNavigatorSearchUsersArgs { keywords?: string; first_names?: string[]; last_names?: string[]; current_titles?: string[]; location?: string | string[]; education?: string | string[]; languages?: string[]; past_titles?: string[]; functions?: string[]; levels?: string[]; years_in_the_current_company?: string[]; years_in_the_current_position?: string[]; company_sizes?: string[]; company_types?: string[]; company_locations?: string | string[]; current_companies?: string | string[]; past_companies?: string | string[]; industry?: string | string[]; count: number; timeout?: number; }