# Website Phone Number Scraper (`scrapers-hub/website-phone-number-scraper`) Actor

📞 Website Phone Number Scraper extracts phone numbers from websites quickly and accurately. ✅ Perfect for lead gen, B2B sales, directory building, and outreach. ⚡ Save time, boost accuracy, and scale campaigns with ease.

- **URL**: https://apify.com/scrapers-hub/website-phone-number-scraper.md
- **Developed by:** [Scrapers Hub](https://apify.com/scrapers-hub) (community)
- **Categories:** Lead generation, Automation, Developer tools
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

### Website Phone Number Scraper 🔎

**Website Phone Number Scraper** is a purpose-built tool that helps you extract phone numbers (and, optionally, emails and social media links) from websites scraped from **publicly available data**. If you’re looking for a *phone number scraper*, a *website phone number extractor*, or a *web scraping phone numbers* workflow for lead generation, this actor helps you turn scattered contact info into structured results—saving you hours of manual work.

***

### Why choose Website Phone Number Scraper?

| Feature | Benefit |
| --- | --- |
| ✅ **Phone extraction toggle** | Extract phone numbers from pages when enabled (`enablePhoneExtraction`) |
| ✅ **Email + social extraction options** | Collect emails and social media profile links in the same run (`enableSocialMediaExtraction`) |
| ✅ **Built-in proxy support** | More reliable scraping thanks to proxy configuration (`proxySettings`) |
| ✅ **Structured dataset output** | Output includes `domain`, `homepage_url`, `emails`, `phone_numbers`, and `social_media` |
| ✅ **Designed for batch processing** | Process multiple target websites via `targetUrls` |
| ✅ **Resilience with fallbacks** | If a domain fails, it still pushes an output record with empty arrays |

***

### Key features

- 📞 **Phone number extraction (optional)**: Enable `enablePhoneExtraction` to harvest phone numbers found on scraped pages.
- ✉️ **Email and phone number scraper workflow**: With `enablePhoneExtraction` and `enableSocialMediaExtraction`, you can build an email + phone + social contact dataset.
- 🔗 **Social media profile detection**: With `enableSocialMediaExtraction`, it extracts social media links and returns them in a structured `social_media` object.
- 🌐 **Website URL support**: Accepts `targetUrls` as a list of URL objects and normalizes them into `domain` and `homepage_url` for consistent results.
- 🛡️ **Proxy configuration ready**: Supports `proxySettings` with `proxy support` for smoother scraping runs.
- 💾 **Dataset-ready results**: Pushes one result object per domain directly to the Apify dataset using `Actor.push_data`.
- 🧹 **Social link deduplication**: Deduplicates social results by normalized canonical URL (`clean_url`) before saving.

***

### Input

Provide input via an `input.json` file. Example structure:

```json
{
  "targetUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "enablePhoneExtraction": true,
  "enableSocialMediaExtraction": true,
  "proxySettings": {
    "useApifyProxy": true
  }
}
```

#### Input Fields

| Field | Required | Description |
| --- | --- | --- |
| `targetUrls` | ✅ | A list of target website URLs to scrape for contact information. |
| `enablePhoneExtraction` | ❌ | If enabled, the scraper also extracts phone numbers found on the pages. Default is `true`. |
| `enableSocialMediaExtraction` | ❌ | If enabled, the scraper detects and extracts social media profile links (examples mentioned: LinkedIn, Twitter, Facebook). Default is `true`. |
| `proxySettings` | ❌ | Proxy configuration. The actor supports `proxy support` (recommended residential proxies are mentioned in the description). |

##### `proxySettings` nested fields

| Field | Required | Description |
| --- | --- | --- |
| `proxy support` | ❌ | When set to `true`, the actor uses Apify proxy configuration (as prefilled in the UI schema). |

***

### Output

After execution, the actor saves each domain’s scraped contact data in JSON format.

```json
{
  "domain": "apify.com",
  "homepage_url": "https://apify.com",
  "emails": [
    {
      "email": "example@domain.com",
      "confidence_score": 87.5,
      "source_url": "https://apify.com/contact",
      "source_type": "body",
      "validation_status": "unknown"
    }
  ],
  "phone_numbers": [
    {
      "phone": "+1 555 123 4567",
      "formatted": "+15551234567",
      "source_url": "https://apify.com/contact"
    }
  ],
  "social_media": [
    {
      "platform": "linkedin",
      "url": "https://www.linkedin.com/company/example",
      "source_url": "https://apify.com/about"
    }
  ]
}
```

#### Output Fields

| Field | Type | Description |
| --- | --- | --- |
| `domain` | string | The extracted domain for the scraped website. |
| `homepage_url` | string | A normalized homepage URL in the form `https://{domain}`. |
| `emails` | array | Extracted email records for the domain. Each item includes email, confidence, and source details. |
| `phone_numbers` | array | Extracted phone number records for the domain (includes original phone, formatted value, and source URL). |
| `social_media` | array | Extracted social media profile links, including platform, URL, and source URL. |

Notes on dataset behavior: if an error occurs for a domain, the actor still pushes a record with the same top-level keys and empty arrays for `emails`, `phone_numbers`, and `social_media`.

***

### How to use Website Phone Number Scraper (via Apify Console)

1. **Open Apify Console**: Go to [console.apify.com](https://console.apify.com) and sign in.
2. **Find the actor**: Search for **Website Phone Number Scraper** in the Actors list and open the actor page.
3. **Configure INPUT**: In the INPUT panel, add one or more entries to `targetUrls` (each entry requires a `url`).\
   Optionally enable/disable `enablePhoneExtraction` and `enableSocialMediaExtraction`.
4. **Set Proxy** (optional but recommended): Configure `proxySettings` and set `proxy support` to `true` if you want the actor to use Apify proxy support for smoother scraping.
5. **Run the actor**: Click **Run**. Watch logs for per-domain progress and the final summary.
6. **Review results**: After the run completes, open the actor’s dataset from the **OUTPUT** tab to see records per domain.
7. **Export**: Export the dataset from Apify in your preferred format (JSON/CSV available in Apify UI), using the fields `domain`, `homepage_url`, `emails`, `phone_numbers`, and `social_media`.

No coding required — get accurate phone number scraping results in minutes.

***

### Advanced features & SEO optimization

- 📞 **Website phone number extractor for lead generation**: Engineered to excel at building a contact dataset that includes phone numbers alongside emails and social links.
- 🔁 **Reliability-focused scraping runs**: Includes resilience for real-world websites, and pushes an output record even when a domain fails.
- 🧠 **Data completeness controls**: You can focus on just phone numbers (`enablePhoneExtraction`) or broaden enrichment with social links (`enableSocialMediaExtraction`).
- 🕒 **Operational safety for scaling**: Uses structured per-domain processing so you can scale from a handful of sites to larger batches.

***

### Best use cases

- 📈 **B2B lead generation teams**: Generate targeted contact data by extracting phone numbers from directory website pages and business sites.
- 🧾 **Sales ops and outreach coordinators**: Build clean datasets of `domain` + `phone_numbers` to speed up CRM list creation.
- 🔍 **Market researchers**: Compare contact availability across companies by using consistent `homepage_url` and extracted contact fields.
- 📞 **Customer support recruiters**: Identify staffing signals by pairing phone number harvesting tool results with publicly linked social profiles.
- 🧑‍💻 **Data analysts**: Analyze coverage and confidence patterns from extracted `emails` and phone number source locations.
- 🗂️ **Agencies and consultants**: Rapidly enrich client prospect lists with structured phone number data extracted from publicly available sources.
- 🌍 **Local business directories**: Scrape contact info from directory website phone number scraper use cases at scale.

***

### Technical specifications

- **Supported Input Formats** ✅
  - `targetUrls`: array of URL objects (each includes `url`)
- **Proxy Support** ✅
  - `proxySettings` with `proxy support` support for more reliable scraping.
- **Phone Extraction** ✅
  - Controlled via `enablePhoneExtraction` (default `true`).
- **Social Extraction** ✅
  - Controlled via `enableSocialMediaExtraction` (default `true`).
- **Retry Mechanism** ✅
  - Includes resilience for scraping stability (implementation details are not exposed here).
- **Dataset Structure** ✅
  - One output record per domain with: `domain`, `homepage_url`, `emails`, `phone_numbers`, `social_media`.
- **Limitations** ❌
  - Works only with **publicly accessible** contact information available on scraped pages; results depend on what the target sites expose.

***

### FAQ

#### Can this Website Phone Number Scraper extract phone numbers from any website?

✅ It can attempt to scrape phone numbers from any websites you provide in `targetUrls`. Results depend on what contact information is publicly available on those pages, and whether phone numbers are present in accessible content.

#### Does it also extract emails and social media links?

✅ Yes. Phone extraction is controlled by `enablePhoneExtraction`, and social media profile extraction is controlled by `enableSocialMediaExtraction`. Emails are included in the dataset output as part of each domain record.

#### What do I get back in the dataset?

✅ The actor saves one JSON object per domain with `domain`, `homepage_url`, `emails`, `phone_numbers`, and `social_media`. If a domain fails, you’ll still receive a record with empty arrays for the extracted fields.

#### Do I need to write any code to use it?

✅ No coding required. You can run it directly from Apify Console by filling in the INPUT fields and then export the dataset results.

#### How do I improve the success rate for web scraping phone numbers?

✅ Use the `proxySettings` option (especially `proxy support`) to help the run complete reliably across many domains, and consider enabling or disabling extraction features based on your needs.

#### Can I integrate the output into my CRM or pipeline?

✅ Yes. The dataset is structured and includes consistent fields like `domain`, `emails`, `phone_numbers`, and `social_media`, which makes it straightforward to map into CRM imports or downstream analytics.

#### Is it safe and compliant to collect phone numbers and emails?

✅ The actor is designed to collect information from **publicly accessible sources**. You are responsible for complying with applicable laws (for example GDPR/CCPA), platform terms, and spam regulations.

***

### Support & feature requests

If you’re using **Website Phone Number Scraper** and want enhancements, I’d love to hear about it.

- 💡 **Feature Requests**: Examples include custom output fields, CSV-friendly formatting options, or additional data enrichment for contact data scraper workflows.
- 📧 **Contact**: Email <dataforleads@gmail.com>.

User feedback directly shapes what we improve next for automated phone number scraping and related contact data scraping software use cases.

***

### *Final thoughts on Website Phone Number Scraper*

If you need an SEO-optimized, reliable **Website Phone Number Scraper** for extracting phone numbers from websites at scale, this actor gives you structured results you can use right away. *Get more accurate contact datasets faster with fewer manual steps.*

***

### Disclaimer

**This tool accesses publicly accessible sources only.** It does not access private profiles, authenticated content, or password-protected pages. It’s your responsibility to ensure your use complies with applicable laws (including GDPR/CCPA), spam regulations, and the target websites’ terms of service.

For data removal requests, contact <dataforleads@gmail.com>. Please use this tool responsibly, ethically, and for legitimate purposes only.

# Actor input Schema

## `targetUrls` (type: `array`):

List of target website URLs to scrape for contact information.

## `enablePhoneExtraction` (type: `boolean`):

If enabled, the scraper will also extract phone numbers found on the pages.

## `enableSocialMediaExtraction` (type: `boolean`):

If enabled, the scraper will detect and extract social media profile links (e.g., LinkedIn, Twitter, Facebook).

## `proxySettings` (type: `object`):

Configuration for proxies. Using residential proxies is highly recommended to avoid blocking.

## Actor input object example

```json
{
  "targetUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "enablePhoneExtraction": true,
  "enableSocialMediaExtraction": true,
  "proxySettings": {
    "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 = {
    "targetUrls": [
        {
            "url": "https://apify.com"
        }
    ],
    "proxySettings": {
        "useApifyProxy": true
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("scrapers-hub/website-phone-number-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 = {
    "targetUrls": [{ "url": "https://apify.com" }],
    "proxySettings": { "useApifyProxy": True },
}

# Run the Actor and wait for it to finish
run = client.actor("scrapers-hub/website-phone-number-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 '{
  "targetUrls": [
    {
      "url": "https://apify.com"
    }
  ],
  "proxySettings": {
    "useApifyProxy": true
  }
}' |
apify call scrapers-hub/website-phone-number-scraper --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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