# Social Media & Website Lead Extractor (`scale-flow/social-media-contact-scraper`) Actor

Scrapes Instagram, TikTok, and YouTube profiles, expands bio links (Linktree), crawls target websites, solves email obfuscation, and verifies email validity (MX checks).

- **URL**: https://apify.com/scale-flow/social-media-contact-scraper.md
- **Developed by:** [Scale Flow](https://apify.com/scale-flow) (community)
- **Categories:** Lead generation, Social media, Jobs
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $9.00 / 1,000 results

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

## 🕵️‍♂️ Social Media & Website Contact Discovery Scraper

Turn social profiles and search queries into highly targeted, verified B2B lead lists. This Actor automatically scrapes profiles from **Instagram**, **TikTok**, and **YouTube**, follows "link in bio" pages (like **Linktree** or **Beacons**), crawls target websites, and extracts verified emails, phone numbers, and social handles.

---

### 🚀 Key Features

*   **Multi-Platform Input:** Input direct social media links (Instagram, TikTok, YouTube), raw business websites, or search queries to discover leads.
*   **Search-Engine-Based Discovery:** Type keywords like `"fitness coach Munich"` or `"fashion brand Berlin"` to automatically discover matching profiles across Instagram, TikTok, and YouTube.
*   **Advanced Login-Wall Bypass (Stealth):** Uses double-redundancy search engine indexing (Google + Bing fallbacks) to scrape bio details and websites without getting blocked by direct login walls.
*   **Bio-Link Aggregator Expansion:** Automatically detects and expands Linktree, Beacons, Shorby, and other bio-link pages to find the actual target websites.
*   **Deep Website Crawler:** Crawls target websites up to 2-3 levels deep, prioritizing high-value contact pages (Contact, About Us, Impressum, Team, Imprint) to extract contact details.
*   **Email Obfuscation Solver:** Solves obfuscated emails like `info [at] company (dot) com` or those hidden in scripts/footer templates.
*   **Active Email Verification (DNS MX Check):** Performs domain MX-record checks against live mail servers to verify if the email address is valid and active, keeping your bounce rate low.
*   **B2B Context Enrichment:** Extracts company names, descriptions, logos, and additional social media profiles (Facebook, Twitter/X, LinkedIn, Pinterest) linked on the website.

---

### 💡 Why Choose This Scraper?

1.  **Ultra-Low Running Cost:** Built using Crawlee's lightweight HTTP engine rather than running a heavy headless browser. It consumes **up to 90% less bandwidth and memory**, meaning you can scrape thousands of profiles for a few cents in proxy traffic.
2.  **Double Redundancy:** Fallbacks between Google and Bing ensure the scraper keeps running even if one search engine rate-limits requests.
3.  **High-Quality Leads:** The built-in DNS email verification ensures you only export deliverable emails, protecting your sender reputation.

---

### 🛠️ How to Use

1.  **Direct URLs (Optional):** Enter a list of Instagram/TikTok/YouTube profile URLs or direct business website links.
2.  **Search Queries (Optional):** Enter search keywords (e.g., `"dentist Zurich"`, `"marketing agency Hamburg"`).
3.  **Select Platforms:** Choose which platforms to search (Instagram, TikTok, YouTube).
4.  **Crawl Settings:** 
    *   Set **Max website crawl depth** (default `2` is recommended to find Contact/Imprint pages).
    *   Keep **Verify Emails via MX check** toggled ON to validate email deliverability.
5.  **Proxy Configuration:** **Always use Residential Proxies** for best results on social media networks.
6.  **Click Run:** Download your clean list as JSON, CSV, Excel, or hook it to a webhook.

---

### 📊 Output Data Structure

The Actor outputs clean, structured JSON format for easy import into CRMs (HubSpot, Salesforce, etc.):

```json
{
  "platform": "instagram",
  "url": "https://www.instagram.com/nikegolf/",
  "username": "nikegolf",
  "fullName": "Nike Golf",
  "biography": "1.2M Followers. Check out our golf gear at nikegolf.com or email contact@nikegolf.com",
  "followersCount": 1200000,
  "linkInBio": "https://nikegolf.com",
  "resolvedWebsiteUrl": "https://nikegolf.com/",
  "contacts": {
    "emails": [
      "contact@nikegolf.com"
    ],
    "verifiedEmails": [
      {
        "email": "contact@nikegolf.com",
        "isValidSyntax": true,
        "hasMxRecords": true,
        "status": "valid"
      }
    ],
    "phones": [
      "+1-800-806-6453"
    ],
    "socialLinks": {
      "twitter": "https://twitter.com/nikegolf",
      "youtube": "https://youtube.com/c/nikegolf",
      "facebook": "https://facebook.com/nikegolf"
    },
    "companyName": "Nike Golf - Official Store",
    "companyDescription": "Shop the latest golf shoes, apparel, and equipment from Nike Golf.",
    "companyLogo": "https://nikegolf.com/images/logo.png"
  },
  "scrapedAt": "2026-06-23T12:53:27.060Z"
}
````

***

### 🛡️ Best Practices & Tips

- **Residential Proxies:** Direct scraping of social networks without proxies will trigger instant login blocks. Always enable Residential proxies in the run settings.
- **Session Cookies:** For heavy scraping, you can optionally provide session cookies in the advanced input settings to simulate an authenticated browser session.

# Actor input Schema

## `directUrls` (type: `array`):

Provide direct links to Instagram profiles, TikTok profiles, YouTube channels, or business websites (one per line).

## `queries` (type: `array`):

Search queries to discover profiles (e.g., 'fitness coach Berlin', 'clothing brand agency'). Leads will be automatically searched on Google/Bing.

## `platforms` (type: `array`):

If queries are supplied, search for profiles on these platforms.

## `maxResultsPerQuery` (type: `integer`):

Maximum number of profiles to fetch for each query/platform combination.

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

How deep to crawl target websites found in bios. Depth 1 crawls only the landing page. Depth 2 crawls linked pages (Contact, About, Impressum, etc.).

## `verifyEmails` (type: `boolean`):

If enabled, performs syntax validation and queries DNS for mail exchange (MX) records to verify the domain can actually receive emails.

## `instagramCookies` (type: `string`):

Provide raw JSON array of session cookies or cookies string (e.g., sessionid=...) to scrape Instagram directly when search engine scraping is blocked.

## `tiktokCookies` (type: `string`):

Provide raw JSON array of session cookies or cookies string to scrape TikTok directly.

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

Apify Proxy configuration. We strongly recommend using Residential Proxies, especially for social media platforms.

## `runTestsuite` (type: `boolean`):

If enabled, runs the internal integration tests in the cloud to verify if proxy and scraper features are fully functional. The normal scraping flow will be bypassed.

## Actor input object example

```json
{
  "directUrls": [
    "https://www.instagram.com/instagram/",
    "https://www.tiktok.com/@tiktok"
  ],
  "queries": [],
  "platforms": [
    "instagram",
    "tiktok",
    "youtube"
  ],
  "maxResultsPerQuery": 10,
  "maxCrawlDepth": 2,
  "verifyEmails": true,
  "proxyConfiguration": {
    "useApifyProxy": true
  },
  "runTestsuite": false
}
```

# 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 = {
    "directUrls": [
        "https://www.instagram.com/instagram/",
        "https://www.tiktok.com/@tiktok"
    ],
    "queries": [],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scale-flow/social-media-contact-scraper").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 = {
    "directUrls": [
        "https://www.instagram.com/instagram/",
        "https://www.tiktok.com/@tiktok",
    ],
    "queries": [],
    "proxyConfiguration": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scale-flow/social-media-contact-scraper").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 '{
  "directUrls": [
    "https://www.instagram.com/instagram/",
    "https://www.tiktok.com/@tiktok"
  ],
  "queries": [],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call scale-flow/social-media-contact-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=scale-flow/social-media-contact-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Social Media & Website Lead Extractor",
        "description": "Scrapes Instagram, TikTok, and YouTube profiles, expands bio links (Linktree), crawls target websites, solves email obfuscation, and verifies email validity (MX checks).",
        "version": "1.0",
        "x-build-id": "8w2NqBDTenCi7vCoh"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/scale-flow~social-media-contact-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-scale-flow-social-media-contact-scraper",
                "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/scale-flow~social-media-contact-scraper/runs": {
            "post": {
                "operationId": "runs-sync-scale-flow-social-media-contact-scraper",
                "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/scale-flow~social-media-contact-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-scale-flow-social-media-contact-scraper",
                "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",
                "properties": {
                    "directUrls": {
                        "title": "Direct URLs to scrape",
                        "type": "array",
                        "description": "Provide direct links to Instagram profiles, TikTok profiles, YouTube channels, or business websites (one per line).",
                        "items": {
                            "type": "string"
                        }
                    },
                    "queries": {
                        "title": "Search queries / keywords",
                        "type": "array",
                        "description": "Search queries to discover profiles (e.g., 'fitness coach Berlin', 'clothing brand agency'). Leads will be automatically searched on Google/Bing.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "platforms": {
                        "title": "Platforms to search",
                        "type": "array",
                        "description": "If queries are supplied, search for profiles on these platforms.",
                        "items": {
                            "type": "string",
                            "enum": [
                                "instagram",
                                "tiktok",
                                "youtube"
                            ],
                            "enumTitles": [
                                "Instagram",
                                "TikTok",
                                "YouTube"
                            ]
                        },
                        "default": [
                            "instagram",
                            "tiktok",
                            "youtube"
                        ]
                    },
                    "maxResultsPerQuery": {
                        "title": "Max results per query",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of profiles to fetch for each query/platform combination.",
                        "default": 10
                    },
                    "maxCrawlDepth": {
                        "title": "Max website crawl depth",
                        "minimum": 1,
                        "maximum": 5,
                        "type": "integer",
                        "description": "How deep to crawl target websites found in bios. Depth 1 crawls only the landing page. Depth 2 crawls linked pages (Contact, About, Impressum, etc.).",
                        "default": 2
                    },
                    "verifyEmails": {
                        "title": "Verify Emails via MX check",
                        "type": "boolean",
                        "description": "If enabled, performs syntax validation and queries DNS for mail exchange (MX) records to verify the domain can actually receive emails.",
                        "default": true
                    },
                    "instagramCookies": {
                        "title": "Instagram Session Cookies (Optional)",
                        "type": "string",
                        "description": "Provide raw JSON array of session cookies or cookies string (e.g., sessionid=...) to scrape Instagram directly when search engine scraping is blocked."
                    },
                    "tiktokCookies": {
                        "title": "TikTok Session Cookies (Optional)",
                        "type": "string",
                        "description": "Provide raw JSON array of session cookies or cookies string to scrape TikTok directly."
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Apify Proxy configuration. We strongly recommend using Residential Proxies, especially for social media platforms."
                    },
                    "runTestsuite": {
                        "title": "Run Automated Test Suite",
                        "type": "boolean",
                        "description": "If enabled, runs the internal integration tests in the cloud to verify if proxy and scraper features are fully functional. The normal scraping flow will be bypassed.",
                        "default": false
                    }
                }
            },
            "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
