Skip to main content
Glama
masridigital

Apollo.io MCP Server

by masridigital

search_organizations

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

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 handler function for search_organizations tool. Makes API call to Apollo's /mixed_companies/search endpoint with provided args, formats the organizations data into a readable text summary including pagination, ID, name, domain, industry, employees, location, revenue, and phone.
    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,
          },
        ],
      };
    }
  • Input schema for the search_organizations tool defining parameters such as organization name query, locations, industry tags, employee ranges, revenue range, keywords, pagination.
    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)",
        },
      },
    },
  • src/index.ts:171-221 (registration)
    Tool registration in the getTools() method's return array, including name, description, and inputSchema.
    {
      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)",
          },
        },
      },
    },
  • src/index.ts:64-65 (registration)
    Dispatch case in the CallToolRequestSchema handler switch statement that routes calls to search_organizations to the 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