# B2B Email Finder & SMTP/MX Verifier API ($0.49/1K Valid) (`studio001/b2b-email-finder-smtp-mx-verifier`) Actor

No-login B2B email finder, DoH DNS auditor (MX/SPF/DMARC) & catch-all SMTP verifier at $0.49/1K Gold (128MB RAM, $0 proxy). Callable via native MCP (/mcp) or real-time Standby REST API. Charges $0 for invalid, syntax, or unfound emails.

- **URL**: https://apify.com/studio001/b2b-email-finder-smtp-mx-verifier.md
- **Developed by:** [YEONG JUN YOO](https://apify.com/studio001) (community)
- **Categories:** Lead generation, Developer tools, MCP servers
- **Features:** Limited permissions, Multi-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.49 / 1,000 verified deliverable emails

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/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

## B2B Domain Email Finder & Multi-SMTP/MX Verifier API

**Ultra-lightweight (`128–256 MB` RAM, `$0` proxy cost) B2B corporate email finder, DNS mail security auditor, and catch-all-aware SMTP verifier.** Combines Cloudflare/Google DNS-over-HTTPS (`MX`, `SPF`, `DMARC`, mail provider fingerprinting), public contact page harvesting, ranked name permutations, and non-sending SMTP `RCPT TO` verification—while guaranteeing **`$0` event charge on invalid, bounced, disposable, or malformed emails**.

[![RAM Footprint](https://img.shields.io/badge/RAM-128--256%20MB-brightgreen)](#architecture-anti-bot-politeness--troubleshooting)
[![Proxy Cost](https://img.shields.io/badge/Proxy%20Cost-%240.00-success)](#why-switch-from-legacy-email-finders)
[![Live Benchmark](https://img.shields.io/badge/Live%20Success-100%25%20\(10%2F10%20Domains\)-success)](#why-switch-from-legacy-email-finders)
[![Pricing](https://img.shields.io/badge/PPE-Valid%20Only%20%240.75%20%E2%86%92%20%240.49%2F1K-orange)](#transparent-ppe-pricing--5-free-tier-cost-estimator)
[![MCP Ready](https://img.shields.io/badge/MCP-mcp.apify.com%20Ready-purple)](#ai-agents-mcp--skills-ready)

***

### Executive Value Proposition

Outbound sales automation, CRM enrichment pipelines, and AI SDR agents waste massive budgets on bounced leads and broken email verifiers. Most Apify email verification Actors fail silently or crash on cloud runners because AWS EC2 blocks outbound TCP Port 25—or charge `$0.008` per guessed pattern whether the email exists or bounces.

**B2B Domain Email Finder & Multi-SMTP/MX Verifier (`studio001/b2b-email-finder-smtp-mx-verifier`)** fixes both reliability and unit economics:

- **Eliminates AWS Port-25 Cloud Blocks (`smtpMode: "auto"`)**: Automatically routes SMTP `RCPT TO` checks through your Port-25-open HTTP relay (`smtpRelayUrl` or `SMTP_RELAY_URL`) with smart transient `5xx`/timeout retry (never retrying `401`/`403` auth errors), or falls back cleanly to DNS MX intelligence without crashing.
- **Pay-Only-For-Deliverable (`$0` Bounce & Syntax Guarantee)**: You are billed `email-verified` **only** when `verificationStatus` is `valid` or `catch_all_found`. You pay **`$0` per item** for `invalid`, `invalid_syntax`, `invalid_no_mx`, `invalid_disposable`, `risky_unverifiable`, `not_found`, and `mx_valid_no_public_email`.
- **128–256 MB RAM & `$0` Proxy Overhead**: Queries Cloudflare (`cloudflare-dns.com`) and Google (`dns.google`) DoH JSON APIs with per-domain async locking and caching, keeping memory at the minimum `128 MB` Apify tier (`57.38 KB` wire/item).
- **Three Unified Workflows in One Run**: Verify explicit email lists (`emailsToVerify`), discover corporate emails from `{firstName, lastName, domain}` (`leads`), and audit domain mail infrastructure + public contact pages (`domainsToHarvest`) simultaneously.

***

### Why Switch from Legacy Email Finders?

Public Apify Store records highlight how brittle legacy cloud SMTP Actors are—for instance, `clearpath~email-finder-api` exhibits a **16.1% 30-day failure/timeout rate** across `7,394` runs from cloud Port-25 timeouts while billing up to `$0.008` per guessed pattern.

| Capability / Metric | **Studio 001: B2B Email Finder & SMTP/MX Verifier** | Legacy Email Finders (`clearpath~email-finder-api`) | Traditional SaaS Email Verifiers |
| --- | --- | --- | --- |
| **Container RAM & Proxy Cost** | **128–256 MB RAM · $0 Proxy** | 512–2,048 MB · Often uses proxies | External proprietary SaaS API |
| **Measured Reliability** | **100% (10/10 domains MX+SPF+DMARC + SMTP live test)** | **16.1% 30-day failure rate** (7,394 runs) | Rate-limited per-seat plans |
| **AWS Port-25 Cloud Resilience** | **Automatic HTTP Relay (`smtpRelayUrl`) + graceful fallback** | Raw Port-25 crashes/timeouts on AWS | Hosted infra only |
| **Billing Model** | **Pay-Only-For-Valid (`$0.75 Free → $0.49 Gold / 1K`)** | Often `$8.00 / 1K` per guessed pattern | Credits burned on unknown/bounced |
| **Invalid / Syntax / No-MX Cost** | **$0.00 (Zero-Charge Guarantee)** | Consumes credits/events | Often deducts 0.5–1 credit |
| **Catch-All Detection** | **Cached per-domain bogus-mailbox probe (`isCatchAll`)** | Inconsistent | Varies by plan |
| **DNS Security Audit** | **DoH MX Priority, Mail Provider, SPF & DMARC records** | Basic MX boolean only | Basic MX check |
| **AI Agent / MCP Integration** | **Native `mcp.apify.com` + n8n/Zapier/Python ready** | Limited / custom wrappers | Separate webhook setup |

***

### Three Verification & Discovery Modes

1. **`emailsToVerify` (`type: "email_verification"`)**: Validates local-part & domain syntax offline first (catching typos, spaces, missing `@`, and non-ASCII junk at zero network cost), runs DoH MX/SPF/DMARC inspection, detects disposable domains, checks catch-all behavior, and executes non-sending SMTP `RCPT TO` probes.
2. **`leads` (`type: "lead_discovery"`)**: Normalizes accented Unicode names (e.g., `José García-López` → `jose.garcialopez@acme.io`), generates up to `maxPatternsPerLead` ranked corporate patterns (`first.last`, `first`, `flast`, `firstlast`, `firstl`, `first_last`, `f.last`, `last.first`, etc.), and stops immediately upon finding the first `valid` or `catch_all_found` match (or `risky_unverifiable` if Port 25 is unreachable).
3. **`domainsToHarvest` (`type: "domain_audit"`)**: Audits domain MX priority, classifies `mailProvider` (`Google Workspace`, `Microsoft 365`, `Proofpoint`, `Mimecast`, `Zoho Mail`, `Fastmail`, `Proton Mail`, `Amazon SES`, `Yahoo Mail`), inspects `spfRecord` / `dmarcRecord`, and optionally crawls `/`, `/contact`, and `/about` (`crawlPublicPages: true`, capped at `50 KB` per page) to extract and verify up to 5 public non-role emails.

***

### High-Impact Use Cases

#### 1. AI SDR Agents & Pre-Send Guardrails (MCP)

Give Claude, Cursor, or autonomous outreach agents a deterministic pre-send verification tool via `mcp.apify.com`. Before drafting or queuing outbound messages, agents verify candidate addresses (`verificationStatus === "valid"`), inspect `mailProvider` (e.g., filtering Proofpoint/Mimecast enterprise security gateways), and skip bounces completely.

#### 2. Recruiting & ATS Hiring Pipeline Enrichment (Cron / Automation)

Chain **[ATS Direct Multi-Board Jobs Feed](https://apify.com/studio001/ats-jobs-direct-api)** with **B2B Domain Email Finder & SMTP/MX Verifier** on a scheduled Apify/n8n cron: discover fast-growing companies hiring on Greenhouse, Lever, or Ashby, audit their company domains (`domainsToHarvest`), and find verified engineering or recruiting leadership contacts (`leads`).

#### 3. CRM Hygiene, List Cleaning & DNS Deliverability Auditing

Clean stale HubSpot, Salesforce, or Apollo CSV lists in bulk (`emailsToVerify` + `domainsToHarvest`). Flag `invalid_syntax`, `invalid_disposable`, `invalid_no_mx`, and hard-bounced `550` mailboxes at **$0 verification charge** while enriching every account record with `hasSpf`, `hasDmarc`, and `mailProvider`.

***

### Quick-Start Input JSON

#### Minimal Quick-Start (Direct Email Verification)

```json
{
  "emailsToVerify": [
    "security@stripe.com",
    "bad-syntax-email"
  ],
  "smtpMode": "auto"
}
```

#### Full Multi-Mode Run (Leads + Email Verification + Domain Audit + Relay)

```json
{
  "emailsToVerify": [
    "security@stripe.com",
    "test@notion.so",
    "invalid-syntax"
  ],
  "leads": [
    {
      "firstName": "Patrick",
      "lastName": "Collison",
      "domain": "https://www.stripe.com/about"
    }
  ],
  "domainsToHarvest": [
    "figma.com",
    "linear.app"
  ],
  "crawlPublicPages": true,
  "maxPatternsPerLead": 8,
  "smtpMode": "auto",
  "heloDomain": "verify.studio001.co.kr",
  "fromEmail": "probe@studio001.co.kr",
  "maxTotalChargeUsd": 1.0
}
```

***

### Input Parameter Reference

All inputs are organized in the Apify Console into **3 collapsible sections**. Domain inputs automatically strip protocols, `www.`, and paths (`https://www.Stripe.com/pricing` → `stripe.com`), and string inputs coerce comma- or newline-delimited values cleanly.

| Parameter | Type | Default / Prefill | Section | Description |
| --- | --- | --- | --- | --- |
| `emailsToVerify` | `array<string>` (or string) | `["security@stripe.com"]` | 1. Targets | Candidate email addresses to verify directly (auto-defaults to `["security@stripe.com"]` if all 3 target lists are empty). |
| `leads` | `array<object>` (or JSON string) | `[]` | 1. Targets | List of `{firstName, lastName, domain}` objects for corporate pattern discovery and verification. |
| `domainsToHarvest` | `array<string>` (or string) | `[]` | 1. Targets | Corporate domains or URLs to audit MX/SPF/DMARC and harvest public contact emails. |
| `crawlPublicPages` | `boolean` | `true` | 2. Discovery & Harvesting | Fetches `/`, `/contact`, and `/about` (50 KB cap/page) during `domainsToHarvest` audits to extract up to 5 public emails. |
| `maxPatternsPerLead` | `integer` (`1–20`) | `8` | 2. Discovery & Harvesting | Maximum ranked corporate email permutations tested per lead before stopping. |
| `smtpMode` | `enum` | `"auto"` | 3. SMTP & Guardrails | `"auto"` (relay if `smtpRelayUrl`/`SMTP_RELAY_URL` set, else direct Port 25), `"direct"`, `"relay"`, or `"mx_only"`. |
| `smtpRelayUrl` | `string` | `—` | 3. SMTP & Guardrails | Optional URL of your Port-25-open HTTP relay (`services/smtp-relay` `/verify` endpoint). |
| `smtpRelayToken` | `string` (secret) | `—` | 3. SMTP & Guardrails | Optional Bearer token sent in `Authorization` header to `smtpRelayUrl`. |
| `heloDomain` | `string` | `"verify.studio001.co.kr"` | 3. SMTP & Guardrails | EHLO/HELO domain advertised during SMTP verification. |
| `fromEmail` | `string` | `"probe@studio001.co.kr"` | 3. SMTP & Guardrails | Envelope `MAIL FROM` sender address (verification always sends `QUIT` before `DATA`). |
| `maxTotalChargeUsd` | `number` (`>= 0`) | `—` | 3. SMTP & Guardrails | Hard USD PPE spending cap for the run; halts billing/pushing once reached. |

***

### Output Example & Field Dictionary

#### 1. Direct Email Verification (`type: "email_verification"`)

```json
{
  "type": "email_verification",
  "domain": "stripe.com",
  "email": "security@stripe.com",
  "verificationStatus": "valid",
  "confidenceScore": 0.98,
  "isCatchAll": false,
  "smtpCode": 250,
  "smtpDetail": "2.1.5 OK",
  "mailProvider": "Google Workspace",
  "hasMx": true,
  "mxHosts": ["aspmx.l.google.com", "alt1.aspmx.l.google.com"],
  "hasSpf": true,
  "hasDmarc": true
}
```

#### 2. Lead Discovery (`type: "lead_discovery"`)

```json
{
  "type": "lead_discovery",
  "firstName": "Patrick",
  "lastName": "Collison",
  "domain": "stripe.com",
  "email": "patrick@stripe.com",
  "verificationStatus": "valid",
  "confidenceScore": 0.98,
  "isCatchAll": false,
  "smtpCode": 250,
  "smtpDetail": "2.1.5 OK",
  "testedPatternsCount": 2,
  "mailProvider": "Google Workspace",
  "hasMx": true,
  "mxHosts": ["aspmx.l.google.com"],
  "hasSpf": true,
  "hasDmarc": true
}
```

#### 3. Domain DNS & Contact Audit (`type: "domain_audit"`)

```json
{
  "type": "domain_audit",
  "domain": "figma.com",
  "email": "press@figma.com",
  "verificationStatus": "valid",
  "confidenceScore": 0.98,
  "isCatchAll": false,
  "harvestedEmails": [
    {
      "email": "press@figma.com",
      "verificationStatus": "valid",
      "confidenceScore": 0.98,
      "isCatchAll": false,
      "smtpCode": 250,
      "smtpDetail": "2.1.5 OK"
    }
  ],
  "mailProvider": "Google Workspace",
  "hasMx": true,
  "mxHosts": ["aspmx.l.google.com"],
  "hasSpf": true,
  "hasDmarc": true,
  "spfRecord": "v=spf1 include:_spf.google.com ~all",
  "dmarcRecord": "v=DMARC1; p=reject; rua=mailto:dmarc@figma.com",
  "smtpCode": 250
}
```

#### Key-Value Store Telemetry (`OUTPUT_METRICS`)

```json
{
  "counts": { "apify-actor-start": 1, "email-verified": 2 },
  "bronze_total_usd": 0.00141,
  "blended_total_usd": 0.001299,
  "itemsTotal": 6,
  "itemsBilled": 2,
  "itemsZeroChargeSkipped": 4,
  "domainsAudited": 3
}
```

#### Comprehensive Output Field Dictionary

| Field | Mode(s) | Type | Description |
| --- | --- | --- | --- |
| `type` | All | `string` | Record type: `"email_verification"`, `"lead_discovery"`, or `"domain_audit"`. |
| `firstName` / `lastName` | `lead_discovery` | `string` | Input lead first and last name strings. |
| `domain` | All | `string \| null` | Normalized target domain (e.g., `"stripe.com"`). |
| `email` | All | `string \| null` | Normalized target/matched email (or primary harvested email in `domain_audit`). |
| `verificationStatus` | All | `string` | `valid`, `catch_all_found` (**billed**); `invalid`, `invalid_syntax`, `invalid_disposable`, `invalid_no_mx`, `risky_unverifiable`, `not_found`, `mx_valid_no_public_email` (**$0 charge**). |
| `confidenceScore` | All | `number` | Deliverability score: `0.98` (`valid`), `0.65` (`catch_all_found`), `0.45` (`risky_unverifiable` with MX), `0.0` (`invalid*` / `not_found`). |
| `isCatchAll` | All | `boolean` | `true` if domain accepted a randomized `nonexistent-<hex>@domain` probe. |
| `smtpCode` | All | `integer \| null` | Last SMTP status code returned by `RCPT TO` (e.g., `250`, `550`, or `null` if blocked/skipped). |
| `smtpDetail` | `email_verification`, `lead_discovery` | `string \| null` | Raw SMTP response message or syntax/DNS failure diagnostic reason. |
| `testedPatternsCount` | `lead_discovery` | `integer` | Number of permutations tested before match or stop. |
| `harvestedEmails` | `domain_audit` | `array<object>` | Up to 5 harvested public contacts from `/`, `/contact`, `/about` with individual verification statuses. |
| `mailProvider` | All | `string` | Fingerprinted provider: `Google Workspace`, `Microsoft 365`, `Proofpoint`, `Mimecast`, `Zoho Mail`, `Fastmail`, `Proton Mail`, `Amazon SES`, `Yahoo Mail`, `Custom / Other`, or `None`. |
| `hasMx` | All | `boolean` | `true` when at least one valid MX record resolves via DoH. |
| `mxHosts` | All | `array<string>` | Priority-sorted list of MX exchange hostnames. |
| `hasSpf` / `hasDmarc` | All | `boolean` | `true` if `v=spf1` TXT or `_dmarc` `v=DMARC1` TXT records exist. |
| `spfRecord` / `dmarcRecord` | `domain_audit` | `string \| null` | Full raw SPF / DMARC TXT record strings when present. |

***

### Transparent PPE Pricing & $5 Free Tier Cost Estimator

You pay only for **run start** (`apify-actor-start`) and **verified deliverable emails** (`email-verified` triggered **only** when `verificationStatus` is `valid` or `catch_all_found`). Every invalid, bounced, disposable, syntax-malformed, or unverifiable record costs **$0**.

#### Live Pay-Per-Event (PPE) Schedule

| Event Name | Trigger Condition | FREE | BRONZE | SILVER | GOLD / PLATINUM / DIAMOND |
| --- | --- | :---: | :---: | :---: | :---: |
| `apify-actor-start` | One-time run initialization fee | `$0.00005` | `$0.00005` | `$0.00005` | `$0.00005` |
| `email-verified` | `verificationStatus` is `valid` or `catch_all_found` **only** | `$0.00075` (`$0.75/1K`) | `$0.00068` (`$0.68/1K`) | `$0.00059` (`$0.59/1K`) | `$0.00049` (`$0.49/1K`) |

#### Plan Budget & Capacity Estimator (Assuming 100 Verified Deliverables / Run)

| Apify Plan Tier | Monthly Credit | Verified Email Capacity (`email-verified`) | Effective Cost / 1K Valid Emails (incl. start) | Invalid / Syntax / Domain-Only Cost |
| --- | :---: | :---: | :---: | :---: |
| **Free Tier** | **$5.00** | **~6,662 valid emails** | **$0.7505 / 1K** | **$0.00** |
| **Starter ($19/mo)** | **$19.00** | **~27,920 valid emails** (Bronze) | **$0.6805 / 1K** (Bronze rate) | **$0.00** |
| **Scale ($199/mo)** | **$199.00** | **~337,002 (Silver) – ~405,708 (Gold+)** | **$0.4905 – $0.5905 / 1K** | **$0.00** |

***

### AI Agents, MCP & Skills Ready

#### 1. Model Context Protocol (MCP) — Claude Desktop, Cursor & VS Code

Attach `studio001/b2b-email-finder-smtp-mx-verifier` directly in Claude Desktop, Cursor, or VS Code via `mcp.apify.com`:

```json
{
  "mcpServers": {
    "b2b-email-finder-verifier": {
      "url": "https://mcp.apify.com/?actors=studio001/b2b-email-finder-smtp-mx-verifier",
      "headers": {
        "Authorization": "Bearer <APIFY_API_TOKEN>"
      }
    }
  }
}
```

Example MCP prompt in Claude or Cursor:

> *"Use `studio001/b2b-email-finder-smtp-mx-verifier` to audit `stripe.com` and `figma.com` mail infrastructure (`hasMx`, `mailProvider`, `hasSpf`, `hasDmarc`) and find/verify corporate emails for `{firstName, lastName, domain}` leads."*

#### 2. For AI Agents & LLMs — Copy-Paste Skill Block

```markdown
#### Skill: B2B Email Finder, DNS Security Audit & SMTP Verifier
- **Actor ID**: `studio001/b2b-email-finder-smtp-mx-verifier`
- **When to use**: Discovering corporate email addresses from `{firstName, lastName, domain}`, verifying existing email lists without sending mail, or inspecting domain MX/SPF/DMARC records.
- **Inputs**: Provide any combination of `emailsToVerify` (list), `leads` (`[{firstName, lastName, domain}]`), and `domainsToHarvest` (list). Use `smtpMode: "mx_only"` when you only need fast DNS security audits.
- **Zero-charge logic**: Only `verificationStatus` of `"valid"` (`0.98` confidence) or `"catch_all_found"` (`0.65` confidence) is billed. Never suppress invalid inputs pre-call; the Actor rejects bad syntax offline at $0 cost.
- **Key output fields**: `type`, `email`, `domain`, `verificationStatus`, `confidenceScore`, `isCatchAll`, `smtpCode`, `mailProvider`, `hasMx`, `hasSpf`, `hasDmarc`, `harvestedEmails[]`.
```

#### 3. n8n, Make.com & Zapier Automated Lead-Enrichment Recipes

Production workflow templates (CRM enrichment triggers, HubSpot/Airtable bounce cleaners, and cold-outreach pre-checks) are maintained in **[yeongjunyoo/studio001-apify-clients](https://github.com/yeongjunyoo/studio001-apify-clients)**.

- **n8n Cron / Webhook Recipe**:
  1. Trigger on new CRM lead row (`firstName`, `lastName`, `companyDomain`) or daily cleanup cron (`0 6 * * *`).
  2. Call **Apify -> Run Actor (`studio001/b2b-email-finder-smtp-mx-verifier`)** with:
     ```json
     {
       "leads": [
         {
           "firstName": "{{ $json.first }}",
           "lastName": "{{ $json.last }}",
           "domain": "{{ $json.domain }}"
         }
       ],
       "smtpMode": "auto",
       "maxPatternsPerLead": 8,
       "maxTotalChargeUsd": 0.5
     }
     ```
  3. **IF (`verificationStatus === "valid"`)** → Sync verified email + `mailProvider` to CRM / outreach sequence; route `catch_all_found` (`0.65`) or `invalid` to review/suppress.
- **Make.com / Zapier**: Use the synchronous REST endpoint below to verify incoming form signups or lead webhooks inside a single HTTP module.

#### 4. Python (`apify-client`) & cURL REST API Quickstart

##### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient("<APIFY_API_TOKEN>")

run = client.actor("studio001/b2b-email-finder-smtp-mx-verifier").call(
    run_input={
        "emailsToVerify": ["security@stripe.com"],
        "leads": [{"firstName": "Patrick", "lastName": "Collison", "domain": "stripe.com"}],
        "domainsToHarvest": ["figma.com"],
        "smtpMode": "auto",
        "crawlPublicPages": True,
        "maxPatternsPerLead": 8,
    }
)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["type"], item.get("email"), item["verificationStatus"], item["mailProvider"])
```

##### cURL (Synchronous Run Returning Dataset Items)

```bash
curl -X POST "https://api.apify.com/v2/acts/studio001~b2b-email-finder-smtp-mx-verifier/run-sync-get-dataset-items?token=<APIFY_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "emailsToVerify": ["security@stripe.com"],
    "domainsToHarvest": ["stripe.com"],
    "smtpMode": "auto",
    "crawlPublicPages": false
  }'
```

***

### Architecture, Anti-Bot Politeness & Troubleshooting

#### Verification & Relay Architecture

1. **Zero-Network Syntax Gate (`validate_email_syntax`)**: Validates local part (max 64 chars, RFC-safe token rules, no whitespace/double dots) and domain labels offline before issuing any DNS or TCP requests.
2. **Cached DoH Intelligence (`dns_intel.py`)**: Queries Cloudflare DoH with automatic Google DoH failover for `MX`, `TXT` (`v=spf1`), and `_dmarc.<domain>` (`v=DMARC1`), deduplicated per domain via `asyncio.Lock` and `dns_cache`.
3. **Catch-All-Aware SMTP Handshake (`smtp_probe.py`)**: Sends `EHLO` → `MAIL FROM` → `RCPT TO` → `QUIT` (never calling `DATA`), plus one cached probe to `nonexistent-<hex>@domain` to detect catch-all servers accurately (`confidenceScore: 0.65` vs `0.98`).
4. **Port-25 Relay & Retry Discipline**: When `smtpMode` is `"relay"` or `"auto"` with `smtpRelayUrl` (or env `SMTP_RELAY_URL`), sends `/verify` JSON requests with **one randomized jittered retry (`0.2–0.55s`) on `5xx` or network timeouts**, while **never retrying `401`/`403` authentication or client `4xx` errors**.
5. **Polite Public Crawl**: `crawlPublicPages` caps HTML reads to `51,200` bytes (`50 KB`) across `/`, `/contact`, and `/about`, ignores asset filenames (`.png`, `.jpg`, `.svg`, etc.) and role accounts (`noreply`, `postmaster`, `mailer-daemon`), and enforces `Semaphore(5)` concurrency.

#### Troubleshooting & Error Handling Table

| `verificationStatus` / Symptom | Cause | Billing Impact | Resolution |
| --- | --- | --- | --- |
| `invalid_syntax` | Malformed email string (missing `@`, whitespace, bad domain label) | **$0.00** | Fix formatting upstream or filter out downstream. |
| `invalid_disposable` | Domain matches known temporary email providers (`mailinator.com`, `yopmail.com`, etc.) | **$0.00** | Block disposable signups in your application or CRM. |
| `invalid_no_mx` | Domain publishes zero MX records via DoH | **$0.00** | Domain cannot receive email; remove from outreach lists. |
| `invalid` | Mail server explicitly rejected recipient (`550`/`551`/`553`/`554`) | **$0.00** | Mailbox does not exist; do not email. |
| `risky_unverifiable` | Outbound TCP Port 25 blocked on runner, greylisted (`4xx`), or `smtpMode: "mx_only"` | **$0.00** | Pass `smtpRelayUrl` (Port-25 HTTP relay) with `smtpMode: "auto"` to complete SMTP checks from Apify Cloud. |
| `catch_all_found` | Server accepts both target email and randomized nonexistent probe | **Billed (`0.65` confidence)** | Treat as medium confidence (`isCatchAll: true`); use alongside `mailProvider` and public crawl matches. |
| `mx_valid_no_public_email` | `domain_audit` confirmed valid MX records, but no public email was found on `/`, `/contact`, `/about` | **$0.00** | Pass named contacts into `leads` (`{firstName, lastName, domain}`) to test corporate permutations. |

***

### Frequently Asked Questions (FAQ)

**Q: Will I be charged for syntax errors, disposable domains, or bounced (`550`) emails?**
No. `email-verified` is charged **only** when `verificationStatus` is `valid` or `catch_all_found`. All invalid, unfound, disposable, no-MX, and unverifiable results emit structured records at **`$0` event fee**.

**Q: Does this Actor ever send an actual email to my leads?**
Never. The SMTP probe terminates cleanly with `QUIT` right after the `RCPT TO:<email>` response—it never issues the `DATA` command.

**Q: Why did my run return `risky_unverifiable` with `port25_blocked_or_timeout` on Apify Cloud?**
Standard cloud providers (including AWS EC2 used by Apify Cloud runners) restrict outbound TCP Port 25 to prevent spam. You still receive full `hasMx`, `mxHosts`, `mailProvider`, `hasSpf`, and `hasDmarc` DNS intelligence at `$0` verification fee—and to enable full SMTP `RCPT TO` from Apify Cloud, deploy the lightweight FastAPI `services/smtp-relay` container on a Port-25-open VPS and set `smtpRelayUrl` + `smtpRelayToken`.

**Q: How does `leads` pattern discovery stay fast and accurate?**
Permutations are ordered by enterprise prevalence (`first.last@`, `first@`, `flast@`, `firstlast@`, etc.) and short-circuit immediately on the first `valid` or `catch_all_found` hit—or after the first probe if the domain blocks Port 25 (`risky_unverifiable`).

**Q: Can I pass company website URLs in `leads[].domain` or `domainsToHarvest`?**
Yes. `normalize_domain()` automatically strips schemes, `www.`, ports, and paths (e.g., `https://www.Stripe.com/pricing?x=1` → `stripe.com`).

**Q: Can I run pure DNS security audits (`MX`/`SPF`/`DMARC` + provider detection) at minimal cost?**
Yes. Set `"smtpMode": "mx_only"` and `"crawlPublicPages": false` on `domainsToHarvest` to audit hundreds of domains' mail security (`hasMx`, `hasSpf`, `hasDmarc`, `spfRecord`, `dmarcRecord`, `mailProvider`) for only the `$0.00005` run start fee.

***

### Use as a Real-Time API or Native MCP Server (Standby)

Verify emails, audit MX/SPF/DMARC, or resolve lead patterns synchronously at `128 MB` RAM:

- **Native MCP Endpoint (`LIMITED_PERMISSIONS`, `128 MB`):** `https://studio001--b2b-email-finder-smtp-mx-verifier.apify.actor/mcp` (`tools/list` exposes `verify_b2b_email`)
- **Instant REST Endpoint:** `POST https://studio001--b2b-email-finder-smtp-mx-verifier.apify.actor/api/run`

```bash
curl -X POST "https://studio001--b2b-email-finder-smtp-mx-verifier.apify.actor/api/run" \
  -H "Authorization: Bearer YOUR_APIFY_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"emailsToVerify": ["security@stripe.com"], "smtpMode": "auto"}'
```

***

### More High-Reliability APIs by Studio 001

Explore the full Studio 001 zero-browser API suite on Apify Store—all engineered for **low RAM**, **Pay-Per-Event transparency**, **$0 charge on errors**, and **MCP integration**:

| Actor | Category | Key Capability | Apify Store URL |
| --- | --- | --- | --- |
| **Google Hotels Multi-OTA Monitor** | Travel / AI / MCP | Direct `AtySUc` RPC hotel prices & Booking/Expedia/Agoda offers | [apify.com/studio001/google-hotels-multi-ota-monitor](https://apify.com/studio001/google-hotels-multi-ota-monitor) |
| **YouTube Transcript & Chapters Pro API** | Videos / AI / MCP | 4-tier Innertube captions, chapters, `chapterMarkdown`, SRT/VTT | [apify.com/studio001/youtube-transcript-chapters-pro-api](https://apify.com/studio001/youtube-transcript-chapters-pro-api) |
| **Instagram Reels AI Transcript & Hook Extractor** | Social / AI / MCP | Audio-first DASH + Groq/local Whisper + 3.5s opening hook analytics | [apify.com/studio001/instagram-reels-ai-transcript-hook-extractor](https://apify.com/studio001/instagram-reels-ai-transcript-hook-extractor) |
| **Google Ads Transparency Direct-RPC** | Marketing / AI / MCP | Direct RPC ad creative & advertiser intelligence at 256 MB RAM | [apify.com/studio001/google-ads-transparency-direct-rpc](https://apify.com/studio001/google-ads-transparency-direct-rpc) |
| **Naver Blog & Cafe Pro Scraper** | Korea / RAG / MCP | Fast Naver search, blog post bodies & cafe feeds for Korean market intel | [apify.com/studio001/naver-blog-cafe-pro-scraper](https://apify.com/studio001/naver-blog-cafe-pro-scraper) |
| **OliveYoung Global & KR Beauty API** | E-Commerce / Beauty | K-Beauty rankings, SKUs, prices, reviews & stock intelligence | [apify.com/studio001/oliveyoung-global-kr-beauty-api](https://apify.com/studio001/oliveyoung-global-kr-beauty-api) |
| **Coupang Search & Product Detail Pro API** | E-Commerce / Retail | Rocket Delivery search, pricing, ratings & seller detail extraction | [apify.com/studio001/coupang-search-detail-pro-api](https://apify.com/studio001/coupang-search-detail-pro-api) |
| **ATS Direct Multi-Board Jobs Feed** | Jobs / Leads / MCP | Direct Greenhouse, Lever & Ashby job-board JSON feeds | [apify.com/studio001/ats-jobs-direct-api](https://apify.com/studio001/ats-jobs-direct-api) |
| **YouTube Channel Search & Creator Discovery Pro API** | Videos / Creator / MCP | Channel search, subscriber/view filters & creator discovery feeds | [apify.com/studio001/youtube-channel-search-pro-api](https://apify.com/studio001/youtube-channel-search-pro-api) |
| **Similarweb Traffic & Channel Intel API** | Marketing / B2B / MCP | Monthly visits, bounce rate, channel split, geo & competitors (`UNBLOCKER`) | [apify.com/studio001/similarweb-traffic-channel-intel-api](https://apify.com/studio001/similarweb-traffic-channel-intel-api) |
| **AI Search & AEO Brand Monitor** | AI / SEO / MCP | Google AI Overviews, Perplexity, ChatGPT & Gemini brand citations & share of voice | [apify.com/studio001/ai-search-aeo-brand-monitor](https://apify.com/studio001/ai-search-aeo-brand-monitor) |

#### Suggested Pipeline Chains

1. **Hiring Signal → Verified Decision-Maker Outreach**: Pull fast-growing companies actively hiring engineering or GTM roles via [**ATS Direct Multi-Board Jobs Feed**](https://apify.com/studio001/ats-jobs-direct-api) → feed company domains & hiring-manager names into **B2B Domain Email Finder & SMTP/MX Verifier** to generate clean, verified outreach lists.
2. **Paid Advertiser Prospecting Pipeline**: Discover companies actively spending on Google Ads in high-intent verticals via [**Google Ads Transparency Direct-RPC**](https://apify.com/studio001/google-ads-transparency-direct-rpc) → verify their marketing & executive domains/emails via **B2B Domain Email Finder & SMTP/MX Verifier**.
3. **Creator Sponsorship & Partnership Outreach**: Discover niche B2B/tech creators with [**YouTube Channel Search & Creator Discovery Pro API**](https://apify.com/studio001/youtube-channel-search-pro-api) and extract sponsorship domains or business emails → verify deliverability cleanly before launching sponsorship outreach.

***

### Task Examples

Launch pre-configured zero-setup workflows directly from Apify Store:

- **[Bulk B2B Email Verifier & Catch-All SMTP Checker ($0.49/1K)](https://apify.com/studio001/b2b-email-finder-smtp-mx-verifier/examples/b2b-email-verifier-smtp-catchall)** — Verify B2B emails with live SMTP RCPT TO + catch-all detection at $0.49/1K Gold ($0.75 Free). Pay $0 for invalid, syntax, or bounced items.
- **[Corporate Email Finder by Name & Domain (SMTP Verified)](https://apify.com/studio001/b2b-email-finder-smtp-mx-verifier/examples/b2b-decision-maker-email-finder)** — Find & SMTP-verify B2B corporate emails from first name, last name & domain at $0.49/1K Gold. $0 charge when unverified or not found.
- **[Company Domain Contact Email Harvester & SMTP Verifier](https://apify.com/studio001/b2b-email-finder-smtp-mx-verifier/examples/domain-email-harvester-contact-pages)** — Harvest public contact emails from company domains, audit MX/SPF/DMARC records, and verify SMTP deliverability ($0.49/1K Gold).
- **[Domain DNS Mail Security Auditor (MX, SPF & DMARC)](https://apify.com/studio001/b2b-email-finder-smtp-mx-verifier/examples/dns-mx-spf-dmarc-deliverability-auditor)** — Audit B2B domains for MX priority, mail provider (Google/M365/Proofpoint), SPF, and DMARC security records via fast DoH JSON.
- **[CRM Email List Cleaner ($0 Charged on Invalid & Bounced)](https://apify.com/studio001/b2b-email-finder-smtp-mx-verifier/examples/crm-email-list-cleaner-zero-bounce-charge)** — Clean CRM email lists before outreach ($0.49/1K Gold, $0.75 Free). Hard budget cap + $0 billed on syntax, disposable, or 550 bounces.

***

### Custom Data Pipelines & Enterprise SLA

Need dedicated rate limits, custom dataset schemas, private webhook/S3/Snowflake delivery, high-volume volume discounts, or bespoke multi-Actor pipelines?

- **Direct Engineering Contact:** <studio001.kr@gmail.com>
- **Supported Delivery:** Managed Apify Standby MCP integrations, dedicated residential/unblocker routing, custom cron monitoring, and SLA-backed ETL connectors.

# Actor input Schema

## `emailsToVerify` (type: `array`):

List of candidate email addresses to verify via syntax validation, DoH MX lookup, catch-all detection, and SMTP RCPT TO probe. Also accepts comma/newline strings.

## `leads` (type: `array`):

Optional JSON array of {firstName, lastName, domain} objects to generate and verify ranked corporate email permutations (stops on first valid/catch-all match).

## `domainsToHarvest` (type: `array`):

Optional list of corporate domains or URLs (auto-normalized, e.g. https://www.Stripe.com/about -> stripe.com) to audit mail security and harvest public contact emails.

## `crawlPublicPages` (type: `boolean`):

When true, fetches domain /, /contact, and /about (50 KB cap per page) during domainsToHarvest audits to extract and verify up to 5 public contact emails.

## `maxPatternsPerLead` (type: `integer`):

Maximum number of ranked corporate email permutations tested per lead (1-20; stops immediately upon first verified match).

## `smtpMode` (type: `string`):

auto routes through smtpRelayUrl/SMTP_RELAY_URL if set else tries direct Port 25 and degrades gracefully; direct forces raw TCP Port 25; relay forces HTTP relay; mx_only performs DNS MX/SPF/DMARC checks without Port 25.

## `smtpRelayUrl` (type: `string`):

Optional URL of your Port-25-open SMTP verification relay (see services/smtp-relay in repository) to bypass cloud Port-25 blocks with automatic transient retry.

## `smtpRelayToken` (type: `string`):

Optional Bearer token used to authenticate against smtpRelayUrl.

## `heloDomain` (type: `string`):

EHLO/HELO hostname advertised during SMTP RCPT TO verification.

## `fromEmail` (type: `string`):

Envelope MAIL FROM sender address used during SMTP RCPT TO verification (never sends email DATA).

## `maxTotalChargeUsd` (type: `number`):

Optional hard PPE spending cap for this run in USD. Stops charging and pushing further verified items once reached.

## Actor input object example

```json
{
  "emailsToVerify": [
    "security@stripe.com",
    "alice@acme.io"
  ],
  "leads": [
    {
      "firstName": "Patrick",
      "lastName": "Collison",
      "domain": "stripe.com"
    }
  ],
  "domainsToHarvest": [
    "stripe.com",
    "figma.com"
  ],
  "crawlPublicPages": true,
  "maxPatternsPerLead": 8,
  "smtpMode": "auto",
  "smtpRelayUrl": "https://smtp-relay.example.com",
  "heloDomain": "verify.studio001.co.kr",
  "fromEmail": "probe@studio001.co.kr",
  "maxTotalChargeUsd": 1
}
```

# Actor output Schema

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

Deliverability audit, SMTP verification codes, catch-all status, and DNS records.

## `metrics` (type: `string`):

Execution telemetry, wire bytes, proxy usage, and per-run unit economics JSON.

# 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 = {
    "emailsToVerify": [
        "security@stripe.com"
    ],
    "leads": [],
    "domainsToHarvest": [],
    "crawlPublicPages": true,
    "maxPatternsPerLead": 8,
    "smtpMode": "auto",
    "heloDomain": "verify.studio001.co.kr",
    "fromEmail": "probe@studio001.co.kr"
};

// Run the Actor and wait for it to finish
const run = await client.actor("studio001/b2b-email-finder-smtp-mx-verifier").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 = {
    "emailsToVerify": ["security@stripe.com"],
    "leads": [],
    "domainsToHarvest": [],
    "crawlPublicPages": True,
    "maxPatternsPerLead": 8,
    "smtpMode": "auto",
    "heloDomain": "verify.studio001.co.kr",
    "fromEmail": "probe@studio001.co.kr",
}

# Run the Actor and wait for it to finish
run = client.actor("studio001/b2b-email-finder-smtp-mx-verifier").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 '{
  "emailsToVerify": [
    "security@stripe.com"
  ],
  "leads": [],
  "domainsToHarvest": [],
  "crawlPublicPages": true,
  "maxPatternsPerLead": 8,
  "smtpMode": "auto",
  "heloDomain": "verify.studio001.co.kr",
  "fromEmail": "probe@studio001.co.kr"
}' |
apify call studio001/b2b-email-finder-smtp-mx-verifier --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,studio001/b2b-email-finder-smtp-mx-verifier"
        }
    }
}
```

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/BWvPdKmmOoewcs9Nb/builds/g4sSF3qunZeSE2uMy/openapi.json
