# B2B Lead Qualifier M365 Tech Stack (`hashem277/b2b-lead-qualifier-m365-tech-stack`) Actor

Replace 4 separate scraping/audit workflows in Clay, n8n, Make, or MCP AI agents with 1 fast browser-less HTTP + DNS + TLS call.

Microsoft 365 / Google Workspace & Entra ID Intelligence
Email & TLS Security Gaps
Tech Stack, Ad Pixels & Conversion Leaks
Decision-Maker Contact Extraction

- **URL**: https://apify.com/hashem277/b2b-lead-qualifier-m365-tech-stack.md
- **Developed by:** [HASHEM ALSAGGAF](https://apify.com/hashem277) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 domain qualifieds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## 1-Call B2B Lead-Stack & M365 Conversion Qualifier

Replace 4 separate scraping/audit workflows in **Clay**, **n8n**, **Make**, or **MCP AI agents** with **1 fast browser-less HTTP + DNS + TLS call**.

For every company domain, this Actor extracts:

- **Microsoft 365 / Google Workspace & Entra ID Intelligence:** Email provider (`MX`), third-party email gateway (Mimecast, Proofpoint, Barracuda), public **Microsoft Entra ID Tenant UUID**, and `Managed` vs. `Federated` auth via public OpenID/UserRealm endpoints.
- **Email & TLS Security Gaps:** SPF record & qualifier (`~all` vs `-all`), DMARC policy (`missing`, `none`, `quarantine`, `reject`), common DKIM selector checks, live SSL/TLS certificate validity & days to expiry.
- **Tech Stack, Ad Pixels & Conversion Leaks:** CMS/framework/CRM (`WordPress`, `Shopify`, `Webflow`, `HubSpot`, `Zoho`, `GoHighLevel`, `Cloudflare`), analytics & ad pixels (`GA4`, `GTM`, `Meta Pixel`, `Google Ads`, `LinkedIn`, `TikTok`), booking widgets (`Calendly`, `Cal.com`, `Microsoft Bookings`, `Jobber`, `ServiceTitan`, `JaneApp`), live chat widgets, `/llms.txt` check, and contact forms.
- **Decision-Maker Contact Extraction:** Unique emails, phone numbers, and social profiles (with optional lightweight `/contact`, `/about`, `/book` subpage scan).
- **Actionable Fit Scoring:** `mspFitScore`, `agencyFitScore`, `qualificationScore` (0–100), `securityGaps`, `conversionLeaks`, and a ready-to-use `recommendedPitchAngle`.

***

### Pay-Per-Event (PPE) Pricing Design

This Actor uses **1 transparent Pay-Per-Event event**:

| Event Name | Trigger | Recommended Store Price |
|---|---|---|
| `domain-qualified` | Fired once per unique domain processed (honors `maxTotalChargeUsd` via `eventChargeLimitReached`) | **$0.008 – $0.015 / domain** |

Because all checks run via lightweight Node.js HTTP, DNS, and TLS sockets (no Chromium/residential proxy burn), margins stay extremely high while remaining cheaper for buyers than chaining multiple browser scrapers.

***

### Example Input

```json
{
  "domains": [
    "modulemind.ca",
    "https://apify.com"
  ],
  "scanSubpages": true,
  "includeMicrosoftEntraCheck": true,
  "includeTlsCheck": true,
  "concurrency": 5,
  "timeoutMs": 10000
}
```

***

### MCP Compatibility (AI Agents)

Both `.actor/input_schema.json` and `.actor/dataset_schema.json` are annotated with field descriptions, `[REQUIRED]` markers, and examples so AI agents (Claude, Cursor, n8n AI Agent) connecting via `https://mcp.apify.com` can invoke this Actor and interpret every output field accurately—and support agentic `x402` PPE payments once published.

***

### Local Development & Publishing to Apify Store

1. **Install dependencies & run tests:**
   ```bash
   npm install
   npm test
   npm run build
   ```
2. **Test locally with Apify CLI:**
   ```bash
   npm install -g apify-cli
   apify login
   apify run --input-file .actor/sample_input.json
   ```
3. **Push & Monetize on Apify Store:**
   ```bash
   apify push
   ```
   Then in **Apify Console -> Actor -> Publication & Monetization**:
   - Select **Pay-per-event (PPE)** pricing.
   - Add event `domain-qualified` (set your per-domain USD price, e.g., `0.01`), and mark it as the primary event.
   - Publish to **Apify Store**.

# Actor input Schema

## `domains` (type: `array`):

\[REQUIRED] List of company domains or URLs to qualify (e.g., \["modulemind.ca", "https://stripe.com"]). Duplicates and protocols are normalized automatically.

## `scanSubpages` (type: `boolean`):

If true, checks /contact, /about, and /book when emails or booking widgets are missing on the homepage.

## `includeMicrosoftEntraCheck` (type: `boolean`):

Queries public Microsoft OpenID/UserRealm metadata to detect Tenant ID, Managed vs Federated auth, and M365 presence.

## `includeTlsCheck` (type: `boolean`):

Performs a direct TLS handshake to retrieve certificate issuer, expiration date, and days remaining.

## `concurrency` (type: `integer`):

Number of domains to process in parallel (1-20).

## `timeoutMs` (type: `integer`):

Per-request HTTP, DNS, and TLS timeout in milliseconds.

## Actor input object example

```json
{
  "domains": [
    "modulemind.ca",
    "apify.com"
  ],
  "scanSubpages": true,
  "includeMicrosoftEntraCheck": true,
  "includeTlsCheck": true,
  "concurrency": 5,
  "timeoutMs": 10000
}
```

# Actor output Schema

## `results` (type: `string`):

Direct link to the dataset containing all qualified B2B domains.

## `overview` (type: `string`):

Key-value store OUTPUT record summarizing processed domains and scores.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "domains": [
        "modulemind.ca",
        "apify.com"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hashem277/b2b-lead-qualifier-m365-tech-stack").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "domains": [
        "modulemind.ca",
        "apify.com",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("hashem277/b2b-lead-qualifier-m365-tech-stack").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "domains": [
    "modulemind.ca",
    "apify.com"
  ]
}' |
apify call hashem277/b2b-lead-qualifier-m365-tech-stack --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hashem277/b2b-lead-qualifier-m365-tech-stack"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/uv1GcMfUh52526N7V/builds/snaxCvmvMmcHH2PSb/openapi.json
