# Website Contact + Social Link Extractor (`isotonic/website-contact-social-link-extractor`) Actor

Extract public emails, phone numbers, contact pages, booking links, and social profiles from business websites in bulk for lead enrichment.

- **URL**: https://apify.com/isotonic/website-contact-social-link-extractor.md
- **Developed by:** [Brian Keefe](https://apify.com/isotonic) (community)
- **Categories:** Lead generation, Business, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 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 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-social-link-extractor

Production-oriented Apify Actor for shallow crawling of public websites to extract contact details, company clues, and social profile links.

It is intentionally narrow:

- Public data only
- No login, no session bypassing, no protected pages
- Best suited for company websites, agency sites, startup sites, directories, and public landing pages

### What It Extracts

- Emails
- Phone numbers
- Contact form URLs
- Contact page URLs
- About, team, and legal/privacy page URLs
- Social profile URLs for LinkedIn, X, Twitter, Facebook, Instagram, YouTube, TikTok, and GitHub
- Schema.org organization clues and company-name hints
- Page title and meta description
- Confidence score and crawl metadata
- Source evidence showing where each signal was found

### Input

Use `startUrls`, `domains`, or row-oriented inputs: `googleMapsRows`, `businessRows`, `shopifyRows`, `serpRows`, and generic `rows`.

Supported row fields are intentionally CSV-friendly: `website`, `url`, `domain`, `link`, `displayedLink`, `storeUrl`, `shopDomain`, `shopifyDomain`, and `sourceUrl`.

All seeds are normalized to public site homepages and deduped by site.

Example:

```json
{
  "googleMapsRows": [{ "name": "Example Co", "website": "https://example.com" }],
  "serpRows": [{ "title": "Example Org Contact", "link": "https://example.org/contact" }],
  "rows": [{ "domain": "example.net" }],
  "maxPagesPerSite": 8,
  "maxDepth": 1,
  "maxConcurrency": 10,
  "requestTimeoutSecs": 20
}
```

See `examples/sample-input.json`.

### Output

The actor writes one record per site to the Apify Dataset.

Example:

```json
{
  "inputSource": "https://example.com",
  "siteUrl": "https://example.com/",
  "domain": "example.com",
  "title": "Example Company",
  "metaDescription": "Example Company public contact page.",
  "emails": ["hello@example.com"],
  "phones": ["+14155550101"],
  "contactFormUrls": ["https://example.com/contact"],
  "contactPageUrls": ["https://example.com/contact"],
  "aboutPageUrls": ["https://example.com/about"],
  "teamPageUrls": ["https://example.com/team"],
  "legalPageUrls": ["https://example.com/privacy"],
  "socialProfiles": {
    "linkedin": ["https://www.linkedin.com/company/example-company"],
    "x": ["https://x.com/examplecompany"],
    "twitter": [],
    "facebook": [],
    "instagram": [],
    "youtube": [],
    "tiktok": [],
    "github": []
  },
  "schemaOrg": {
    "types": ["Organization"],
    "names": ["Example Company LLC"],
    "sameAs": ["https://www.linkedin.com/company/example-company"]
  },
  "companyClues": {
    "names": ["Example Company", "Example Company LLC"],
    "legalMentions": ["Example Company LLC"]
  },
  "pagesCrawled": 4,
  "crawl": {
    "pagesCrawled": 4,
    "maxPagesPerSite": 8,
    "maxDepth": 1,
    "sameHostOnly": true,
    "shallow": true
  },
  "confidenceScore": 0.95,
  "evidence": {
    "emails": [{ "value": "hello@example.com", "sourceUrl": "https://example.com/contact" }]
  }
}
```

See `examples/sample-output.json`.

### Crawl Strategy

- Seeds each site with `/`, `/contact`, `/contact-us`, `/about`, `/about-us`, and `/team`
- Follows same-host links only
- Prioritizes contact/about/team/legal-like links
- Stays shallow through `maxDepth`
- Caps work per site with `maxPagesPerSite`
- Surfaces crawl metadata in each result for easier QA downstream

### Local Development

Install dependencies:

```bash
npm install
```

Run the actor locally with Apify local storage:

```bash
npm start
```

Run tests:

```bash
npm test
```

Run deterministic smoke verification against a local HTML fixture server:

```bash
npm run smoke
```

Run with Apify CLI:

```bash
npx --yes apify-cli run
```

### Notes

- The actor does not attempt to bypass access controls.
- The actor is intended for generic public website extraction, not scraping protected platforms.
- Some websites hide contact details behind JavaScript apps or images; those cases may produce partial results.

# Actor input Schema

## `startUrls` (type: `array`):

Seed URLs to crawl. Typically website homepages.

## `domains` (type: `array`):

Domain names to crawl. The actor normalizes them to public site URLs.

## `googleMapsRows` (type: `array`):

Rows from Google Maps or local business exports. Supported fields include website, url, and domain.

## `businessRows` (type: `array`):

Generic business records. Supported fields include website, url, domain, or sourceUrl.

## `shopifyRows` (type: `array`):

Shopify or storefront records. Supported fields include website, domain, storeUrl, shopDomain, or shopifyDomain.

## `serpRows` (type: `array`):

Search result rows. Supported fields include link, displayedLink, website, url, or domain.

## `rows` (type: `array`):

Generic CSV-like records with website, url, domain, link, displayedLink, or sourceUrl fields.

## `maxPagesPerSite` (type: `integer`):

Maximum number of public pages to inspect per site during the shallow crawl.

## `maxDepth` (type: `integer`):

Maximum same-host link depth from each seed URL.

## `maxConcurrency` (type: `integer`):

Crawler concurrency limit.

## `requestTimeoutSecs` (type: `integer`):

Per-page timeout in seconds for public page fetches.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "domains": [
    "example.com"
  ],
  "googleMapsRows": [
    {
      "name": "Example Coffee",
      "website": "https://example.com"
    }
  ],
  "businessRows": [
    {
      "company": "Example Org",
      "domain": "example.org"
    }
  ],
  "shopifyRows": [
    {
      "shopDomain": "example-store.com"
    }
  ],
  "serpRows": [
    {
      "title": "Example Result",
      "link": "https://example.net/contact"
    }
  ],
  "rows": [
    {
      "website": "https://example.io"
    }
  ],
  "maxPagesPerSite": 8,
  "maxDepth": 1,
  "maxConcurrency": 10,
  "requestTimeoutSecs": 20
}
```

# 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 = {
    "startUrls": [
        {
            "url": "https://example.com"
        }
    ],
    "domains": [
        "example.com"
    ],
    "googleMapsRows": [
        {
            "name": "Example Coffee",
            "website": "https://example.com"
        }
    ],
    "businessRows": [
        {
            "company": "Example Org",
            "domain": "example.org"
        }
    ],
    "shopifyRows": [
        {
            "shopDomain": "example-store.com"
        }
    ],
    "serpRows": [
        {
            "title": "Example Result",
            "link": "https://example.net/contact"
        }
    ],
    "rows": [
        {
            "website": "https://example.io"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("isotonic/website-contact-social-link-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 = {
    "startUrls": [{ "url": "https://example.com" }],
    "domains": ["example.com"],
    "googleMapsRows": [{
            "name": "Example Coffee",
            "website": "https://example.com",
        }],
    "businessRows": [{
            "company": "Example Org",
            "domain": "example.org",
        }],
    "shopifyRows": [{ "shopDomain": "example-store.com" }],
    "serpRows": [{
            "title": "Example Result",
            "link": "https://example.net/contact",
        }],
    "rows": [{ "website": "https://example.io" }],
}

# Run the Actor and wait for it to finish
run = client.actor("isotonic/website-contact-social-link-extractor").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 '{
  "startUrls": [
    {
      "url": "https://example.com"
    }
  ],
  "domains": [
    "example.com"
  ],
  "googleMapsRows": [
    {
      "name": "Example Coffee",
      "website": "https://example.com"
    }
  ],
  "businessRows": [
    {
      "company": "Example Org",
      "domain": "example.org"
    }
  ],
  "shopifyRows": [
    {
      "shopDomain": "example-store.com"
    }
  ],
  "serpRows": [
    {
      "title": "Example Result",
      "link": "https://example.net/contact"
    }
  ],
  "rows": [
    {
      "website": "https://example.io"
    }
  ]
}' |
apify call isotonic/website-contact-social-link-extractor --silent --output-dataset

```

## MCP server setup

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

```

## OpenAPI specification

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