Website Contact, Social Links & DNS MX Scraper
Pricing
Pay per usage
Website Contact, Social Links & DNS MX Scraper
Extracts email addresses, phone numbers, social media profiles, JSON-LD organization metadata, security.txt contacts, and DNS mail server (MX, SPF, DMARC) records across websites using direct HTTP and DNS lookups without a browser.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
luochengfengqi
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
a month ago
Last modified
Categories
Features
Share
Website Contact, Social Links & DNS MX Scraper extracts email addresses, phone numbers, social media profiles, application/ld+json organization metadata, RFC 9116 /.well-known/security.txt disclosures, and DNS mail server (MX, SPF, DMARC) records across company websites.
Unlike browser-based crawlers that launch Chromium instances for every URL, this Actor operates over direct HTTP and native Node.js DNS resolution (node:dns/promises). It parses entry pages, follows internal contact, about, legal, privacy, and security links up to a configurable depth, decodes Cloudflare email protection (data-cfemail) hex payloads, and verifies whether the target domain is configured to receive email via active MX records.
Table of Contents
- Extraction Pipeline & Supported Protocols
- Input Formats & Input Parameters
- Output Schema & Field Reference
- Error and Empty-Result Handling
- Usage Examples (Console, cURL, Python, Node.js)
- Limitations and Notes
Extraction Pipeline & Supported Protocols
For each unique domain in the urls list, the Actor executes a multi-stage extraction and verification pipeline:
| Stage | Source / Protocol | Extracted Entities & Normalization Rules |
|---|---|---|
| 1. Entry Page HTTP Fetch | GET https://<domain>/ | Resolves HTTP redirects to the canonical URL, extracts <title>, <meta name="description">, and OpenGraph og:site_name. |
| 2. JSON-LD Schema.org Graph | <script type="application/ld+json"> | Parses Organization, Corporation, LocalBusiness, WebSite, and ContactPoint nodes for name, email, telephone, address, and sameAs social profile arrays. |
| 3. Link & Obfuscation Parser | HTML DOM (cheerio) | Extracts mailto: and tel: links, decodes Cloudflare data-cfemail and /cdn-cgi/l/email-protection# XOR hex strings, and de-obfuscates [at] / [dot] text patterns. |
| 4. Priority Internal Subpages | /contact, /about, /privacy, /security, /legal | Scores internal links discovered on the entry page and crawls up to maxPagesPerDomain high-signal pages to capture contacts not listed on the homepage. |
| 5. RFC 9116 Security Disclosure | GET /.well-known/security.txt | Parses Contact:, Policy:, and Expires: directives from official security disclosure files. |
| 6. Social Profile Classifier | 12 Social Networks | Normalizes and deduplicates profile handles across LinkedIn, X/Twitter, GitHub, YouTube, Instagram, Facebook, TikTok, Discord, Telegram, Threads, Mastodon, and Bluesky while stripping share/intent/post links. |
| 7. DNS Mail Deliverability Audit | DNS MX, TXT (SPF), _dmarc TXT | Queries authoritative DNS records to confirm active mail servers, classify the email provider (Google Workspace, Microsoft 365, Proton Mail, Fastmail, Amazon SES / WorkMail, etc.), and inspect SPF and DMARC policies (none, quarantine, reject). |
Input Formats & Input Parameters
Accepted Input Formats (urls)
Each entry in urls can be provided in any of the following formats:
- Full Website URL:
https://apify.comorhttps://posthog.com/contact - Bare Domain Name:
plausible.ioorcal.com - Prefixed Domain:
domain:supabase.com
If multiple URLs resolve to the same root domain, the Actor automatically deduplicates them so each domain is processed and charged at most once per run.
Input Parameters
| Parameter | Type | Default | Required | Description |
|---|---|---|---|---|
urls | string[] | ["https://apify.com", "https://posthog.com", "https://plausible.io", "https://cal.com"] | No | List of website URLs or bare domain names to inspect. |
maxPagesPerDomain | integer | 5 | No | Maximum number of internal pages to fetch per domain (1 to 15), prioritized by contact, about, privacy, legal, and security paths. |
checkSecurityTxt | boolean | true | No | Fetches /.well-known/security.txt (RFC 9116) and extracts security contact emails and policy URLs. |
resolveDnsRecords | boolean | true | No | Queries DNS MX, SPF, and _dmarc TXT records to verify domain mail server configuration and provider identity. |
sameDomainEmailsOnly | boolean | false | No | When true, discards third-party domain emails and retains only addresses matching the target root domain or its subdomains. |
excludeRoleEmails | boolean | false | No | When true, excludes generic department prefixes (support@, sales@, privacy@, info@) from the primary emails array while keeping them in roleEmails. |
maxConcurrency | integer | 4 | No | Maximum number of domains processed concurrently (1 to 10). |
Example Input JSON
{"urls": ["https://apify.com","https://posthog.com","https://plausible.io","https://cal.com"],"maxPagesPerDomain": 5,"checkSecurityTxt": true,"resolveDnsRecords": true,"sameDomainEmailsOnly": false,"excludeRoleEmails": false,"maxConcurrency": 4}
Output Schema & Field Reference
Sample Dataset Record
{"status": "OK","input": "https://apify.com","domain": "apify.com","canonicalUrl": "https://apify.com/","siteTitle": "Apify: Full-stack web scraping and data extraction platform","siteDescription": "Cloud platform for web scraping, browser automation, AI agents, and data for AI. Use 10,000+ ready-made tools, code templates, or order a custom solution.","organizationName": "Apify","emails": ["support@apify.com","hello@apify.com","security@apify.com"],"firstPartyEmails": ["support@apify.com","hello@apify.com","security@apify.com"],"personalEmails": [],"roleEmails": ["support@apify.com","hello@apify.com","security@apify.com"],"emailSources": [{"email": "support@apify.com","category": "role","isFirstParty": true,"foundOnUrl": "https://apify.com/","extractionMethod": "html-pattern"},{"email": "hello@apify.com","category": "role","isFirstParty": true,"foundOnUrl": "https://apify.com/contact","extractionMethod": "mailto-link"},{"email": "security@apify.com","category": "role","isFirstParty": true,"foundOnUrl": "https://apify.com/.well-known/security.txt","extractionMethod": "security.txt"}],"phones": [],"addresses": ["Vodickova 704/36, 110 00 Prague 1, Czech Republic"],"socialProfiles": {"linkedin": ["https://www.linkedin.com/company/apify"],"twitter": ["https://x.com/apify"],"github": ["https://github.com/apify"],"youtube": ["https://www.youtube.com/apify"],"instagram": [],"facebook": [],"tiktok": [],"discord": ["https://discord.com/invite/jyEM2PRvMU"],"telegram": [],"threads": [],"mastodon": [],"bluesky": []},"socialProfileCount": 5,"contactFormUrls": ["https://apify.com/contact"],"securityTxt": {"found": true,"url": "https://apify.com/.well-known/security.txt","contacts": ["mailto:security@apify.com"],"policy": "https://apify.com/security","expires": "2027-01-01T00:00:00.000Z"},"dnsMail": {"hasMx": true,"mxProvider": "Google Workspace","primaryMxExchange": "aspmx.l.google.com","mxRecords": [{ "exchange": "aspmx.l.google.com", "priority": 1 },{ "exchange": "alt1.aspmx.l.google.com", "priority": 5 },{ "exchange": "alt2.aspmx.l.google.com", "priority": 5 },{ "exchange": "alt3.aspmx.l.google.com", "priority": 10 },{ "exchange": "alt4.aspmx.l.google.com", "priority": 10 }],"hasSpf": true,"spfRecord": "v=spf1 include:_spf.google.com ~all","hasDmarc": true,"dmarcPolicy": "reject","dmarcRecord": "v=DMARC1; p=reject; rua=mailto:dmarc@apify.com"},"crawledUrls": ["https://apify.com/","https://apify.com/contact","https://apify.com/about","https://apify.com/privacy","https://apify.com/security"],"pagesCrawledCount": 5,"httpStatus": 200,"message": null,"scrapedAt": "2026-10-21T05:00:00.000Z"}
Field Reference
| Field | Type | Nullable | Description |
|---|---|---|---|
status | string | No | "OK" when the entry page was fetched and parsed, or "NOT_FOUND_OR_ERROR" on failure. |
input | string | No | Original URL or domain string from the urls input array. |
domain | string | No | Normalized lowercase root domain (without www.). |
canonicalUrl | string | Yes | Final URL after HTTP redirects on the entry request. |
siteTitle | string | Yes | Cleaned <title> text from the entry page. |
siteDescription | string | Yes | Cleaned <meta name="description"> or og:description text. |
organizationName | string | Yes | Organization name extracted from JSON-LD Organization, OpenGraph og:site_name, or domain fallback. |
emails | string[] | No | Deduplicated list of validated email addresses (filtered by sameDomainEmailsOnly and excludeRoleEmails). |
firstPartyEmails | string[] | No | Email addresses whose domain matches domain or a subdomain of domain. |
personalEmails | string[] | No | Non-role email addresses (for example, individual founder or staff addresses). |
roleEmails | string[] | No | Department and role addresses (support@, sales@, privacy@, security@, hello@, careers@, legal@). |
emailSources | object[] | No | Provenance array recording email, category ("role" or "personal"), isFirstParty, foundOnUrl, and extractionMethod ("mailto-link", "json-ld", "cloudflare-cfemail", "security.txt", "deobfuscated-text", "html-pattern"). |
phones | string[] | No | Deduplicated phone numbers extracted from tel: links and JSON-LD telephone properties. |
addresses | string[] | No | Postal addresses formatted from JSON-LD PostalAddress blocks. |
socialProfiles | object | No | Keyed object containing deduplicated profile URLs for linkedin, twitter, github, youtube, instagram, facebook, tiktok, discord, telegram, threads, mastodon, and bluesky. |
socialProfileCount | integer | No | Total count of unique social media profile URLs across all 12 networks. |
contactFormUrls | string[] | No | Discovered internal contact, support, or inquiry page URLs. |
securityTxt | object | Yes | Parsed RFC 9116 /.well-known/security.txt metadata (found, url, contacts, policy, expires), or null if absent. |
dnsMail | object | Yes | DNS mail profile containing hasMx, mxProvider, primaryMxExchange, mxRecords, hasSpf, spfRecord, hasDmarc, dmarcPolicy, and dmarcRecord. |
crawledUrls | string[] | No | Exact internal URLs fetched during the domain crawl. |
pagesCrawledCount | integer | No | Number of HTML pages fetched for this domain. |
httpStatus | integer | Yes | HTTP status code returned by the entry page. |
message | string | Yes | Diagnostic error reason when status is "NOT_FOUND_OR_ERROR", otherwise null. |
scrapedAt | string | No | ISO-8601 UTC timestamp of when the domain record was produced. |
Key-Value Store SUMMARY Record
At the end of every run, the Actor writes an aggregate SUMMARY JSON object to the default Key-Value Store:
{"totalDomainsRequested": 4,"uniqueDomainsProcessed": 4,"domainsSucceeded": 4,"domainsFailed": 0,"totalPagesCrawled": 18,"totalEmailsExtracted": 16,"totalFirstPartyEmails": 15,"totalPhonesExtracted": 0,"totalSocialProfilesExtracted": 14,"domainsWithMx": 4,"domainsWithDmarc": 4,"domainsWithSecurityTxt": 2,"completedAt": "2026-10-21T05:00:05.000Z"}
Error and Empty-Result Handling
If a target domain does not resolve, times out, or returns an HTTP error without an HTML body, the Actor does not abort the batch. Instead, it writes a structured diagnostic record (status: "NOT_FOUND_OR_ERROR") and continues processing the remaining domains. Diagnostic records are never charged under Pay-Per-Event.
{"status": "NOT_FOUND_OR_ERROR","input": "https://nonexistent-domain-example-99999.com","domain": "nonexistent-domain-example-99999.com","canonicalUrl": null,"siteTitle": null,"siteDescription": null,"organizationName": null,"emails": [],"firstPartyEmails": [],"personalEmails": [],"roleEmails": [],"emailSources": [],"phones": [],"addresses": [],"socialProfiles": {"linkedin": [],"twitter": [],"github": [],"youtube": [],"instagram": [],"facebook": [],"tiktok": [],"discord": [],"telegram": [],"threads": [],"mastodon": [],"bluesky": []},"socialProfileCount": 0,"contactFormUrls": [],"securityTxt": null,"dnsMail": {"hasMx": false,"mxProvider": null,"primaryMxExchange": null,"mxRecords": [],"hasSpf": false,"spfRecord": null,"hasDmarc": false,"dmarcPolicy": null,"dmarcRecord": null},"crawledUrls": [],"pagesCrawledCount": 0,"httpStatus": null,"message": "Failed to fetch https://nonexistent-domain-example-99999.com/: fetch failed","scrapedAt": "2026-10-21T05:00:02.000Z"}
Usage Examples
1. Apify Console (Web UI)
- Open the Actor page in Apify Console.
- Enter one or more website URLs or bare domains in Website URLs or Domains (
urls). - Optionally adjust Max Pages per Domain (
maxPagesPerDomain) and toggle Same-Domain Emails Only (sameDomainEmailsOnly). - Click Start and export the resulting dataset as JSON, CSV, or Excel.
2. cURL (Synchronous Dataset API)
curl -X POST "https://api.apify.com/v2/acts/luochengfengqi~website-contact-scraper/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \-H "Content-Type: application/json" \-d '{"urls": ["https://apify.com", "https://posthog.com", "https://plausible.io"],"maxPagesPerDomain": 5,"checkSecurityTxt": true,"resolveDnsRecords": true}'
3. Python (apify-client)
from apify_client import ApifyClientclient = ApifyClient("YOUR_APIFY_TOKEN")run_input = {"urls": ["https://apify.com","https://posthog.com","https://plausible.io","https://cal.com",],"maxPagesPerDomain": 5,"checkSecurityTxt": True,"resolveDnsRecords": True,}run = client.actor("luochengfengqi/website-contact-scraper").call(run_input=run_input)for item in client.dataset(run["defaultDatasetId"]).iterate_items():if item["status"] == "OK":print(f"{item['domain']} ({item['dnsMail']['mxProvider']}): {item['emails']}")
4. Node.js (apify-client)
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: process.env.APIFY_TOKEN });const run = await client.actor('luochengfengqi/website-contact-scraper').call({urls: ['https://apify.com','https://posthog.com','https://plausible.io','https://cal.com',],maxPagesPerDomain: 5,checkSecurityTxt: true,resolveDnsRecords: true,});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items);
Limitations and Notes
- Direct HTTP Extraction Only: The Actor fetches raw HTML and plain-text endpoints via standard HTTP requests without executing client-side JavaScript in a headless browser. Websites protected by interactive Cloudflare Turnstile challenges or pages that render contact details solely after user interaction will not return dynamically injected DOM nodes.
- Publicly Published Contacts Only: The Actor only extracts email addresses and phone numbers published in public HTML, JSON-LD metadata,
mailto:/tel:anchors, Cloudflaredata-cfemailattributes, or/.well-known/security.txt. It does not guess email patterns or query third-party people databases. - DNS Verification Scope:
dnsMailverifies domain-level mail server readiness (MX,SPF,DMARC) via authoritative DNS lookups rather than opening outbound port-25SMTP RCPT TOhandshakes, which are blocked by default on cloud container networks.