# Company Contacts Finder: Verified Emails (`vhsgreed/company-contacts-fresh`) Actor

Turn company names or domains into verified contact emails. Finds each company's official website, crawls the homepage and common contact pages, then DNS-verifies every address with MX checks.

- **URL**: https://apify.com/vhsgreed/company-contacts-fresh.md
- **Developed by:** [Karl Sundström](https://apify.com/vhsgreed) (community)
- **Categories:** Lead generation, Business
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

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

## Company Contacts Finder

Apify actor (user **vhsgreed**) that turns a list of company names and/or
website domains into DNS-verified contact emails.

### How it works

1. For each input entry: entries containing a dot are treated as website
   domains; otherwise the official site is resolved with a **DuckDuckGo HTML
   search** (`html.duckduckgo.com/html/?q=`) — first external result host.
   No `.com` fallback guessing is used.
2. Fetches the homepage plus common contact paths: `/contact`, `/contact-us`,
   `/about`, `/impressum`, `/kontakt` (capped by `maxPagesPerCompany`, max 8).
3. Extracts emails from `mailto:` links and page text, including obfuscated
   forms like `name(at)domain.com`, `name [at] domain [dot] com`.
4. Verifies each unique email domain with an **MX lookup** via the Google DNS
   JSON API (`https://dns.google/resolve?name=<domain>&type=MX`). Emails whose
   domain has no MX record are dropped.
5. Flags freemail (gmail.com, hotmail.com, seznam.cz, …) and disposable
   (mailinator.com, 10minutemail.com, …) domains. Deduplicates per company.
6. Charges `actor-start` ($0.05) once per run and `contact-found`
   ($0.00125) per unique MX-valid email emitted. Max total charge $5/run.

### Input

```json
{
  "companies": ["alza.sk", "Mozilla Corporation"],
  "maxPagesPerCompany": 5
}
```

### Output item

```json
{
  "companyName": "Alza",
  "domain": "alza.cz",
  "emails": [
    {"email": "info@alza.cz", "mxValid": true, "isFreemail": false,
     "isDisposable": false, "sourcePageUrl": "https://www.alza.cz/kontakt"}
  ],
  "sourceUrls": ["https://www.alza.cz", "..."],
  "fetchedAt": "2026-09-25T12:00:00+00:00"
}
```

### Verification (live sources, 2026-09-25)

- DuckDuckGo HTML search resolved `alza.cz` for "Alza official website
  contact" and correctly picked external hosts (no duckduckgo/ads links).
- Email extraction returned real emails from mozilla.org contact/about pages
  (`trademark-permissions@mozilla.com`, `legal-notices@mozilla.com`).
- MX lookups confirmed live records for mozilla.com/mozilla.org (Google
  Workspace MX) and correctly returned no MX for a nonexistent domain.
- Obfuscation parsing verified on synthetic HTML.

### Known limitations (honest notes)

- Some large sites (e.g. alza.cz) block plain HTTP clients with 403/WAF
  (Cloudflare-style); no proxies or browsers are used, so emails from such
  sites cannot be extracted — the company is still emitted with an empty
  email list.
- Many sites render emails as images or via JS forms; nothing is found there.
- Site resolution from a company name is heuristic (first DDG external
  result) and can occasionally pick a different site than expected.
- Polite pacing: 0.5 s between requests, 20 s timeout per page.

### Requirements

Python httpx + Apify SDK only. No browser, no proxies.

# Actor input Schema

## `companies` (type: `array`):

List of company names and/or website domains (e.g. 'alza.sk' or 'Alza'). Items containing dots are treated as domains; otherwise the official site is resolved via DuckDuckGo search.

## `maxPagesPerCompany` (type: `integer`):

Cap on pages fetched per company (default 5, max 8): homepage + common contact paths.

## Actor input object example

```json
{
  "maxPagesPerCompany": 5
}
```

# Actor output Schema

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

Dataset of companies with verified emails. Fields: companyName, domain, emails\[] (email, mxValid, isFreemail, isDisposable, sourcePageUrl), sourceUrls, fetchedAt.

## `resultsJson` (type: `string`):

Full dataset items as raw JSON.

## `runStats` (type: `string`):

Key-value store entry OUTPUT\_STATS: companies processed, emails found, verified count.

## `runView` (type: `string`):

Inspect this run, its logs and storages in Apify Console.

# 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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("vhsgreed/company-contacts-fresh").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 = {}

# Run the Actor and wait for it to finish
run = client.actor("vhsgreed/company-contacts-fresh").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 '{}' |
apify call vhsgreed/company-contacts-fresh --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,vhsgreed/company-contacts-fresh"
        }
    }
}
```

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/VuSy4MWodme515KfJ/builds/DT0r1bg7nIJcmfb7e/openapi.json
