# Contact Details Scraper - Emails, Phone Numbers & Social Links (`anticipatory_pipefish/contact-details-extractor`) Actor

Give it website URLs, get back every email address, validated phone number and social-media profile on each site, merged and de-duplicated per domain. Crawls contact and about pages first.

- **URL**: https://apify.com/anticipatory_pipefish/contact-details-extractor.md
- **Developed by:** [Pipefish Data](https://apify.com/anticipatory_pipefish) (community)
- **Categories:** Lead generation, Business, Automation
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 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/actors/running/actors-in-store.md#pay-per-usage

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

## Contact Details Extractor

Give it a list of websites. Get back every email address, every valid phone number and every social-media profile on each site, merged into one clean row per domain.

It crawls contact, about, team and support pages first, so even a 10-page budget reaches the pages where contacts actually live. Phone numbers are validated with Google's libphonenumber and returned in E.164, so `+44 (0) 161 275 5000`, `0161 275 5000` and `+441612755000` collapse into one number. Social links are canonicalised, so `twitter.com/apify`, `www.twitter.com/apify` and `x.com/apify` become one profile.

### What you get

One row per website (default) with:

| Field | Example |
|---|---|
| `domain` | `manchester.ac.uk` |
| `emails` | `["international@manchester.ac.uk", "ssc@manchester.ac.uk"]` |
| `emailSources` | `{"ssc@manchester.ac.uk": "https://www.manchester.ac.uk/study/undergraduate/student-support"}` |
| `emailsDeliverableDomain`, `emailsDeadDomain` | the same emails split by whether their domain has a mail server, so dead addresses never reach your outreach list |
| `phones` | `[{"e164": "+441612755000", "international": "+44 161 275 5000", "raw": "+44 (0) 161 275 5000", "region": "GB"}]` |
| `socials` | `{"linkedin": ["https://linkedin.com/school/university-of-manchester"], "facebook": [...], "instagram": [...], "tiktok": [...]}` |
| `socialProfileCount` | `4` |
| `contactPages` | the pages where at least one contact detail was found |
| `pagesCrawled` | `8` |
| `hasContacts` | `true` |

Switch `outputMode` to `perPage` to get one row per crawled page instead.

Social networks covered: LinkedIn, X (Twitter), Facebook, Instagram, YouTube, TikTok, GitHub, Pinterest, Telegram, WhatsApp, Discord, Threads. Share buttons, login pages and intent links are filtered out.

### Typical uses

- Build a lead list from a list of company websites, with the right email and a dialable phone number on each row.
- Enrich a CRM export: feed it the website column, get back phones and socials.
- Check which of your own sites still expose a staff email or an old phone number.
- Find the LinkedIn and Instagram pages of a batch of restaurants, clinics or agencies.

### Input

| Field | Default | What it does |
|---|---|---|
| `startUrls` | required | The websites to scan. One per site is enough; the crawler finds the rest. |
| `maxPagesPerDomain` | 20 | Page budget per site. This is also your cost cap per site. |
| `maxDepth` | 2 | How many clicks away from the start URL to follow. |
| `sameDomainOnly` | true | Stay on the same domain and its subdomains. |
| `prioritizeContactPages` | true | Crawl contact, about, team, impressum and support links before anything else. |
| `outputMode` | perDomain | `perDomain` merges and de-duplicates; `perPage` keeps every page separate. |
| `defaultPhoneRegion` | US | Country used to read local numbers written without `+`. Numbers with `+` are detected regardless. |
| `onlyDomainEmails` | false | Drop emails whose domain is not the site's own. |
| `includeSocials` | true | Collect social-media profile links. |
| `proxyConfiguration` | none | Apify Proxy or your own proxies, for sites that block datacenter IPs. |

Example input:

```json
{
  "startUrls": [{ "url": "https://apify.com" }, { "url": "manchester.ac.uk" }],
  "maxPagesPerDomain": 10,
  "maxDepth": 1,
  "defaultPhoneRegion": "GB"
}
```

### Pricing

You pay per page scraped, nothing else. Your maximum cost per run is websites x `maxPagesPerDomain` x the per-page price, so a 10-page scan of 100 websites is at most 1,000 pages. There are no extra charges for the number of contacts found, for the email-domain check, or for pages that fail to load. 5 to 10 pages is enough for most small-business sites because contact pages are crawled first.

### How it works

1. Each start URL is fetched with a fast HTTP client (no browser), so a page takes well under a second.
2. Links are collected and sorted: anything that looks like a contact, about, team, impressum, support or legal page goes to the front of the queue.
3. On every page the text and the `mailto:` and `tel:` links are scanned. Obfuscated addresses like `name [at] domain [dot] com` are decoded. Image filenames, tracking addresses and placeholder domains such as `example.com` are discarded.
4. Phone candidates go through libphonenumber. Only numbers that are valid for their country are kept, and each is returned once in E.164 form.
5. Everything is merged per domain and written once at the end. If you abort a run, the partial results are saved first.

### Limitations

- Pages that render their content only with JavaScript are read as the server returns them. Most contact pages work; single-page apps may not. Ask for a browser mode if you need it.
- The extractor reads what is on the page. It does not guess emails from name patterns and it does not verify that a mailbox exists.
- Sites behind aggressive bot protection may need `proxyConfiguration` with residential proxies.
- You are responsible for complying with the privacy law that applies to the data you collect.

### Support

Open an issue on the Actor's Issues tab. Report the start URL and what you expected to find; a fix for a missed pattern usually ships within a few days.

# Actor input Schema

## `startUrls` (type: `array`):

One or more website URLs. The crawler starts on each URL, follows internal links (contact and about pages first) and collects every email address, phone number and social-media profile it finds.

## `maxPagesPerDomain` (type: `integer`):

Hard cap per website. You are charged per page scraped, so your maximum cost per run is (websites x this number x the per-page price), never more. 5 to 10 pages is enough for most small-business sites because contact pages are crawled first.

## `maxDepth` (type: `integer`):

How many clicks away from the start URL to follow. 0 scans only the start page, 1 adds the pages it links to, 2 adds their links too.

## `sameDomainOnly` (type: `boolean`):

Only follow links on the same domain (including subdomains) as the start URL.

## `prioritizeContactPages` (type: `boolean`):

Links whose URL or text contains words like contact, about, team, impressum or support are crawled before other pages, so small page budgets still reach the pages that matter.

## `outputMode` (type: `string`):

perDomain gives one row per website with all contacts merged and de-duplicated. perPage gives one row per crawled page.

## `defaultPhoneRegion` (type: `string`):

Two-letter country code used to interpret phone numbers written without an international prefix (for example 020 7946 0000). Numbers with a + prefix are detected regardless. Only numbers that are valid for their country are returned.

## `checkEmailDomains` (type: `boolean`):

After the crawl, each email domain is checked for MX (or A) records. Emails are split into emailsDeliverableDomain and emailsDeadDomain so dead addresses never reach your outreach list. No extra charge.

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

Drop email addresses whose domain differs from the website being scanned (third-party vendors, examples quoted in blog posts, partner contacts). Off by default so you see everything.

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

Collect LinkedIn, X/Twitter, Facebook, Instagram, YouTube, TikTok, GitHub, Pinterest, Telegram, WhatsApp, Discord and Threads profile links. Share and login links are filtered out.

## `proxyConfiguration` (type: `object`):

Optional. Use Apify Proxy or your own proxies for sites that block datacenter traffic.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://www.manchester.ac.uk/"
    }
  ],
  "maxPagesPerDomain": 20,
  "maxDepth": 2,
  "sameDomainOnly": true,
  "prioritizeContactPages": true,
  "outputMode": "perDomain",
  "defaultPhoneRegion": "US",
  "checkEmailDomains": true,
  "onlyDomainEmails": false,
  "includeSocials": true,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

No description

## `datasetUi` (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 = {
    "startUrls": [
        {
            "url": "https://apify.com"
        },
        {
            "url": "https://www.manchester.ac.uk/"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("anticipatory_pipefish/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 = {
    "startUrls": [
        { "url": "https://apify.com" },
        { "url": "https://www.manchester.ac.uk/" },
    ],
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("anticipatory_pipefish/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 '{
  "startUrls": [
    {
      "url": "https://apify.com"
    },
    {
      "url": "https://www.manchester.ac.uk/"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call anticipatory_pipefish/contact-details-extractor --silent --output-dataset

```

## MCP server setup

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