# Extract Emails and Socials Contacts Any Website (`mikolabs/extract-emails-and-socials-contacts-any-website`) Actor

Lightning-fast advanced Apify Actor for extracting comprehensive contact information from websites, including email addresses, social media links, and phone numbers from both static and JavaScript-rendered pages.

- **URL**: https://apify.com/mikolabs/extract-emails-and-socials-contacts-any-website.md
- **Developed by:** [mikolabs](https://apify.com/mikolabs) (community)
- **Categories:** Automation, Lead generation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, NaN bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.00 / 1,000 emails

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

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
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.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use 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

## Extract Emails, Social links and Contact Information From Any Website

An advanced Apify Actor for extracting comprehensive contact information from websites, including email addresses, social media links, and phone numbers from both static and JavaScript-rendered pages. This tool is perfect for web scraping, contact collection, and lead generation.

### ✅ Features
- 📧 **Email Extraction**: Extracts only valid and relevant email addresses using robust filtering.
- 📱 **Social Media Links**: Automatically detects and categorizes social media profiles (Facebook, Twitter/X, LinkedIn, Instagram, YouTube, TikTok, Pinterest, Snapchat, Telegram, WhatsApp, Reddit, Discord, Medium, Behance, Dribbble, GitHub, GitLab, Vimeo, Twitch, Skype).
- 📞 **Phone Numbers**: Extracts phone numbers in various formats (international, domestic, tel: links).
- 🌐 **JavaScript Support**: Handles JS-rendered pages and compiles embedded scripts for complete content access.
- 🔗 **Contact Page Detection**: Prioritizes contact-related pages (contact, about, team, reach, connect) for better and faster results.
- ⚡ **Lightning Fast Concurrency**: Processes multiple websites and pages simultaneously with configurable limits.
- 🔒 **Reliable Error Handling**: Comprehensive error logging and failed request monitoring ensures reliability.
- 🎯 **Smart Categorization**: Automatically organizes social links by platform in the final output.

### 🏆 Use Cases
- **Lead Generation**: Collect comprehensive contact information from company websites.
- **Market Research**: Gather emails, social profiles, and phone numbers for outreach campaigns.
- **Social Media Monitoring**: Find all social media presence of businesses.
- **Contact Database Building**: Create complete contact profiles with multiple communication channels.
- **Competitive Analysis**: Research competitor contact information and social media presence.

### 💳 Pricing
This Actor is priced on a **Pay-per-event** model. You are only billed for successful results:
- **$3.00 USD per 1,000 unique emails** ($0.003 USD per email).
- **$1.00 USD per 1,000 unique social links** ($0.001 USD per social link).
- Deduplication is run-wide; you are **never charged twice** for the same email or social link in a single run.
- If a run extracts 0 contacts, you pay nothing.

### ⚙️ Input Configuration
The actor accepts a JSON object with the following structure:

```json
{
  "urls": [
    { "url": "https://example.com" }
  ],
  "deepSearch": false,
  "maxEmailsToScrape": 0,
  "maxCrawlDepth": 3,
  "maxPagesPerSeed": 50,
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}
````

- `urls` (required): An array of website URLs to scrape.
- `deepSearch` (optional): If enabled, crawls deep into website structures. Otherwise targets high-priority pages.
- `maxEmailsToScrape` (optional): Stop crawler after finding this number of emails.
- `maxCrawlDepth` (optional): Max link-hops from seed.
- `maxPagesPerSeed` (optional): Max pages visited per website to keep costs predictable.

### 📊 Output Format

The actor produces an output dataset in the following format:

```json
[
  {
    "url": "https://example.com",
    "emails": ["info@example.com", "support@example.com"],
    "social_links": {
      "facebook": ["https://facebook.com/example"],
      "twitter": ["https://twitter.com/example"],
      "linkedin": ["https://linkedin.com/company/example"],
      "instagram": ["https://instagram.com/example"]
    },
    "phone_numbers": ["+1 (555) 123-4567", "555-987-6543"],
    "scanned_pages": [
      "https://example.com",
      "https://example.com/contact",
      "https://example.com/about"
    ],
    "status": "success",
    "error": null
  },
  {
    "url": "https://another-example.com",
    "emails": [],
    "social_links": {},
    "phone_numbers": [],
    "scanned_pages": ["https://another-example.com"],
    "status": "error",
    "error": "Timeout while fetching the URL"
  }
]
```

#### Output Fields:

- `url`: The processed website URL.
- `emails`: List of extracted email addresses.
- `social_links`: Object containing categorized social media links by platform.
- `phone_numbers`: List of extracted phone numbers.
- `scanned_pages`: All subpages crawled.
- `status`: "success" or "error".
- `error`: Details of any encountered error (if applicable).

### 🌍 Supported Social Media Platforms

- **Main platforms**: Facebook, Twitter/X, LinkedIn, Instagram, YouTube, TikTok, Pinterest, Snapchat, Telegram, WhatsApp
- **Additional platforms**: Reddit, Discord, Medium, Behance, Dribbble, GitHub, GitLab, Vimeo, Twitch, Skype

### 🆘 FAQ & Support

If you have questions, feedback, or need support:

- **Email**: coredev.dan@gmail.com
- Feel free to open an issue or reach out on the Apify Community Forum.

Happy Scraping! 😊

***

### 🔍 Keywords

Contact Information Extractor, Email Extractor, Social Media Finder, Phone Number Extractor, how to get contact details from any website?, find emails on a website, scan emails and socials, generate leads from a website, Web Scraper, Lead Generation Tool, Apify Actor, Email Extraction, Social Media Links, Phone Number Extraction, Contact Page Scanner, JavaScript Rendering Scraper, Bulk Contact Scraping, contact finder, email finder, social media finder, phone finder, lead generation tool, Automation, Developer tool.

# Actor input Schema

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

One or more website URLs to start crawling from. The actor follows internal links to discover contact info across the whole site.

## `maxEmailsToScrape` (type: `integer`):

Stop extracting emails on a website after finding this many unique emails for that site. Set to 0 for unlimited.

## `deepSearch` (type: `boolean`):

Crawl deep into the website's subdirectory structure. When disabled, only visits high-priority pages (like Contact, About, and Team) for maximum speed and cost efficiency.

## `maxCrawlDepth` (type: `integer`):

How many link-hops from the seed URL to follow. Depth 1 = seed page only. Depth 2 = seed + all pages it links to. Priority pages (contact, about, blog, team…) are always followed at any depth.

## `maxPagesPerSeed` (type: `integer`):

Maximum number of pages the crawler will visit per seed URL. Keeps costs predictable on large sites.

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

Select proxies to be used. Residential proxies are highly recommended.

## Actor input object example

```json
{
  "urls": [
    {
      "url": "https://apify.com/contact/"
    },
    {
      "url": "https://mikolabs.xyz"
    }
  ],
  "maxEmailsToScrape": 10,
  "deepSearch": false,
  "maxCrawlDepth": 3,
  "maxPagesPerSeed": 50,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}
```

# Actor output Schema

## `results` (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": [
        {
            "url": "https://apify.com/contact/"
        },
        {
            "url": "https://mikolabs.xyz"
        }
    ],
    "maxEmailsToScrape": 10,
    "proxyConfiguration": {
        "useApifyProxy": true,
        "apifyProxyGroups": [
            "RESIDENTIAL"
        ]
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("mikolabs/extract-emails-and-socials-contacts-any-website").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": [
        { "url": "https://apify.com/contact/" },
        { "url": "https://mikolabs.xyz" },
    ],
    "maxEmailsToScrape": 10,
    "proxyConfiguration": {
        "useApifyProxy": True,
        "apifyProxyGroups": ["RESIDENTIAL"],
    },
}

# Run the Actor and wait for it to finish
run = client.actor("mikolabs/extract-emails-and-socials-contacts-any-website").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).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": [
    {
      "url": "https://apify.com/contact/"
    },
    {
      "url": "https://mikolabs.xyz"
    }
  ],
  "maxEmailsToScrape": 10,
  "proxyConfiguration": {
    "useApifyProxy": true,
    "apifyProxyGroups": [
      "RESIDENTIAL"
    ]
  }
}' |
apify call mikolabs/extract-emails-and-socials-contacts-any-website --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=mikolabs/extract-emails-and-socials-contacts-any-website",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Extract Emails and Socials Contacts Any Website",
        "description": "Lightning-fast advanced Apify Actor for extracting comprehensive contact information from websites, including email addresses, social media links, and phone numbers from both static and JavaScript-rendered pages.",
        "version": "0.0",
        "x-build-id": "H9ew8sH3QXFgL4l6D"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/mikolabs~extract-emails-and-socials-contacts-any-website/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-mikolabs-extract-emails-and-socials-contacts-any-website",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/mikolabs~extract-emails-and-socials-contacts-any-website/runs": {
            "post": {
                "operationId": "runs-sync-mikolabs-extract-emails-and-socials-contacts-any-website",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/mikolabs~extract-emails-and-socials-contacts-any-website/run-sync": {
            "post": {
                "operationId": "run-sync-mikolabs-extract-emails-and-socials-contacts-any-website",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "required": [
                    "urls"
                ],
                "properties": {
                    "urls": {
                        "title": "Seed URLs",
                        "type": "array",
                        "description": "One or more website URLs to start crawling from. The actor follows internal links to discover contact info across the whole site.",
                        "items": {
                            "type": "object",
                            "required": [
                                "url"
                            ],
                            "properties": {
                                "url": {
                                    "type": "string",
                                    "title": "URL of a web page",
                                    "format": "uri"
                                }
                            }
                        }
                    },
                    "maxEmailsToScrape": {
                        "title": "Max emails per website (0 = unlimited)",
                        "minimum": 0,
                        "type": "integer",
                        "description": "Stop extracting emails on a website after finding this many unique emails for that site. Set to 0 for unlimited."
                    },
                    "deepSearch": {
                        "title": "Deep Search Mode",
                        "type": "boolean",
                        "description": "Crawl deep into the website's subdirectory structure. When disabled, only visits high-priority pages (like Contact, About, and Team) for maximum speed and cost efficiency.",
                        "default": false
                    },
                    "maxCrawlDepth": {
                        "title": "Max crawl depth",
                        "minimum": 1,
                        "maximum": 6,
                        "type": "integer",
                        "description": "How many link-hops from the seed URL to follow. Depth 1 = seed page only. Depth 2 = seed + all pages it links to. Priority pages (contact, about, blog, team…) are always followed at any depth.",
                        "default": 3
                    },
                    "maxPagesPerSeed": {
                        "title": "Max pages per seed URL",
                        "minimum": 1,
                        "maximum": 1000,
                        "type": "integer",
                        "description": "Maximum number of pages the crawler will visit per seed URL. Keeps costs predictable on large sites.",
                        "default": 50
                    },
                    "proxyConfiguration": {
                        "title": "Proxy configuration",
                        "type": "object",
                        "description": "Select proxies to be used. Residential proxies are highly recommended."
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
