# Contact Details Extractor — Pay Only For Results (`resultsmith/contact-details-extractor`) Actor

Extract emails, phone numbers, and social profiles from any list of websites. Pay only for verified results: an MX-checked email, a valid phone, or live social profiles. Empty rows are always free. Polite crawling that auto-discovers contact and about pages.

- **URL**: https://apify.com/resultsmith/contact-details-extractor.md
- **Developed by:** [Resultsmith](https://apify.com/resultsmith) (community)
- **Categories:** Lead generation, E-commerce, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$6.00 / 1,000 contact row with verified data

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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Contact Details Extractor — Pay Only For Results

Give it a list of website URLs and get back clean, validated contact details:
**emails, phone numbers, and social profile links** — one row per website.

The pricing is different from every other contact scraper: **you are only
billed for rows that contain at least one verified contact field. Empty rows
are free.** If we can't find anything verifiable on a site, that result costs
you $0 — you never pay for dead URLs, parked domains, or sites that block
crawlers.

### What counts as a verified (billable) row

A row is billed only if it contains at least one of:

| Signal | Validation applied |
|---|---|
| Email address | Syntax check **and** live MX record on the domain (the domain can actually receive mail) |
| Phone number | Parses as a valid number for its region (Google's libphonenumber) |
| Social profiles | 2 or more distinct platforms (LinkedIn, X/Twitter, Facebook, Instagram, YouTube, TikTok) |

Everything else is delivered **free** — including partial data that didn't
pass validation, so you can still see what was found.

### Output

One row per input URL:

```json
{
  "url": "https://example.com",
  "emails": [{ "value": "info@example.com", "source": "contact-page", "mxValid": true }],
  "phones": [{ "value": "+14155551234", "formatted": "(415) 555-1234", "valid": true }],
  "socials": {
    "linkedin": "https://linkedin.com/company/example",
    "x": null, "facebook": "https://facebook.com/example",
    "instagram": null, "youtube": null, "tiktok": null
  },
  "billable": true,
  "confidence": "high",
  "pagesCrawled": 4,
  "crawlMode": "cheerio"
}
```

The `billable` field tells you exactly which rows you paid for. `confidence`
is `high` when 2+ verified signal types are present, `medium` for 1,
`low`/`none` otherwise.

### Input

| Field | Default | What it does |
|---|---|---|
| `startUrls` | — | List of website URLs. One output row per URL. |
| `maxPagesPerDomain` | 5 | How many pages to crawl per site (1–20). Contact, about, and legal pages are found and prioritized automatically. |
| `includeSocials` | true | Also extract social profile links. |
| `phoneRegionHint` | US | Two-letter country code used to validate phone numbers written without an international prefix. |
| `useBrowserFallback` | true | If static crawling finds nothing, retry the site with a real headless browser (helps with JavaScript-heavy sites). |

### How it works

1. The homepage of each site is fetched and scanned.
2. Links to contact, about, imprint/legal, and support pages are scored and
   crawled first — the page budget is never wasted on blog posts or product
   pages.
3. Contact data is extracted from visible text, `mailto:`/`tel:` links, and
   JSON-LD structured data that businesses publish about themselves.
4. Emails get an MX lookup, phones are validated per region, social links are
   normalized (share/intent links are filtered out).
5. Crawling stops early once a site has yielded a full contact set, so runs
   stay fast and cheap.

### Fair crawling & data ethics

- Only **business-published** contact information is collected — what
  companies put on their own contact pages, footers, and structured data.
  No third-party enrichment, no guessed email patterns, no personal-data lookups.
- `robots.txt` is respected, requests are throttled to one at a time per
  domain, and the crawler identifies itself with a descriptive user agent.

### Use with AI agents (MCP)

This Actor is built for autonomous use by AI agents via the
[Apify MCP server](https://mcp.apify.com):

- **Bounded, results-based spend** — an agent can never burn budget on failed
  lookups: rows without verified data cost $0, and the `Maximum cost per run`
  option hard-caps total spend per run.
- **Limited permissions** — the Actor cannot access user data beyond its own run.
- **Machine-readable output** — the `billable` and `confidence` fields let an
  agent filter for verified contacts without re-validating anything.

Minimal input an agent needs:

```json
{ "startUrls": [{ "url": "https://example.com" }] }
```

### Frequently asked questions

#### How do I extract email addresses from a list of websites?

Paste your URLs into `startUrls` and run. The Actor crawls each site's
contact, about, and legal pages, extracts emails from text, `mailto:` links,
and JSON-LD, then MX-validates each address so you only pay for emails whose
domain can actually receive mail.

#### What does it cost to scrape contact details?

$6.00 per 1,000 verified contact rows — and only verified rows count. A row
with no MX-valid email, no valid phone, and fewer than 2 social profiles is
delivered free. There is no subscription and no per-URL or compute charge.

#### How is this different from other contact scrapers?

Most scrapers bill per URL processed or per compute-second, so dead domains
and bot-walled sites cost as much as hits. Here, billing is gated on
validation: if nothing on the row is verified, the row is free.

#### Can it find phone numbers and social media profiles too?

Yes — phones are validated with libphonenumber against your `phoneRegionHint`,
and social links are recognized across LinkedIn, X/Twitter, Facebook,
Instagram, YouTube, and TikTok (share/intent links are filtered out).

### Good to know

- **Sites that block datacenter traffic** (some large retail chains) may
  return an empty row. You are not charged for those.
- Use the **Maximum cost per run** option in the run settings to hard-cap
  spending — the Actor stops charging the moment your limit is reached.
- Found a problem? Open an issue on this page — issues are checked daily.

# Actor input Schema

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

List of website URLs to extract contact details from. One row is returned per input URL.

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

How many pages to crawl per site looking for contact info. Contact/about/legal pages are prioritized automatically.

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

Also extract LinkedIn, X/Twitter, Facebook, Instagram, YouTube and TikTok profile links.

## `phoneRegionHint` (type: `string`):

Two-letter country code (e.g. US, GB, DE) used to validate phone numbers found without an international prefix.

## `useBrowserFallback` (type: `boolean`):

If static crawling finds nothing, retry the site with a headless browser. Slower and slightly more expensive per site.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxPagesPerDomain": 5,
  "includeSocials": true,
  "phoneRegionHint": "US",
  "useBrowserFallback": true
}
```

# 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"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("resultsmith/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" }] }

# Run the Actor and wait for it to finish
run = client.actor("resultsmith/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"
    }
  ]
}' |
apify call resultsmith/contact-details-extractor --silent --output-dataset

```

## MCP server setup

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