# Fast Website Contact Extractor (`microautomationlab/fast-website-contact-extractor`) Actor

Extract public emails, phone numbers, social profiles, and contact pages from up to five HTML pages.

- **URL**: https://apify.com/microautomationlab/fast-website-contact-extractor.md
- **Developed by:** [microautomation lab](https://apify.com/microautomationlab) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.50 / 1,000 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/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

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

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Fast Website Contact Extractor

Extract public contact information from one website with a small, predictable HTTP-only crawl. Each successful run writes one record to the Default Dataset.

### What it extracts

- Email addresses, including `mailto:` links.
- Phone numbers, including `tel:` links.
- Public Facebook, Instagram, LinkedIn, X/Twitter, YouTube, TikTok, Pinterest, and Threads profile URLs.
- Same-site Contact/About-style page URLs actually found in page links.
- The exact source page URL for every email, phone number, and social link.

Duplicate contact values and duplicate page URLs are removed. The first page on which a value is found is retained as its `sourceUrl`.

### Input

Provide exactly one absolute HTTP or HTTPS URL:

```json
{ "url": "https://example.com/" }
```

The Actor is for public websites only. **1 run = 1 website**; bulk URL input is not supported. URLs containing credentials are rejected.

### How it works

The Actor fetches the input page using normal HTTP, discovers same-origin Contact/About-style links present in the HTML, and checks those links in discovery order. It checks a maximum of 5 HTML pages total, never intentionally crawls external domains, never guesses an unlimited list of paths, and never fetches the same scheduled URL twice.

This is HTTP-only extraction. JavaScript is not executed. It is not a full-site crawler and does not use browser automation, Playwright, Puppeteer, proxies, AI/LLM, search engines, login, paid APIs, a database, or CRM integrations. It performs no email or SMTP verification. Extracted information comes only from publicly accessible pages returned by the website.

The whole run has a 15-second timeout, including response-body reads and the additional discovered pages.

### Output

```json
{
  "url": "https://example.com/",
  "emails": [{ "value": "hello@example.com", "sourceUrl": "https://example.com/contact" }],
  "phones": [{ "value": "+1 212 555 0100", "sourceUrl": "https://example.com/contact" }],
  "socialLinks": [{ "url": "https://linkedin.com/company/example", "sourceUrl": "https://example.com/" }],
  "contactPages": ["https://example.com/contact"],
  "sourcePages": ["https://example.com/", "https://example.com/contact"],
  "pagesChecked": 2,
  "httpStatus": 200,
  "finalUrl": "https://example.com/"
}
```

`httpStatus` and `finalUrl` describe the top-page response. `sourcePages` contains successfully processed HTML pages. An empty contact result is a valid success and uses empty arrays.

### Pricing

This Actor uses pay-per-event pricing: **$0.00005** for each Actor Start and **$0.00050** for the `result` event. A successful run produces one dataset record and charges the `result` event once. Failed runs do not produce a result record. Volume discounts are currently off.

### Errors

Input or fetch failures end the run with exit code 1 and do not write incomplete success data to the Default Dataset.

| Code | Meaning |
| --- | --- |
| `INVALID_URL` | Missing or invalid absolute HTTP(S) input URL, or a URL containing credentials. |
| `HTTP_ERROR` | A requested page returned a non-2xx response. |
| `NETWORK_ERROR` | DNS, connection, TLS, or another fetch failure. |
| `TIMEOUT` | The run exceeded 15 seconds. |
| `NON_HTML` | A requested response was not HTML or XHTML. |

### Local development

Requires Node.js 22 or later and the Apify CLI.

```sh
npm install
npm test
npm run typecheck
npm run build
apify run --no-purge --input-file input.json
```

Do not use a production website for deterministic tests; the automated test suite uses local HTML fixtures and a local HTTP server.

# Actor input Schema

## `url` (type: `string`):

One absolute public HTTP or HTTPS URL.

## Actor input object example

```json
{
  "url": "https://example.com/"
}
```

# Actor output Schema

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

Default Dataset containing one result for the input website after a successful run.

# 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 = {
    "url": "https://example.com/"
};

// Run the Actor and wait for it to finish
const run = await client.actor("microautomationlab/fast-website-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 = { "url": "https://example.com/" }

# Run the Actor and wait for it to finish
run = client.actor("microautomationlab/fast-website-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 '{
  "url": "https://example.com/"
}' |
apify call microautomationlab/fast-website-contact-extractor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,microautomationlab/fast-website-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/gNtW4IgmUHZR68cZx/builds/W5TL8HguA2UHvsHbL/openapi.json
