search_people
Find business contacts in Apollo.io by job title, company, location, or seniority to access employment details and contact information for sales and marketing purposes.
Instructions
Search for people/contacts in Apollo.io database.
This tool allows you to search for people by job title, seniority, company domain, location, and other criteria. Returns contact information and employment details.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| request | Yes |
Implementation Reference
- src/apollo_mcp_server.py:153-185 (handler)The core handler function for the 'search_people' tool. Decorated with @mcp.tool() for FastMCP registration. Parses and validates input using PeopleSearchRequest schema, calls Apollo.io API /v1/mixed_people/search endpoint, handles JSON input and errors.@mcp.tool() async def search_people(request: Union[Dict[str, Any], str]) -> Dict[str, Any]: """ Search for people/contacts in Apollo.io database. This tool allows you to search for people by job title, seniority, company domain, location, and other criteria. Returns contact information and employment details. """ endpoint = "/v1/mixed_people/search" # Handle both JSON string and dict inputs if isinstance(request, str): try: request = json.loads(request) except json.JSONDecodeError as e: return {"error": f"Invalid JSON in request: {str(e)}"} # Create and validate request object from dictionary try: people_request = PeopleSearchRequest(**request) except Exception as e: return {"error": f"Invalid request parameters: {str(e)}"} # Convert request to dict and remove None values search_params = {k: v for k, v in people_request.dict().items() if v is not None} try: result = await apollo_client.make_request("POST", endpoint, data=search_params) return result except httpx.HTTPStatusError as e: return {"error": f"API request failed: {e.response.status_code} {e.response.text}"} except Exception as e: return {"error": f"Request failed: {str(e)}"}
- src/apollo_mcp_server.py:89-97 (schema)Pydantic BaseModel schema used for input validation in the search_people handler. Defines optional search parameters like organization domains, titles, seniorities, locations, employee ranges, pagination.class PeopleSearchRequest(BaseModel): """Request model for people search.""" q_organization_domains: Optional[str] = Field(None, description="Organization domains (newline separated)") person_titles: Optional[List[str]] = Field(None, description="Job titles to search for") person_seniorities: Optional[List[str]] = Field(None, description="Seniority levels") organization_locations: Optional[List[str]] = Field(None, description="Organization locations") organization_num_employees_ranges: Optional[List[str]] = Field(None, description="Employee count ranges") page: int = Field(1, description="Page number for pagination") per_page: int = Field(10, description="Number of results per page")