# Website Contact Details Extractor - Emails & Phones (`cuantic_data/website-contact-details-extractor`) Actor

Extract public business emails, phone numbers and social profile links (LinkedIn, X/Twitter, Facebook, Instagram, YouTube) from up to 500 websites. Follows each site's contact, about and imprint pages, respects robots.txt, and needs no browser, proxy or login.

- **URL**: https://apify.com/cuantic_data/website-contact-details-extractor.md
- **Developed by:** [Cuantic Data](https://apify.com/cuantic_data) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 site 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.

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

Get the public contact details of a list of websites in one run. Paste up to 500 website URLs and get one dataset row per site with its **email addresses**, **phone numbers**, **social profile links** (LinkedIn, X/Twitter, Facebook, Instagram, YouTube), the URL of its **contact page** and the pages where each piece of data was found. A summary record totals the run.

It is a lightweight **contact scraper** for company websites: plain HTTP requests, no browser, no proxy, no login, and it reads **robots.txt** before requesting any page.

> **Personal data notice.** The actor returns what each site publishes on its own pages. That can include e-mail addresses that contain a person's name (for example `firstname.lastname@company.com`) and phone numbers of individuals, which count as personal data under the law that applies to you (for example the GDPR in the EU/EEA and the UK GDPR). The actor does not tell personal from role-based addresses, does not look anything up in third-party sources and does not verify addresses. If you use the results to contact people, you are responsible for having a lawful basis, for complying with e-mail marketing and anti-spam rules (for example ePrivacy, CAN-SPAM, national do-not-call registries) and for honoring opt-out requests. See [TERMS.md](./TERMS.md).

### What it does

- Fetches the starting page of each site and follows links to the **contact**, **imprint** (`/impressum`) and **about** pages of the same site. A page qualifies only when the keyword is the last segment of its path: `/impressum` or `/en/contact-us/` are followed, but `/impressum/author-123` or `/about/team/jane-doe` (pages about individual people) are not. If the site does not link them, it tries the well-known paths `/contact`, `/about` and `/impressum`. The number of pages per site is capped by `maxPagesPerSite`.
- Finds e-mail addresses in `mailto:` links, in visible text, in JSON-LD (`email`) and in Cloudflare-protected `data-cfemail` markup.
- Finds phone numbers in `tel:` links, in JSON-LD (`telephone`) and in visible text. Numbers in text are accepted only when they look like phone numbers (international `+` format, a national format with a leading `0`, a parenthesized area code, or the US `555-555-5555` layout), which keeps most dates, ids and prices from being mistaken for phones (see Limitations for the residual risk).
- Finds the first profile link per platform for LinkedIn, X/Twitter, Facebook, Instagram and YouTube. Share buttons, posts, videos and embeds are ignored. LinkedIn links to company, school, showcase **and personal (`/in/`) profiles** are all accepted, so a site that links a person's profile will return it.
- Removes duplicates across all pages of a site.
- Drops junk e-mails and addresses of unrelated third parties (see [Email filtering](#email-filtering)).
- Respects `robots.txt` (RFC 9309) by default.
- Isolates failures: a site that times out, returns an error, is not HTML or is blocked gets a row with a `status` and an `error` message, and the run continues.
- Writes a run summary to the key-value store record `OUTPUT`.

### Who it is for

- **Site owners, agencies and consultants** auditing which contact details a site (their own or a client's) actually publishes, and checking that the contact page and legal notice (imprint / `/impressum`) are complete and consistent.
- **Teams managing a portfolio of sites** (brands, franchises, local branches) that need to verify, across hundreds of domains, that the published e-mail, phone and social profiles are the intended ones.
- **Procurement and compliance teams** doing due diligence on suppliers or partners: confirming that a company's own website lists a contact page, a registered contact address and official social profiles.
- **Directory maintainers** keeping the contact page URL and official profile links of listed organizations up to date.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `urls` | array of strings | required | Websites to process (http/https), max 500. Deduplicated, order kept. Each URL is the starting page of one site. |
| `maxPagesPerSite` | integer | `5` | Maximum pages fetched per site, start page included, 1 to 10. |
| `respectRobots` | boolean | `true` | Fetch and obey each site's `robots.txt`. |
| `maxConcurrency` | integer | `4` | Sites processed in parallel, 1 to 10. Pages of one site are fetched one after another. |
| `timeoutMs` | integer | `20000` | Timeout per request including redirects, 5000 to 60000 ms. |

Example input:

```json
{
    "urls": ["https://www.example-company.com/", "https://www.example-agency.de/"],
    "maxPagesPerSite": 5,
    "respectRobots": true
}
```

### Output

One dataset item per site:

```json
{
    "url": "https://www.example-company.com/",
    "finalUrl": "https://www.example-company.com/",
    "status": "ok",
    "emails": ["hello@example-company.com", "press@example-company.com"],
    "phones": ["+49 30 1234567"],
    "socialLinks": {
        "linkedin": "https://www.linkedin.com/company/example-company",
        "twitter": null,
        "facebook": "https://www.facebook.com/examplecompany",
        "instagram": null,
        "youtube": "https://www.youtube.com/@ExampleCompany"
    },
    "contactPageUrl": "https://www.example-company.com/contact",
    "sourceUrls": ["https://www.example-company.com/", "https://www.example-company.com/contact"],
    "pagesFetched": 4,
    "robotsBlockedPages": 0,
    "thirdPartyEmailsSkipped": 0,
    "error": null
}
```

- `status` is one of `ok` (at least one e-mail, phone number or social link found), `no-data` (pages read, nothing found), `blocked-by-robots` (robots.txt disallows the starting page, or answered with a server error), `unreachable` (the host could not be reached: DNS failure, connection error, timeout, or the target was refused by the safety policy because it is a private or local address) or `error` (the starting page answered with an HTTP error or was not HTML; see `error`).
- `emails` lists addresses on the site's own domain first, then webmail addresses (Gmail, Outlook and similar) and addresses on a domain with the same brand name. At most 25 e-mails and 15 phone numbers are kept per site.
- `phones` are returned as written on the site, with spacing normalized. They are not converted to E.164 because a number without a country code cannot be converted reliably.
- `socialLinks` always has the five keys; a platform with no profile link is `null`.
- `contactPageUrl` is the site's contact page, or `null`. It is also set when the contact page was found as a link but not read (robots.txt disallowed it, or the page limit was reached).
- `sourceUrls` lists the pages on which at least one data point was found.
- `finalUrl`, `contactPageUrl` and `error` can be `null`.

Run summary in the key-value store record `OUTPUT`:

```json
{
    "total": 120,
    "withData": 97,
    "noData": 12,
    "blockedByRobots": 4,
    "unreachable": 3,
    "failed": 4,
    "skipped": 0,
    "chargeLimitReached": false,
    "respectRobots": true,
    "maxPagesPerSite": 5,
    "pagesFetched": 402,
    "robotsBlockedPages": 9,
    "emailsFound": 214,
    "thirdPartyEmailsSkipped": 18,
    "phonesFound": 131,
    "contactPagesFound": 88,
    "sitesWithSocialLink": { "linkedin": 71, "twitter": 40, "facebook": 66, "instagram": 52, "youtube": 23 },
    "failedUrls": [{ "url": "https://www.gone-example.com/", "status": "error", "error": "HTTP 404 for https://www.gone-example.com/" }],
    "skippedUrls": [],
    "note": "Contact details are read from the HTML each site serves publicly (no JavaScript rendering, no third-party enrichment). ..."
}
```

### Email filtering

An address is dropped when it is clearly not a contact address:

- **Image and asset file names** that look like addresses, such as `logo@2x.png`, `hero@3x.jpg`, `sprite@2x.webp` (the "domain" ends in a file extension: images, CSS, JS, fonts, video, PDF and similar).
- **Placeholder and example addresses**: `example.com`, `example.org`, `example.net` (and subdomains), `domain.com`, `yourdomain.com`, `email.com`, `test.com` and similar template domains, reserved TLDs such as `.invalid`, `.test`, `.example`, `.localhost`, and template names such as `name@...` or `your-email@...`.
- **Error-tracking and site-builder addresses**: `sentry.io`, `wixpress.com`, `wix.com`, `bugsnag.com`, `rollbar.com` and similar, and long hexadecimal local parts generated by tools.
- **No-reply addresses**: `noreply@`, `no-reply@`, `donotreply@`, `mailer-daemon@`, `postmaster@`.
- **Addresses of unrelated third parties.** An address is kept when it is on the site's own domain (or a sub/parent domain), on a free webmail provider (many small businesses publish a Gmail or Outlook address as their contact), or on a domain with the same brand name (`acme.de` on `acme.com`). Any other address found on the pages (a supplier, hosting provider or partner named in an imprint) is skipped and counted in `thirdPartyEmailsSkipped`. The trade-off: a real contact on an unrelated domain, such as an ISP address (`bell.net`) or a parent company with a different name, is skipped too.

Only visible text, links, JSON-LD and Cloudflare-protected markup are scanned; scripts, styles and image attributes are not.

### Safety and politeness

- Only the URLs you supply, and links to contact, about and imprint pages **on the same site** (`www.` ignored), are fetched. Other links are never followed.
- With `respectRobots` on, `/robots.txt` is read for each site before any page and the rules for the `CuanticDataBot` user agent (or `*`) are applied as in RFC 9309: longest match wins, `*` and `$` wildcards, a missing robots.txt (HTTP 4xx) means everything is allowed, and a robots.txt that cannot be reached (HTTP 5xx, 408, 429 or network error) means the site is skipped. A redirect to another host is checked against that host's robots.txt.
- Targets are checked before every request and every redirect: only `http` and `https`; no embedded credentials; no `localhost`, `.local`, `.internal` or single-label hostnames; no private, loopback, link-local, carrier-grade NAT, documentation, multicast or otherwise reserved IPv4/IPv6 addresses, including hostnames that resolve to one. The address is checked again when the connection is opened.
- Limits: 5 redirects, 2 MB per page (after decompression), 500 sites, at most 10 pages per site, the configured timeout, one retry for network errors, timeouts, 408, 429 and 5xx.
- Requests identify as `Mozilla/5.0 (compatible; CuanticDataBot/1.0)`. No proxy is used, no cookies are sent and no login is attempted.

### Limitations

- **No JavaScript.** Only the HTML the server returns is read. Details injected by client-side scripts, contact widgets and forms are missed, and a site can show up as `no-data`.
- **Addresses are not verified.** The actor does not check that an address exists or accepts mail, or that a number is reachable.
- **Text obfuscation is not decoded** (for example `info [at] example [dot] com`, or addresses drawn as images). Cloudflare email protection is decoded.
- **Phone numbers in text can still be wrong.** Numbers written with a `00` prefix must carry a plausible country code and length, which removes ids like `0012-3456-7890` or `001-234-5678`, but ids, order numbers or SKUs that are formatted like a phone number (for example `0123 456789`, or `555-123-4567`) can still be returned.
- **Phone numbers in text are conservative.** National numbers without a leading `0`, a parenthesized area code or a `+` country code are not picked up from plain text (they are picked up from `tel:` links and JSON-LD). This favors precision over recall.
- **One social link per platform**: the first profile link found. A site with several accounts on one platform returns the first.
- **Sites behind a login, bot protection or a consent wall** usually return that wall instead of the page.
- **Max 500 sites per run.** Extra URLs are dropped with a warning. Split larger lists across runs.

### Pricing

Pay-per-event: one `site-with-contacts` event for each site where at least one data point (an e-mail, a phone number or a social profile link) was found. A site is charged even if the only thing found is a single social profile link (no e-mail or phone). Sites with no data, sites blocked by robots.txt, unreachable sites and sites that fail are not charged. See the Pricing tab for the current price per event. Apify platform usage is billed separately according to your plan.

If the maximum charge you set for a run is reached, the actor finishes the sites in progress, starts no new ones, and lists the URLs it did not start in `OUTPUT.skippedUrls`.

### Development

```bash
npm install
npm test          # unit tests (node:test, mocked network, no internet needed)
npm run smoke     # optional: one real run on https://www.iana.org/ (or SMOKE_URL); prints SKIPPED without egress
```

### Support

Cuantic Data - cuanticwindows@gmail.com

Terms of use: see [TERMS.md](./TERMS.md).

# Actor input Schema

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

Websites to extract contact details from (http or https), max 500 per run. Each URL is the starting page of one site; the actor then follows that site's contact, about and imprint pages. Duplicates are removed and order is kept.

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

Upper limit of pages fetched per site, including the starting page. After the starting page the actor follows links to contact, about and imprint pages (/contact, /about, /impressum and common translations) and tries those well-known paths when the site does not link them.

## `respectRobots` (type: `boolean`):

Fetch and obey each site's robots.txt (RFC 9309) before requesting any page. Pages it disallows are skipped; a site whose robots.txt cannot be reached because of a server or network error is skipped entirely. Switch off only for sites you own or have permission to access.

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

Sites processed in parallel. Pages of one site are always fetched one after another.

## `timeoutMs` (type: `integer`):

Maximum time for one page request, including redirects. A page that takes longer is skipped and the run continues.

## Actor input object example

```json
{
  "urls": [
    "https://www.iana.org/",
    "https://www.wikimedia.org/"
  ],
  "maxPagesPerSite": 5,
  "respectRobots": true,
  "maxConcurrency": 4,
  "timeoutMs": 20000
}
```

# Actor output Schema

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

No description

## `summary` (type: `string`):

No description

# 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": [
        "https://www.iana.org/",
        "https://www.wikimedia.org/"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("cuantic_data/website-contact-details-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": [
        "https://www.iana.org/",
        "https://www.wikimedia.org/",
    ] }

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

```

## MCP server setup

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