# Contact Info Scraper (`julfikar/contact-info-scraper`) Actor

Crawls one or more websites and extracts emails, phone numbers, and social media profile links (Facebook, Instagram, LinkedIn, X/Twitter, YouTube, TikTok), grouped by domain.

- **URL**: https://apify.com/julfikar/contact-info-scraper.md
- **Developed by:** [Julfikar Haidar](https://apify.com/julfikar) (community)
- **Categories:** Lead generation
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $6.00 / 1,000 domain contact info 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 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 Info Scraper

Give it one or more website URLs. It crawls each site (staying on the same domain by default) and returns a single row per domain with every email address, phone number, and social media profile link it found — deduplicated.

### What it extracts

- **Emails** — from page text and `mailto:` links
- **Phone numbers** — from page text and `tel:` links, validated and formatted to international format (e.g. `+1 415 555 2671`)
- **Social profiles** — Facebook, Instagram, LinkedIn, X/Twitter, YouTube, TikTok

### Use cases

- Building a lead list from a set of company websites (agencies, local businesses, vendors)
- Enriching an existing list of domains with contact details
- Finding the right social channels for outreach/partnership research

### Input

| Field | Description | Default |
|---|---|---|
| `startUrls` | Websites to crawl | — (required) |
| `maxDepth` | How many link-hops from the start URL to follow | 2 |
| `maxPagesPerDomain` | Safety cap on pages visited per domain | 50 |
| `sameDomainOnly` | Stay on the starting domain (recommended) | true |
| `extractEmails` / `extractPhones` / `extractSocialLinks` | Toggle each extractor | true |
| `defaultCountryCode` | Country used to interpret local-format phone numbers | US |

Example:

```json
{
  "startUrls": [{ "url": "https://example.com" }],
  "maxDepth": 2,
  "maxPagesPerDomain": 30
}
```

### Output

One row per domain:

```json
{
  "domain": "example.com",
  "emails": ["hello@example.com"],
  "phones": ["+1 415 555 2671"],
  "socialLinks": {
    "facebook": [],
    "instagram": [],
    "linkedin": ["https://www.linkedin.com/company/example/"],
    "twitter": ["https://x.com/example"],
    "youtube": [],
    "tiktok": []
  },
  "pagesCrawled": ["https://example.com", "https://example.com/contact"],
  "pagesCrawledCount": 2
}
```

### How it works

The Actor prioritizes crawl budget carefully: it reserves crawl slots per domain before enqueueing links, so `maxPagesPerDomain` is a hard cap on requests made (not just on results recorded) — you never pay for more page fetches than you asked for. It skips non-content URLs (login, checkout, cart, account pages) since those never contain contact info.

### Limitations

- Uses a lightweight HTTP crawler (no headless browser), so contact info that's injected client-side by heavy single-page-app frameworks after load may not be captured. Most business/marketing sites render contact info server-side and work fine.
- Phone number extraction is regex + validation based. Any 10-digit sequence that happens to be a valid-looking phone number format (e.g. some order/tracking IDs) can occasionally be picked up as a false positive.

# Actor input Schema

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

Websites to crawl for contact information.

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

How many link-hops away from a start URL to follow (0 = only the start page).

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

Safety cap on how many pages to visit per starting domain.

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

If enabled, the crawler only follows links on the same domain as the start URL.

## `extractEmails` (type: `boolean`):

Extract email addresses found in page text and mailto: links.

## `extractPhones` (type: `boolean`):

Extract phone numbers found in page text and tel: links.

## `extractSocialLinks` (type: `boolean`):

Extract links to Facebook, Instagram, LinkedIn, X/Twitter, YouTube, and TikTok profiles.

## `defaultCountryCode` (type: `string`):

Two-letter country code (e.g. US, GB, DE) used to interpret local-format phone numbers found on pages.

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

Proxy settings for the crawler.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "maxDepth": 2,
  "maxPagesPerDomain": 50,
  "sameDomainOnly": true,
  "extractEmails": true,
  "extractPhones": true,
  "extractSocialLinks": true,
  "defaultCountryCode": "US",
  "proxyConfiguration": {
    "useApifyProxy": 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"
        }
    ],
    "proxyConfiguration": {
        "useApifyProxy": true
    }
};

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

# Run the Actor and wait for it to finish
run = client.actor("julfikar/contact-info-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 '{
  "startUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "proxyConfiguration": {
    "useApifyProxy": true
  }
}' |
apify call julfikar/contact-info-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wRfb4lIougSXI5MMN/builds/vpl42F18NQAvKxEbE/openapi.json
