# Universal Contact Extractor (`rl1987/universal-contact-extractor`) Actor

Extract phone numbers, emails and social media URLs from web pages.

- **URL**: https://apify.com/rl1987/universal-contact-extractor.md
- **Developed by:** [R.L.](https://apify.com/rl1987) (community)
- **Categories:** Social media
- **Stats:** 22 total users, 0 monthly users, 47.4% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 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/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

### Universal Contact Extractor

This Apify Actor goes through web pages and extracts contact data:

- Email addresses
- Phone numbers
- LinkedIn profile URLs (company or individual)
- Facebook profile URLs
- Discord user URLs
- Github profile URLs

#### Input

The following input parameters are supported:

- `start_urls` - list of URLs to start the scraping.
- `phone_country` - 2-letter country code (to be used for phone number matching)
- `max_depth` - max crawling depth (set to 0 to disable link traversal).

Full example of the input:

```json
{
    "start_urls": [
        {
            "url": "https://www.whitehouse.gov/"
        }
    ],
    "phone_country": "US",
    "max_depth": 1
}
```

#### Output

Full example of the output:

|    | contact                               | contact\_type   | url                               |
|---:|:--------------------------------------|:---------------|:----------------------------------|
|  0 | https://x.com/whitehouse              | x\_url          | https://www.whitehouse.gov        |
|  1 | https://www.instagram.com/whitehouse/ | instagram\_url  | https://www.whitehouse.gov        |
|  2 | (202) 225-1904                        | phone\_no       | https://www.whitehouse.gov/visit/ |
|  3 | (202) 456-7041                        | phone\_no       | https://www.whitehouse.gov/visit/ |
|  4 | (202) 224-3121                        | phone\_no       | https://www.whitehouse.gov/visit/ |
|  5 | https://instagram.com/whitehouse/     | instagram\_url  | https://www.whitehouse.gov/wire/  |

For the purpose of the billing, one contact is one result.

#### n8n integration

Use the [`n8n-nodes-contact-extractor`](https://www.npmjs.com/package/n8n-nodes-contact-extractor) community node ([source](https://github.com/rl1987/n8n-nodes-contact-extractor)) to run this Actor directly from an n8n workflow.

### Cyber recon toolkit

Part of the **Cyber recon toolkit** — OSINT, attack-surface recon, and vulnerability-intel data collection for security research:

- [Bugcrowd Scraper](https://apify.com/rl1987/bugcrowd-scraper) — Scrapes public Bugcrowd data: disclosed submissions, program directory, leaderboard.
- [HackerOne Scraper](https://apify.com/rl1987/hackerone-scraper) — Scrapes public HackerOne data: Hacktivity disclosed reports, program directory, researcher leaderboard.
- [Intigriti Scraper](https://apify.com/rl1987/intigriti-scraper) — Scrapes public Intigriti data: bug bounty/VDP program directory, researcher leaderboard and profiles.
- [CVE Scraper](https://apify.com/rl1987/cve-scraper) — CVE.org vulnerability info scraper.
- [TLSX - TLS Data Gathering and Analysis](https://apify.com/rl1987/pd-tlsx) — Fast, configurable TLS grabber for TLS-based data collection and analysis.
- [BGP.HE.NET Recon Scraper](https://apify.com/rl1987/bgphenet-scraper) — Scrapes ASN, prefix, IP, and DNS recon data from bgp.he.net.
- [gau - Get All URLs](https://apify.com/rl1987/gau-wrapper) — Fetch known URLs from Wayback Machine, Common Crawl, AlienVault OTX, and URLScan.
- [Git Email Extractor](https://apify.com/rl1987/git-email-extractor) — Shallow-clones git repos and extracts contributor emails from commit history.
- [Wappalyzer Technology Lookup](https://apify.com/rl1987/wappalyzer-tech-lookup) — Detect the technology stack behind any website using Wappalyzer.
- [Meta Tags Scraper](https://apify.com/rl1987/meta-tags-scraper) — Web page metadata scraper (meta tags, Open Graph, Twitter Card).
- [Web Text Extractor](https://apify.com/rl1987/web-text-extractor) — Extract clean text or Markdown content from web pages.

# Actor input Schema

## `start_urls` (type: `array`):

URLs to start with

## `max_depth` (type: `integer`):

Max crawling depth (set 0 to disable link traversal)

## `phone_country` (type: `string`):

Phone number format country (used to autodetect phone numbers in text) - 2 letter code

## Actor input object example

```json
{
  "start_urls": [
    {
      "url": "https://www.whitehouse.gov/"
    }
  ],
  "max_depth": 0,
  "phone_country": "US"
}
```

# 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 = {
    "start_urls": [
        {
            "url": "https://www.whitehouse.gov/"
        }
    ],
    "max_depth": 0,
    "phone_country": "US"
};

// Run the Actor and wait for it to finish
const run = await client.actor("rl1987/universal-contact-extractor").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 = {
    "start_urls": [{ "url": "https://www.whitehouse.gov/" }],
    "max_depth": 0,
    "phone_country": "US",
}

# Run the Actor and wait for it to finish
run = client.actor("rl1987/universal-contact-extractor").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 '{
  "start_urls": [
    {
      "url": "https://www.whitehouse.gov/"
    }
  ],
  "max_depth": 0,
  "phone_country": "US"
}' |
apify call rl1987/universal-contact-extractor --silent --output-dataset

```

## MCP server setup

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

```

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/5Umk61deLrKtcblFZ/builds/lIVOivWsCqJTg6h8f/openapi.json
