# Website Contact Extractor - Emails, Phones & Social Links (`optimistical_lectern/website-contact-extractor`) Actor

Give it a list of websites or domains and get back the emails, phone numbers and social profiles published on each one. Reads the home page plus the contact, about and imprint pages. Decodes Cloudflare-protected and obfuscated emails. You pay only for sites that were read successfully.

- **URL**: https://apify.com/optimistical_lectern/website-contact-extractor.md
- **Developed by:** [Ivan Honer](https://apify.com/optimistical_lectern) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 websites

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 Extractor: Emails, Phones & Social Links

Give it a list of websites and get back the **emails, phone numbers and social profiles** each one publishes, plus the company name and address when the site declares them. One clean row per site, ready for a CRM, a spreadsheet or an enrichment step.

- ✅ **Finds the contact pages for you**: home, contact, about, team and imprint pages, in English, German, French, Spanish, Italian and Portuguese
- ✅ **Gets the emails other tools miss**: `mailto:` links, visible text, structured data, Cloudflare-protected addresses and `name [at] company [dot] com` obfuscations
- ✅ **Filters out junk** such as image file names, tracking hashes and placeholder addresses
- ✅ **Phone numbers validated** and returned in international format
- ✅ **Pay only for sites that were read**: unreachable sites, robots.txt blocks and bad inputs are free

### What does Website Contact Extractor do?

For every website or domain in your list it:

1. Loads the home page (trying `https://` first, then `http://` for bare domains).
2. Ranks the links on it by how likely they are to hold contact details, and reads the best ones up to your page limit.
3. Collects every email, phone number and social profile on those pages.
4. Puts the site's own-domain addresses first, with role addresses like `info@` and `sales@` at the top.
5. Returns one row with everything it found, plus the company name and postal address when the site publishes structured data.

### Use cases

- 🎯 **Lead generation.** Turn a list of company websites into contactable leads.
- 🧹 **CRM enrichment.** Fill in missing emails, phones and LinkedIn pages for accounts you already have.
- 🏪 **Local business outreach.** Pair it with a maps or directory scraper to add contact details to every business found.
- 🤝 **Partner and supplier research.** Collect who to talk to at a list of vendors.
- 🤖 **AI agents.** A single structured answer to "how do I contact this company?"

### What data can you get?

| Field | What it is |
|---|---|
| `domain`, `url` | The site, and the final URL after redirects |
| `emails` | All addresses found, own-domain and role addresses first |
| `phones` | Validated phone numbers in international format where possible |
| `socials` | LinkedIn, Facebook, Instagram, X, YouTube, TikTok, GitHub and Pinterest profile links. Share buttons are ignored |
| `companyName`, `address` | From the site's structured data, when published |
| `title` | The site's name or page title |
| `pagesCrawled` | How many pages were read |
| `pages` | The exact URLs read (switch on **Include the list of pages read**) |
| `status`, `error` | See [Statuses and errors](#statuses-and-errors) |

### How to use it

1. Click **Try for free** (or **Start**) at the top of this page.
2. Paste the websites into **Websites or domains**, one per line. `acme.com` and `https://www.acme.com/` both work.
3. Optionally raise **Pages per site** (default 5) to dig deeper, or set **Default country** (e.g. `US`) so local phone numbers without a country code are recognised.
4. Press **Start**.
5. Download the results from the **Output** tab as Excel, CSV or JSON, or send them on with an integration.

### Input examples

**A quick list of company sites.**

```json
{
  "urls": ["stripe.com", "https://www.cloudflare.com", "basecamp.com"]
}
```

**Local businesses with phone numbers written the local way.**

```json
{
  "urls": ["joes-plumbing-austin.com", "bestdentalcare-tx.com"],
  "defaultCountry": "US",
  "maxPagesPerSite": 8
}
```

**A large list, with the pages read included for auditing.**

```json
{
  "urls": ["... thousands of domains ..."],
  "maxPagesPerSite": 4,
  "includePageList": true,
  "maxConcurrency": 30
}
```

### Output example

```json
{
  "input": "https://www.python.org",
  "domain": "python.org",
  "url": "https://www.python.org/",
  "status": "ok",
  "title": "Python.org",
  "companyName": null,
  "address": null,
  "emails": ["psf@python.org", "python-announce@python.org", "webmaster@python.org"],
  "phones": [],
  "socials": {
    "linkedin": "https://www.linkedin.com/company/python-software-foundation",
    "x": "https://twitter.com/ThePSF",
    "github": "https://github.com/python"
  },
  "pagesCrawled": 4
}
```

### Statuses and errors

Every input gets a row, so the output always lines up with your list.

| `status` | Meaning | Charged? |
|---|---|---|
| `ok` | The site was read. `emails`, `phones` and `socials` may still be empty if the site publishes none | Yes |
| `unreachable` | The site could not be read. `error` says why: `timeout`, `ENOTFOUND` (the domain does not exist), `HTTP 403`, `HTTP 404` and so on | No |
| `blocked_by_robots` | The site's robots.txt disallows crawling, and **Respect robots.txt** is on | No |
| `invalid_input` | Not a website or domain | No |

### How much does it cost?

You pay per site read. Sites that fail are free, and platform usage is included.

| Sites | Price on the Free and Bronze tiers |
|---|---|
| 100 | $0.40 |
| 1,000 | $4.00 |
| 10,000 | $40.00 |

Larger Apify plans pay less per site: 15% less on Silver, and 25% less on Gold and above.

### FAQ

#### Can I use it through the API?

Yes. For small lists, the synchronous endpoint runs the Actor and returns the results in one request:

```bash
curl -X POST "https://api.apify.com/v2/acts/optimistical_lectern~website-contact-extractor/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"urls": ["stripe.com", "basecamp.com"]}'
```

JavaScript:

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

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });
const run = await client.actor('optimistical_lectern/website-contact-extractor').call({ urls: ['stripe.com', 'basecamp.com'] });
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

Python:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("optimistical_lectern/website-contact-extractor").call(run_input={"urls": ["stripe.com", "basecamp.com"]})
items = client.dataset(run["defaultDatasetId"]).list_items().items
```

#### Can AI agents use it?

Yes. It runs with limited permissions, so it needs no approval step. Add it to Claude, Cursor or any other MCP client through Apify's MCP server at `mcp.apify.com`, using the Actor name `optimistical_lectern/website-contact-extractor`.

#### Can I chain it after another scraper?

Yes. Use **Integrations** on another Actor to start this one when it finishes, or pass a list of URLs you got elsewhere. Results can go to Google Sheets, Slack, Zapier, Make, n8n or a webhook.

#### Why did a site return no emails?

Some sites publish no email at all and use a contact form instead, and some only show contact details after JavaScript runs. This tool reads the HTML the site serves, which keeps it fast and cheap, so details added later by JavaScript can be missed. Raising **Pages per site** sometimes helps.

#### How fast is it?

It reads plain HTML without a browser, so a thousand sites usually finish in a few minutes. Raise **Sites in parallel** for very large lists.

#### Is it legal to collect contact details from websites?

The tool only reads what a business chose to publish on its own website. It does not log in, guess addresses or look people up elsewhere. Business contact details are still personal data in some places, so check the rules that apply to you, such as GDPR, CAN-SPAM or PECR, before you contact anyone.

#### Something looks wrong?

Open an issue on the **Issues** tab with a site where the result looked wrong. Every report is read.

### Related tools

- [🌐 Domain WHOIS, DNS & Email Security](https://apify.com/optimistical_lectern/domain-whois-dns-lookup): domain age, mail provider, SPF and DMARC for the same domains
- [💼 Google Jobs Scraper](https://apify.com/optimistical_lectern/google-jobs-scraper): find companies that are hiring
- [📄 PDF Text Extractor](https://apify.com/optimistical_lectern/pdf-text-extractor): text from PDF links

# Actor input Schema

## `urls` (type: `array`):

One per line. Bare domains (acme.com) and full URLs both work.

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

The home page plus the most likely contact pages (contact, about, team, imprint). More pages find more addresses and take longer.

## `defaultCountry` (type: `string`):

Two-letter country code (US, GB, DE). Used to recognise phone numbers written without a country code. Leave empty to accept international-format numbers only.

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

Skip sites and pages whose robots.txt disallows crawling.

## `includePageList` (type: `boolean`):

Adds a `pages` array with every URL that was read for each site.

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

How many sites to process at the same time.

## `timeoutSecs` (type: `integer`):

Give up on a page after this long.

## Actor input object example

```json
{
  "urls": [
    "apify.com",
    "https://www.python.org"
  ],
  "maxPagesPerSite": 5,
  "respectRobotsTxt": true,
  "includePageList": false,
  "maxConcurrency": 15,
  "timeoutSecs": 20
}
```

# Actor output Schema

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

One item per input, as listed in the README.

# 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 = {
    "urls": [
        "apify.com",
        "https://www.python.org"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("optimistical_lectern/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 = { "urls": [
        "apify.com",
        "https://www.python.org",
    ] }

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,optimistical_lectern/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/gqGBKC4vEbq12D38e/builds/XNwK2gIun6XuudNVx/openapi.json
