get_list_contacts
Retrieve detailed contact information from Apollo.io lists, including emails, job titles, and company data for sales prospecting and outreach.
Instructions
Scrape/retrieve all contacts from a specific list with full details including emails, titles, companies, etc.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | List ID | |
| page | No | Page number (default: 1) | |
| per_page | No | Results per page (default: 100) |
Implementation Reference
- src/index.ts:965-997 (handler)The handler function that fetches contacts from a specific Apollo contact list via API, paginates results, and formats a detailed text summary of each contact including name, ID, email, title, company, phone, and LinkedIn.private async getListContacts(args: any) { const page = args.page || 1; const perPage = args.per_page || 100; const response = await this.axiosInstance.get(`/contact_lists/${args.id}/contacts`, { params: { page, per_page: perPage }, }); const contacts = response.data.contacts || []; const pagination = response.data.pagination || {}; let result = `List Contacts (${pagination.total_entries || contacts.length} total)\n`; result += `Page ${pagination.page || 1} of ${pagination.total_pages || 1}\n\n`; contacts.forEach((contact: any, index: number) => { result += `${index + 1}. ${contact.first_name} ${contact.last_name}\n`; result += ` ID: ${contact.id}\n`; result += ` Email: ${contact.email || "N/A"}\n`; result += ` Title: ${contact.title || "N/A"}\n`; result += ` Company: ${contact.account?.name || "N/A"}\n`; result += ` Phone: ${contact.phone_numbers?.[0]?.raw_number || "N/A"}\n`; result += ` LinkedIn: ${contact.linkedin_url || "N/A"}\n\n`; }); return { content: [ { type: "text", text: result, }, ], }; }
- src/index.ts:404-426 (schema)Tool registration including name, description, and input schema defining required 'id' for the list and optional pagination parameters.{ name: "get_list_contacts", description: "Scrape/retrieve all contacts from a specific list with full details including emails, titles, companies, etc.", inputSchema: { type: "object", properties: { id: { type: "string", description: "List ID", }, page: { type: "number", description: "Page number (default: 1)", }, per_page: { type: "number", description: "Results per page (default: 100)", }, }, required: ["id"], }, },
- src/index.ts:84-85 (registration)Dispatch registration in the main tool call handler switch statement that routes calls to the getListContacts method.case "get_list_contacts": return await this.getListContacts(args);