search_people
Find business contacts and prospects using filters like job title, company, location, industry, and seniority to identify leads or specific individuals.
Instructions
Search for people/contacts in Apollo's database with advanced filters. Use this to find prospects, leads, or specific individuals based on criteria like job title, company, location, industry, seniority, etc.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q_keywords | No | Search keywords for person name or title | |
| person_titles | No | Job titles (e.g., ["CEO", "CTO", "VP Sales"]) | |
| person_seniorities | No | Seniority levels: "senior", "manager", "director", "vp", "c_suite", "owner", "partner" | |
| organization_ids | No | Filter by specific organization IDs | |
| organization_locations | No | Locations (e.g., ["San Francisco, CA", "New York, NY"]) | |
| organization_industry_tag_ids | No | Industry tags to filter by | |
| person_locations | No | Person locations | |
| page | No | Page number (default: 1) | |
| per_page | No | Results per page (default: 25, max: 100) |
Implementation Reference
- src/index.ts:603-630 (handler)The main handler function that executes the 'search_people' tool. It sends a POST request to Apollo's '/mixed_people/search' endpoint with the provided arguments, processes the response, formats the search results (including pagination, names, IDs, titles, companies, locations, emails, LinkedIn URLs, and seniorities), and returns a formatted text response.private async searchPeople(args: any) { const response = await this.axiosInstance.post("/mixed_people/search", args); const people = response.data.people || []; const pagination = response.data.pagination || {}; let result = `Found ${pagination.total_entries || people.length} people\n`; result += `Page ${pagination.page || 1} of ${pagination.total_pages || 1}\n\n`; people.forEach((person: any, index: number) => { result += `${index + 1}. ${person.first_name} ${person.last_name}\n`; result += ` ID: ${person.id}\n`; result += ` Title: ${person.title || "N/A"}\n`; result += ` Company: ${person.organization?.name || "N/A"}\n`; result += ` Location: ${person.city ? `${person.city}, ${person.state || ""}` : "N/A"}\n`; result += ` Email: ${person.email || "N/A"}\n`; result += ` LinkedIn: ${person.linkedin_url || "N/A"}\n`; result += ` Seniority: ${person.seniority || "N/A"}\n\n`; }); return { content: [ { type: "text", text: result, }, ], }; }
- src/index.ts:122-169 (schema)The input schema defining the parameters for the 'search_people' tool, including search keywords, job titles, seniorities, organization filters, locations, pagination options, etc. This provides input validation and descriptions for the tool's arguments.inputSchema: { type: "object", properties: { q_keywords: { type: "string", description: "Search keywords for person name or title", }, person_titles: { type: "array", items: { type: "string" }, description: 'Job titles (e.g., ["CEO", "CTO", "VP Sales"])', }, person_seniorities: { type: "array", items: { type: "string" }, description: 'Seniority levels: "senior", "manager", "director", "vp", "c_suite", "owner", "partner"', }, organization_ids: { type: "array", items: { type: "string" }, description: "Filter by specific organization IDs", }, organization_locations: { type: "array", items: { type: "string" }, description: 'Locations (e.g., ["San Francisco, CA", "New York, NY"])', }, organization_industry_tag_ids: { type: "array", items: { type: "string" }, description: "Industry tags to filter by", }, person_locations: { type: "array", items: { type: "string" }, description: "Person locations", }, page: { type: "number", description: "Page number (default: 1)", }, per_page: { type: "number", description: "Results per page (default: 25, max: 100)", }, }, },
- src/index.ts:118-170 (registration)The tool registration object in the getTools() method, which defines the name, description, and input schema for 'search_people'. This is returned when listing available tools via ListToolsRequestSchema.{ name: "search_people", description: "Search for people/contacts in Apollo's database with advanced filters. Use this to find prospects, leads, or specific individuals based on criteria like job title, company, location, industry, seniority, etc.", inputSchema: { type: "object", properties: { q_keywords: { type: "string", description: "Search keywords for person name or title", }, person_titles: { type: "array", items: { type: "string" }, description: 'Job titles (e.g., ["CEO", "CTO", "VP Sales"])', }, person_seniorities: { type: "array", items: { type: "string" }, description: 'Seniority levels: "senior", "manager", "director", "vp", "c_suite", "owner", "partner"', }, organization_ids: { type: "array", items: { type: "string" }, description: "Filter by specific organization IDs", }, organization_locations: { type: "array", items: { type: "string" }, description: 'Locations (e.g., ["San Francisco, CA", "New York, NY"])', }, organization_industry_tag_ids: { type: "array", items: { type: "string" }, description: "Industry tags to filter by", }, person_locations: { type: "array", items: { type: "string" }, description: "Person locations", }, page: { type: "number", description: "Page number (default: 1)", }, per_page: { type: "number", description: "Results per page (default: 25, max: 100)", }, }, }, },
- src/index.ts:62-63 (registration)The dispatcher case in the CallToolRequestSchema handler that routes calls to the 'search_people' tool to its handler function.case "search_people": return await this.searchPeople(args);