Skip to main content
Glama

search_opportunities

Search and filter sales opportunities in Apollo.io to track deals and manage pipeline with customizable sorting options.

Instructions

Search for opportunities in Apollo.io.

This tool searches for sales opportunities with filtering and sorting options. Useful for tracking deals and pipeline management.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
per_pageNo
account_stage_idsNo
sort_by_fieldNo

Implementation Reference

  • The handler function for the 'search_opportunities' tool. It is registered via the @mcp.tool() decorator and implements the logic to search Apollo.io opportunities using the API endpoint /v1/opportunities/search.
    @mcp.tool() async def search_opportunities( page: int = 1, per_page: int = 25, account_stage_ids: Optional[List[str]] = None, sort_by_field: Optional[str] = None ) -> Dict[str, Any]: """ Search for opportunities in Apollo.io. This tool searches for sales opportunities with filtering and sorting options. Useful for tracking deals and pipeline management. """ endpoint = "/v1/opportunities/search" data = { "page": page, "per_page": per_page } if account_stage_ids: data["account_stage_ids"] = account_stage_ids if sort_by_field: data["sort_by_field"] = sort_by_field try: result = await apollo_client.make_request("POST", endpoint, data=data) 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)}"}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/FromSmall2Big/Apollo-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server