# Email Finder & Verifier (`hermesexp/email-finder`) Actor

Find email addresses from any website. Perfect for lead generation, sales outreach, and recruiter prospecting.

- **URL**: https://apify.com/hermesexp/email-finder.md
- **Developed by:** [Dima Radov](https://apify.com/hermesexp) (community)
- **Categories:** Marketing, Social media
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js/docs.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python/docs.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## Email Finder & Verifier

Finds and verifies email addresses from a domain. Ideal for lead generation, sales outreach, and contact discovery.

### Features

- **Website Crawling** — Crawls the website homepage, /contact, /about, /team, and linked internal pages to find published email addresses
- **Email Extraction** — Extracts emails from page text and `mailto:` links using BeautifulSoup
- **Common Pattern Generation** — Generates and tests common email patterns: info@, contact@, hello@, support@, admin@, sales@, and 25+ more
- **Name-Based Pattern Generation** — If a person's name is provided, generates common patterns: first@, first.last@, firstlast@, f.last@, and more
- **Format Validation** — Validates email format (RFC 5321-style) with detailed issue reporting
- **MX Record Checking** — Checks if the domain has valid MX records for email delivery using DNS lookup
- **Deduplication** — Automatically deduplicates emails found from multiple sources

### Input

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `domain` | string | ✅ | Domain to search (e.g., `example.com`) |
| `firstName` | string | ❌ | First name for name-based patterns |
| `lastName` | string | ❌ | Last name for name-based patterns |
| `crawlWebsite` | boolean | ❌ | Crawl website for emails (default: true) |
| `tryCommonPatterns` | boolean | ❌ | Try common email prefixes (default: true) |
| `tryNamePatterns` | boolean | ❌ | Try name-based patterns (default: true) |
| `checkMxRecords` | boolean | ❌ | Check MX records (default: true) |
| `maxCrawlPages` | integer | ❌ | Max pages to crawl (default: 10, max: 50) |

### Output

The actor outputs a summary object plus individual email entries:

#### Summary Object

```json
{
  "domain": "example.com",
  "firstName": null,
  "lastName": null,
  "stats": {
    "totalEmailsFound": 5,
    "validFormat": 4,
    "invalidFormat": 1,
    "sources": {
      "website_crawl": 3,
      "common_patterns": 10,
      "name_patterns": 0
    }
  },
  "emails": [
    {
      "email": "contact@example.com",
      "formatValid": true,
      "localPart": "contact",
      "domain": "example.com",
      "issues": [],
      "sources": ["common_patterns", "website_crawl"],
      "discoveredBy": "common_patterns"
    },
    ...
  ],
  "mxRecords": {
    "domain": "example.com",
    "hasMxRecords": true,
    "mxRecords": [
      {"preference": 10, "exchange": "mail.example.com"}
    ]
  },
  "crawlResults": {
    "pagesCrawled": ["https://example.com", "https://example.com/contact"],
    "pageErrors": {},
    "emailsFoundOnWebsite": ["contact@example.com"]
  }
}
````

#### Individual Email Entries

Each validated email is also pushed as a separate dataset item for easy CSV/JSON export, including the search domain and MX record status.

### How It Works

1. **Input Validation** — Cleans the domain and validates required fields
2. **Website Crawling** — Fetches the website homepage and common pages, extracts all visible email addresses
3. **Pattern Generation** — Generates common (info@, contact@, etc.) and name-based (first.last@) patterns
4. **Validation** — Validates each email's format with detailed RFC-style checks
5. **MX Check** — Queries DNS MX records to verify the domain can receive email
6. **Dedup & Output** — Merges, deduplicates, and outputs results

### Use Cases

- Lead generation and prospecting
- Sales outreach contact discovery
- Marketing campaign list building
- Competitor analysis
- Finding press/media contacts
- Discovering support/billing contacts

### Limitations

- Crawls publicly visible pages only — does not bypass authentication or scrape behind logins
- Email pattern generation produces likely addresses but cannot confirm deliverability without sending an actual email
- MX record checking confirms the domain can receive email, but does not verify individual email existence
- Some websites obfuscate email addresses (e.g., using JavaScript or images) which cannot be extracted with simple HTTP crawling
- Respects `robots.txt` is recommended when used at scale

# Actor input Schema

## `domain` (type: `string`):

The domain to search for email addresses (e.g., example.com). Do NOT include http:// or www.

## `firstName` (type: `string`):

First name of the person to find an email for.

## `lastName` (type: `string`):

Last name of the person to find an email for.

## `crawlWebsite` (type: `boolean`):

Crawl the website pages to find emails displayed on the site.

## `tryCommonPatterns` (type: `boolean`):

Try common email patterns like info@, contact@, hello@, support@.

## `tryNamePatterns` (type: `boolean`):

If first/last name is provided, try patterns like first@, first.last@, firstlast@.

## `checkMxRecords` (type: `boolean`):

Check if the domain has valid MX records for email delivery.

## `maxCrawlPages` (type: `integer`):

Maximum number of pages to crawl on the website.

## Actor input object example

```json
{
  "domain": "example.com",
  "crawlWebsite": true,
  "tryCommonPatterns": true,
  "tryNamePatterns": true,
  "checkMxRecords": true,
  "maxCrawlPages": 10
}
```

# 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 = {
    "domain": "example.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("hermesexp/email-finder").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 = { "domain": "example.com" }

# Run the Actor and wait for it to finish
run = client.actor("hermesexp/email-finder").call(run_input=run_input)

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

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

```

## CLI example

```bash
echo '{
  "domain": "example.com"
}' |
apify call hermesexp/email-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=hermesexp/email-finder",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Email Finder & Verifier",
        "description": "Find email addresses from any website. Perfect for lead generation, sales outreach, and recruiter prospecting.",
        "version": "1.0",
        "x-build-id": "WR5yVplgyTbynqfcb"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/hermesexp~email-finder/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-hermesexp-email-finder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/hermesexp~email-finder/runs": {
            "post": {
                "operationId": "runs-sync-hermesexp-email-finder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/hermesexp~email-finder/run-sync": {
            "post": {
                "operationId": "run-sync-hermesexp-email-finder",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "domain"
                ],
                "properties": {
                    "domain": {
                        "title": "Domain",
                        "type": "string",
                        "description": "The domain to search for email addresses (e.g., example.com). Do NOT include http:// or www."
                    },
                    "firstName": {
                        "title": "First Name (optional)",
                        "type": "string",
                        "description": "First name of the person to find an email for."
                    },
                    "lastName": {
                        "title": "Last Name (optional)",
                        "type": "string",
                        "description": "Last name of the person to find an email for."
                    },
                    "crawlWebsite": {
                        "title": "Crawl Website for Emails",
                        "type": "boolean",
                        "description": "Crawl the website pages to find emails displayed on the site.",
                        "default": true
                    },
                    "tryCommonPatterns": {
                        "title": "Try Common Email Patterns",
                        "type": "boolean",
                        "description": "Try common email patterns like info@, contact@, hello@, support@.",
                        "default": true
                    },
                    "tryNamePatterns": {
                        "title": "Try Name-Based Patterns",
                        "type": "boolean",
                        "description": "If first/last name is provided, try patterns like first@, first.last@, firstlast@.",
                        "default": true
                    },
                    "checkMxRecords": {
                        "title": "Check MX Records",
                        "type": "boolean",
                        "description": "Check if the domain has valid MX records for email delivery.",
                        "default": true
                    },
                    "maxCrawlPages": {
                        "title": "Max Pages to Crawl",
                        "minimum": 1,
                        "maximum": 50,
                        "type": "integer",
                        "description": "Maximum number of pages to crawl on the website.",
                        "default": 10
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
