# Website Contact Details Scraper: Emails, Phones & Socials (`spellzcode/website-contact-extractor`) Actor

Get the public emails, phone numbers and social profiles from any list of company websites. Emails are checked against the domain's mail server. You pay only for websites where contacts were found.

- **URL**: https://apify.com/spellzcode/website-contact-extractor.md
- **Developed by:** [Mårten Fitzback](https://apify.com/spellzcode) (community)
- **Categories:** Lead generation, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.80 / 1,000 website with contacts

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/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

## Website Contact Details Scraper: Emails, Phones & Socials

Paste a list of company websites and get back the contact details each one publishes: emails, phone numbers, social profiles, postal address and the contact page they came from.

**You pay only for websites where contacts were found.** Websites that are down, block the request or list no contacts are returned with a status and cost nothing.

### What you get for each website

| Field | What it is |
|---|---|
| `primaryEmail` | The best address to write to: the site's own domain first, general inboxes such as `info@` and `contact@` before departments and people |
| `emails` | Every address found, each with its type (`role`, `person` or `other`), whether it is on the website's own domain, the page it was found on, and whether its domain has a mail server |
| `phones` | Numbers from click-to-call links and the site's structured data, de-duplicated |
| `socials` | LinkedIn, Facebook, Instagram, X, YouTube, TikTok, GitHub and WhatsApp links |
| `companyName`, `address` | From the site's structured data, when it has any |
| `contactPageUrl` | The first inner page where contacts were found |
| `status` | `ok`, `no-contacts-found`, `unreachable` or `invalid-input` |

### What it handles that simple scrapers miss

- **Protected emails.** Addresses hidden by Cloudflare's email protection are decoded, and `name [at] company [dot] com` spellings are read.
- **Junk filtering.** Image names like `logo@2x.png`, error-tracking addresses, and placeholders such as `you@example.com` or `firstname.lastname@` are left out.
- **Dead domains.** Each email's domain is checked for a mail server. Addresses at domains that cannot receive mail are dropped.
- **The right pages.** Besides the home page it opens the pages most likely to list contacts: Contact, About, Team, Imprint and their equivalents in German, French, Spanish, Italian, Portuguese and the Nordic languages.

### Input

```json
{
  "websites": ["apify.com", "https://letsencrypt.org"],
  "maxPagesPerSite": 5,
  "verifyEmails": true,
  "onlyDomainEmails": false
}
```

Turn on `onlyDomainEmails` to skip addresses at other domains, such as a web agency's email in the footer.

### Output example

```json
{
  "website": "https://internetstiftelsen.se/",
  "domain": "internetstiftelsen.se",
  "companyName": "Internetstiftelsen",
  "status": "ok",
  "primaryEmail": "info@internetstiftelsen.se",
  "emails": [
    { "email": "info@internetstiftelsen.se", "type": "role", "sameDomain": true, "mailServerFound": true, "sourceUrl": "https://internetstiftelsen.se/" }
  ],
  "phones": ["+4684523500"],
  "socials": { "linkedin": "https://www.linkedin.com/company/internetstiftelsen" },
  "contactPageUrl": "https://internetstiftelsen.se/kontakta-din-kundtjanst/",
  "pagesChecked": ["https://internetstiftelsen.se/"]
}
```

### Pricing

$4.00 per 1,000 websites where contacts were found ($0.004 each). One charge per website where at least one email or phone number was found. Nothing for websites without results.

A list of 500 company websites, of which 350 publish contacts, costs $1.40. 10,000 websites with a 70% hit rate cost $28.

Each run also has a start charge of $0.00005. There is no separate charge for computing time. Apify's paid plans get 10% to 30% off these prices; the Pricing tab shows yours. Apify's free plan includes $5 of credit a month, which covers 1,250 websites with contacts.

### Limits

- It reads the HTML a website serves. Contacts that only appear after JavaScript runs in a browser can be missed.
- Some large brands refuse automated requests. Those websites come back as `unreachable` and are not charged. Small and mid-sized company websites, the usual lead lists, rarely do this.
- The mail-server check confirms the domain accepts mail. It does not confirm that a particular mailbox exists.
- It opens at most 20 pages per website and respects `robots.txt` unless you switch that off.

### Responsible use

This tool collects contact details that organizations publish on their own websites. Emails of named people are personal data in many countries. Make sure your use, especially any outreach, follows the laws that apply to you, such as GDPR and CAN-SPAM.

### Questions

#### Can I run it on a schedule?

Yes. Save your input as a task and add an Apify schedule, for example every morning.

#### How do I get the results into Excel or Google Sheets?

Every run's results can be downloaded as Excel, CSV or JSON from the run's Output tab. Apify's integrations with Make, Zapier, n8n and Google Sheets can pass them on automatically.

#### Can I call it from my own code or from an AI agent?

Yes. The API tab has ready-made code for Python, JavaScript and cURL, and the tool can be connected to AI agents through Apify's MCP server.

#### Something looks wrong or is missing

Open a report under the Issues tab and include the input you used.

# Actor input Schema

## `websites` (type: `array`):

Company websites to check, one per line. A domain such as example.com or a full address such as https://example.com both work.

## `maxPagesPerSite` (type: `integer`):

The home page is always checked. The rest are the pages most likely to list contacts, such as Contact, About, Team and Imprint.

## `verifyEmails` (type: `boolean`):

Looks up the mail server of every email's domain and drops addresses at domains that have none. It does not contact the mailbox itself.

## `onlyDomainEmails` (type: `boolean`):

Skip addresses at other domains, such as a web agency's email in the footer or a Gmail address.

## `includePhones` (type: `boolean`):

Phone numbers come from click-to-call links and the site's structured data, so they are the numbers the company chose to publish.

## `includeSocials` (type: `boolean`):

LinkedIn, Facebook, Instagram, X, YouTube, TikTok, GitHub and WhatsApp links found on the site.

## `respectRobotsTxt` (type: `boolean`):

Skip inner pages the website asks crawlers not to open.

## `maxConcurrency` (type: `integer`):

Higher is faster. Each website is still opened one page at a time.

## Actor input object example

```json
{
  "websites": [
    "apify.com",
    "letsencrypt.org"
  ],
  "maxPagesPerSite": 5,
  "verifyEmails": true,
  "onlyDomainEmails": false,
  "includePhones": true,
  "includeSocials": true,
  "respectRobotsTxt": true,
  "maxConcurrency": 10
}
```

# Actor output Schema

## `contacts` (type: `string`):

One item per website: status, best email, all emails with type and mail-server check, phone numbers, social profiles, address and contact page.

# 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 = {
    "websites": [
        "apify.com",
        "letsencrypt.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("spellzcode/website-contact-extractor").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 = { "websites": [
        "apify.com",
        "letsencrypt.org",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("spellzcode/website-contact-extractor").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 '{
  "websites": [
    "apify.com",
    "letsencrypt.org"
  ]
}' |
apify call spellzcode/website-contact-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,spellzcode/website-contact-extractor"
        }
    }
}
```

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/VwEpMgmaBO9DhHfjP/builds/3nxPgGFxPJWECtf7o/openapi.json
