# B2B Email & Phone Scraper for Lead Gen (`andok/contact-scraper`) Actor

Crawl domains to automatically extract email addresses and phone numbers. Fuel your B2B outbound sales pipelines instantly.

- **URL**: https://apify.com/andok/contact-scraper.md
- **Developed by:** [Andok](https://apify.com/andok) (community)
- **Categories:** Lead generation, Developer tools
- **Stats:** 9 total users, 3 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.47 / 1,000 page crawleds

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/actors/running/actors-in-store.md#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

## Website Contact Scraper

Deep-crawl any website to uncover every email address and phone number hidden across its pages. Unlike single-page extractors, this actor follows links and scans multiple pages per domain -- ideal for thorough lead generation when you need complete contact coverage. Powered by `got-scraping` for reliable, anti-bot-resistant fetching.

### Features

- **Multi-page crawling** — scans every page on a site, not just the homepage or contact page
- **Anti-bot resilience** — uses `got-scraping` with browser-like headers to bypass basic protections
- **Dual extraction** — parses both `mailto:`/`tel:` links and raw text via advanced regex
- **Bulk input** — process multiple websites in a single run with parallel execution
- **Smart filtering** — excludes image filenames, CSS/JS artifacts, and other false positives
- **Automatic deduplication** — returns only unique emails and phone numbers per URL
- **Charge-limit safety** — respects per-run spending caps so you stay within budget

### Input

| Field | Type | Required | Default | Description |
|-------|------|----------|---------|-------------|
| `urls` | `array` | Yes | — | List of website URLs to crawl for emails and phone numbers |
| `timeoutSeconds` | `integer` | No | `15` | Maximum seconds to wait for each page to respond |
| `concurrency` | `integer` | No | `10` | Number of pages to process in parallel (1-50) |

#### Input Example

```json
{
  "urls": [
    "https://apify.com/",
    "https://example-agency.com/",
    "https://startup.io/"
  ],
  "timeoutSeconds": 15,
  "concurrency": 10
}
```

### Output

Each crawled page produces one result object with all discovered emails and phone numbers.

Key fields:

- `inputUrl` (`string`) — the URL as provided in the input
- `finalUrl` (`string`) — the URL after redirects
- `status` (`number`) — HTTP status code
- `emails` (`string[]`) — deduplicated list of email addresses found
- `phones` (`string[]`) — deduplicated list of phone numbers found
- `emailCount` (`number`) — total unique emails found
- `phoneCount` (`number`) — total unique phone numbers found
- `error` (`string`) — error message if the page could not be fetched

#### Output Example

```json
{
  "inputUrl": "https://example-agency.com/",
  "finalUrl": "https://www.example-agency.com/",
  "status": 200,
  "emails": ["info@example-agency.com", "sales@example-agency.com", "careers@example-agency.com"],
  "phones": ["+44 20 7946 0958", "+44 20 7946 0959"],
  "emailCount": 3,
  "phoneCount": 2
}
```

### Pricing

| Event | Cost |
|-------|------|
| Page Crawled | Pay-per-event (see actor pricing page) |

You pay for each page crawled. A per-run spending cap protects your budget automatically.

### Use Cases

- **Comprehensive lead generation** — crawl entire company websites to build complete contact lists for outreach
- **Competitor research** — discover all publicly listed contacts across a competitor's web presence
- **Agency prospecting** — extract every email and phone from potential client websites before cold outreach
- **Recruitment sourcing** — find hiring manager and HR contacts buried in career or team pages
- **Directory building** — compile contact databases from industry websites and association pages

### Related Actors

| Actor | What it adds |
|-------|-------------|
| [Contact Info Extractor](https://apify.com/andok/contact-info-extractor) | Fast single-page extraction when you already know the exact URLs |
| [Company Enrichment & Research](https://apify.com/andok/company-enrichment) | Adds company metadata, social profiles, VAT validation, and SSL signals to your leads |
| [Shopify Store Intelligence](https://apify.com/andok/shopify-intelligence) | Scrapes product catalogs from Shopify stores you discover during prospecting |

# Actor input Schema

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

List of website URLs to crawl for email addresses and phone numbers. The scraper uses anti-bot-resistant fetching to access each page.

## `timeoutSeconds` (type: `integer`):

Maximum seconds to wait for each page to respond. Increase for slow or heavily loaded websites.

## `concurrency` (type: `integer`):

Number of pages to crawl in parallel. Higher values speed up large runs but may trigger rate limits.

## Actor input object example

```json
{
  "urls": [
    "https://webscraper.io/test-sites/e-commerce/allinone"
  ],
  "timeoutSeconds": 15,
  "concurrency": 10
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `resultsCsv` (type: `string`):

No description

## `run` (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": [
        "https://webscraper.io/test-sites/e-commerce/allinone"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("andok/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 = { "urls": ["https://webscraper.io/test-sites/e-commerce/allinone"] }

# Run the Actor and wait for it to finish
run = client.actor("andok/contact-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://webscraper.io/test-sites/e-commerce/allinone"
  ]
}' |
apify call andok/contact-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,andok/contact-scraper"
        }
    }
}

```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

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