Skip to main content
Glama

search_organizations

Find companies by filtering industry, size, location, revenue, and technology to build targeted account lists from Apollo's B2B database.

Instructions

Search for companies/organizations in Apollo's database. Filter by industry, size, location, revenue, technology, and more. Great for building targeted account lists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
q_organization_nameNoOrganization name search
organization_locationsNoLocations (e.g., ["San Francisco, CA"])
organization_industry_tag_idsNoIndustry tag IDs
organization_num_employees_rangesNoEmployee count ranges: "1-10", "11-50", "51-200", "201-500", "501-1000", "1001-5000", "5001-10000", "10001+"
revenue_rangeNoRevenue range filter
organization_keywordsNoKeywords to search in organization data
pageNoPage number (default: 1)
per_pageNoResults per page (default: 25, max: 100)

Implementation Reference

  • The main handler function that performs the organization search by calling the Apollo API endpoint '/mixed_companies/search', processes the response, formats the results into a readable text summary, and returns it in the MCP content format.
    private async searchOrganizations(args: any) { const response = await this.axiosInstance.post("/mixed_companies/search", args); const organizations = response.data.organizations || []; const pagination = response.data.pagination || {}; let result = `Found ${pagination.total_entries || organizations.length} organizations\n`; result += `Page ${pagination.page || 1} of ${pagination.total_pages || 1}\n\n`; organizations.forEach((org: any, index: number) => { result += `${index + 1}. ${org.name}\n`; result += ` ID: ${org.id}\n`; result += ` Domain: ${org.website_url || org.primary_domain || "N/A"}\n`; result += ` Industry: ${org.industry || "N/A"}\n`; result += ` Employees: ${org.estimated_num_employees || "N/A"}\n`; result += ` Location: ${org.city ? `${org.city}, ${org.state || org.country}` : "N/A"}\n`; result += ` Revenue: ${org.annual_revenue ? `$${org.annual_revenue}` : "N/A"}\n`; result += ` Phone: ${org.phone || "N/A"}\n\n`; }); return { content: [ { type: "text", text: result, }, ], }; }
  • src/index.ts:171-221 (registration)
    Tool registration in the MCP server's getTools() method, including the tool name, description, and detailed input schema for parameters like organization name, locations, industries, employee ranges, revenue, keywords, pagination.
    { name: "search_organizations", description: "Search for companies/organizations in Apollo's database. Filter by industry, size, location, revenue, technology, and more. Great for building targeted account lists.", inputSchema: { type: "object", properties: { q_organization_name: { type: "string", description: "Organization name search", }, organization_locations: { type: "array", items: { type: "string" }, description: 'Locations (e.g., ["San Francisco, CA"])', }, organization_industry_tag_ids: { type: "array", items: { type: "string" }, description: "Industry tag IDs", }, organization_num_employees_ranges: { type: "array", items: { type: "string" }, description: 'Employee count ranges: "1-10", "11-50", "51-200", "201-500", "501-1000", "1001-5000", "5001-10000", "10001+"', }, revenue_range: { type: "object", properties: { min: { type: "number" }, max: { type: "number" }, }, description: "Revenue range filter", }, organization_keywords: { type: "array", items: { type: "string" }, description: "Keywords to search in organization data", }, page: { type: "number", description: "Page number (default: 1)", }, per_page: { type: "number", description: "Results per page (default: 25, max: 100)", }, }, }, },
  • Dispatch case in the central CallToolRequestSchema handler that routes calls to the specific searchOrganizations method.
    case "search_organizations": return await this.searchOrganizations(args);

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/masridigital/apollo.io-mcp'

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