# Website Contact Scraper Pro MCP (`red.cars/website-contact-scraper-pro-mcp`) Actor

Contact data extraction from JavaScript SPAs — emails, phones, social links via headless browser. Handles React, Angular, Vue, Next.js that return empty for HTTP scrapers.

- **URL**: https://apify.com/red.cars/website-contact-scraper-pro-mcp.md
- **Developed by:** [AutomateLab](https://apify.com/red.cars) (community)
- **Categories:** MCP servers, AI
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, NaN 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/platform/actors/running/actors-in-store#pay-per-usage

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

## Website Contact Scraper Pro — MCP Server

Extract contact data from any business website — emails, phones, social links, physical addresses, and decision-maker contacts — even from JavaScript-heavy SPAs that break traditional scrapers. This MCP server gives AI agents the ability to scrape structured contact information from any website using headless browser rendering, enabling automated lead generation and business development workflows.

### Use Cases

- **Sales prospecting** — Extract all contact information from a target company's website before outbound outreach campaigns
- **Lead enrichment** — Fill in missing email addresses, phone numbers, and social profiles for existing lead lists
- **Partner discovery** — Find contact details for potential business partners, vendors, or acquisition targets
- **Event preparation** — Gather attendee or exhibitor contacts from conference or trade show websites
- **Recruiting outreach** — Collect HR contacts and hiring manager information from company career pages
- **Competitive intelligence** — Map contact infrastructure across competitors' digital presence

### Features

- **Universal contact extraction** — Emails, phone numbers, social links, physical addresses, and more from any webpage
- **JavaScript SPA support** — Renders React, Angular, Vue, and Next.js sites that return empty for HTTP-only scrapers
- **Headless browser rendering** — Playwright-powered rendering captures dynamically-loaded content
- **Extraction presets** — Choose from balanced (default), decision-makers, deep-scan, or monitor modes
- **Cost optimization** — Optional Pro Fallback runs HTTP scraper first, only using browser for JavaScript failures
- **Batch processing** — Extract from multiple URLs in a single run for efficient lead list enrichment
- **AI agent ready** — MCP protocol native, works with Claude, GPT, and any MCP-compatible agent

### Quick Start

#### Installation

```bash
npm install
````

#### Run

```bash
## Run with default input
echo '{"urls": ["https://example.com"]}' | INPUT_STORE=1 apify run

## Run with preset
echo '{"urls": ["https://example.com"], "preset": "decision-makers"}' | INPUT_STORE=1 apify run

## Enable Pro Fallback (HTTP first, browser on failure)
echo '{"urls": ["https://example.com"], "enableProFallback": true}' | INPUT_STORE=1 apify run
```

#### Add to your AI agent

```json
{
  "mcpServers": {
    "website-contact-scraper-pro-mcp": {
      "url": "https://website-contact-scraper-pro-mcp.apify.actor/mcp"
    }
  }
}
```

### Input Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `urls` | array of strings | yes | — | Website URLs to scrape |
| `preset` | string | no | `"balanced"` | Extraction preset: `balanced`, `decision-makers`, `deep-scan`, or `monitor` |
| `enableProFallback` | boolean | no | `false` | Run HTTP scraper first, only use browser for JS failures |

#### Presets

| Preset | Best For |
|--------|----------|
| `balanced` | General contact scraping with reasonable depth |
| `decision-makers` | Prioritize C-suite, VP, and director-level contacts |
| `deep-scan` | Maximum extraction — all pages, all links, maximum data |
| `monitor` | Lightweight scan for recurring monitoring tasks |

### Tools

#### scrape\_contacts

Scrapes contact data from one or more websites using headless browser rendering.

**When to call:** AI agent doing lead generation, sales prospecting, or contact research. Scenario: Finding all contact information on a company's website before outreach.

**Example AI prompt:** "Scrape all contact information from apify.com — emails, phones, social links, everything."

```
scrape_contacts(urls=["https://apify.com"], preset="balanced", enableProFallback=false)
```

### Output

```json
{
  "contacts": [
    {
      "url": "https://apify.com",
      "emails": ["contact@apify.com", "info@apify.com"],
      "phones": ["+1 555 123 4567"],
      "social": {
        "linkedin": "https://linkedin.com/company/apify",
        "twitter": "https://twitter.com/apify",
        "facebook": "https://facebook.com/apify"
      },
      "addresses": ["6026 W. Pima Center Pkwy, Scottsdale, AZ 85258"],
      "source": "headless-browser"
    }
  ],
  "metadata": {
    "scraped": 1,
    "successful": 1,
    "failed": 0,
    "preset": "balanced"
  }
}
```

### Data Extracted

| Data Type | Description |
|-----------|-------------|
| **Emails** | All email addresses found on the page |
| **Phones** | Phone numbers in various formats |
| **Social Links** | LinkedIn, Twitter, Facebook, Instagram, GitHub, and more |
| **Addresses** | Physical addresses and locations |
| **Source URL** | Which URL the data came from |

### Pricing

| Tool | PPE Price |
|------|-----------|
| `scrape_contacts` | $0.10/call |

PPE (Pay Per Event) — pay only for what you use. No subscription required.

### Troubleshooting

**No contacts found on a JavaScript site**
Enable `enableProFallback: true` to allow the HTTP scraper to attempt first, falling back to browser rendering only when needed.

**SPA returns empty content**
This actor uses headless browser rendering specifically for this case. The Playwright engine waits for JavaScript to execute before extracting content.

**Rate limiting or blocks**
Try reducing batch size or using the `monitor` preset for lighter scraping.

**Timeout on large sites**
The actor has a 3600-second timeout. For very large sites, split into multiple runs with smaller URL batches.

### How It Compares

| Aspect | Website Contact Scraper Pro | HTTP-only scrapers |
|--------|----------------------------|---------------------|
| JavaScript sites | Full rendering | Empty results |
| SPA support | Native (React, Angular, Vue, Next.js) | None |
| Contact types | Emails, phones, social, addresses | Emails only |
| Dynamic content | Waits for JS execution | Skipped |

### License

MIT

# Actor input Schema

## `operation` (type: `string`):

The operation to perform: scrapeContacts, detectEmailPatterns, extractSocialLinks, exportVCard

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

Array of website URLs to scrape

## `maxContacts` (type: `integer`):

Maximum number of contacts to extract per URL

## `extractPatterns` (type: `array`):

Custom regex patterns for email detection

## `includeContactForms` (type: `boolean`):

Extract contact form information (action URLs, input fields)

## `proxyConfig` (type: `object`):

Proxy configuration for scraping

## `checkOnly` (type: `boolean`):

If true, the Actor will verify readiness and estimate cost in < 5 seconds (FREE compute)

## Actor input object example

```json
{
  "operation": "scrapeContacts",
  "urls": [
    "https://example.com"
  ],
  "maxContacts": 50,
  "extractPatterns": [],
  "includeContactForms": true,
  "proxyConfig": {},
  "checkOnly": 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 = {
    "urls": [
        "https://example.com"
    ],
    "maxContacts": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("red.cars/website-contact-scraper-pro-mcp").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": ["https://example.com"],
    "maxContacts": 50,
}

# Run the Actor and wait for it to finish
run = client.actor("red.cars/website-contact-scraper-pro-mcp").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": [
    "https://example.com"
  ],
  "maxContacts": 50
}' |
apify call red.cars/website-contact-scraper-pro-mcp --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "Website Contact Scraper Pro MCP",
        "description": "Contact data extraction from JavaScript SPAs — emails, phones, social links via headless browser. Handles React, Angular, Vue, Next.js that return empty for HTTP scrapers.",
        "version": "1.0",
        "x-build-id": "rq0l3H2QSuqVxHHy0"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/red.cars~website-contact-scraper-pro-mcp/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-red.cars-website-contact-scraper-pro-mcp",
                "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/red.cars~website-contact-scraper-pro-mcp/runs": {
            "post": {
                "operationId": "runs-sync-red.cars-website-contact-scraper-pro-mcp",
                "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/red.cars~website-contact-scraper-pro-mcp/run-sync": {
            "post": {
                "operationId": "run-sync-red.cars-website-contact-scraper-pro-mcp",
                "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": {
                    "operation": {
                        "title": "Operation",
                        "enum": [
                            "scrapeContacts",
                            "detectEmailPatterns",
                            "extractSocialLinks",
                            "exportVCard"
                        ],
                        "type": "string",
                        "description": "The operation to perform: scrapeContacts, detectEmailPatterns, extractSocialLinks, exportVCard",
                        "default": "scrapeContacts"
                    },
                    "urls": {
                        "title": "URLs",
                        "type": "array",
                        "description": "Array of website URLs to scrape",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "maxContacts": {
                        "title": "Max Contacts",
                        "type": "integer",
                        "description": "Maximum number of contacts to extract per URL",
                        "default": 50
                    },
                    "extractPatterns": {
                        "title": "Extract Patterns",
                        "type": "array",
                        "description": "Custom regex patterns for email detection",
                        "items": {
                            "type": "string"
                        },
                        "default": []
                    },
                    "includeContactForms": {
                        "title": "Include Contact Forms",
                        "type": "boolean",
                        "description": "Extract contact form information (action URLs, input fields)",
                        "default": true
                    },
                    "proxyConfig": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Proxy configuration for scraping",
                        "default": {}
                    },
                    "checkOnly": {
                        "title": "Check Only",
                        "type": "boolean",
                        "description": "If true, the Actor will verify readiness and estimate cost in < 5 seconds (FREE compute)",
                        "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
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
