Website Contact, Social Links & DNS MX Scraper avatar

Website Contact, Social Links & DNS MX Scraper

Pricing

Pay per usage

Go to Apify Store
Website Contact, Social Links & DNS MX Scraper

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

luochengfengqi

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a month ago

Last modified

Categories

Features

Limited permissions

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

  1. Extraction Pipeline & Supported Protocols
  2. Input Formats & Input Parameters
  3. Output Schema & Field Reference
  4. Error and Empty-Result Handling
  5. Usage Examples (Console, cURL, Python, Node.js)
  6. 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:

StageSource / ProtocolExtracted Entities & Normalization Rules
1. Entry Page HTTP FetchGET 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 ParserHTML 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, /legalScores 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 DisclosureGET /.well-known/security.txtParses Contact:, Policy:, and Expires: directives from official security disclosure files.
6. Social Profile Classifier12 Social NetworksNormalizes 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 AuditDNS MX, TXT (SPF), _dmarc TXTQueries 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.com or https://posthog.com/contact
  • Bare Domain Name: plausible.io or cal.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

ParameterTypeDefaultRequiredDescription
urlsstring[]["https://apify.com", "https://posthog.com", "https://plausible.io", "https://cal.com"]NoList of website URLs or bare domain names to inspect.
maxPagesPerDomaininteger5NoMaximum number of internal pages to fetch per domain (1 to 15), prioritized by contact, about, privacy, legal, and security paths.
checkSecurityTxtbooleantrueNoFetches /.well-known/security.txt (RFC 9116) and extracts security contact emails and policy URLs.
resolveDnsRecordsbooleantrueNoQueries DNS MX, SPF, and _dmarc TXT records to verify domain mail server configuration and provider identity.
sameDomainEmailsOnlybooleanfalseNoWhen true, discards third-party domain emails and retains only addresses matching the target root domain or its subdomains.
excludeRoleEmailsbooleanfalseNoWhen true, excludes generic department prefixes (support@, sales@, privacy@, info@) from the primary emails array while keeping them in roleEmails.
maxConcurrencyinteger4NoMaximum 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

FieldTypeNullableDescription
statusstringNo"OK" when the entry page was fetched and parsed, or "NOT_FOUND_OR_ERROR" on failure.
inputstringNoOriginal URL or domain string from the urls input array.
domainstringNoNormalized lowercase root domain (without www.).
canonicalUrlstringYesFinal URL after HTTP redirects on the entry request.
siteTitlestringYesCleaned <title> text from the entry page.
siteDescriptionstringYesCleaned <meta name="description"> or og:description text.
organizationNamestringYesOrganization name extracted from JSON-LD Organization, OpenGraph og:site_name, or domain fallback.
emailsstring[]NoDeduplicated list of validated email addresses (filtered by sameDomainEmailsOnly and excludeRoleEmails).
firstPartyEmailsstring[]NoEmail addresses whose domain matches domain or a subdomain of domain.
personalEmailsstring[]NoNon-role email addresses (for example, individual founder or staff addresses).
roleEmailsstring[]NoDepartment and role addresses (support@, sales@, privacy@, security@, hello@, careers@, legal@).
emailSourcesobject[]NoProvenance array recording email, category ("role" or "personal"), isFirstParty, foundOnUrl, and extractionMethod ("mailto-link", "json-ld", "cloudflare-cfemail", "security.txt", "deobfuscated-text", "html-pattern").
phonesstring[]NoDeduplicated phone numbers extracted from tel: links and JSON-LD telephone properties.
addressesstring[]NoPostal addresses formatted from JSON-LD PostalAddress blocks.
socialProfilesobjectNoKeyed object containing deduplicated profile URLs for linkedin, twitter, github, youtube, instagram, facebook, tiktok, discord, telegram, threads, mastodon, and bluesky.
socialProfileCountintegerNoTotal count of unique social media profile URLs across all 12 networks.
contactFormUrlsstring[]NoDiscovered internal contact, support, or inquiry page URLs.
securityTxtobjectYesParsed RFC 9116 /.well-known/security.txt metadata (found, url, contacts, policy, expires), or null if absent.
dnsMailobjectYesDNS mail profile containing hasMx, mxProvider, primaryMxExchange, mxRecords, hasSpf, spfRecord, hasDmarc, dmarcPolicy, and dmarcRecord.
crawledUrlsstring[]NoExact internal URLs fetched during the domain crawl.
pagesCrawledCountintegerNoNumber of HTML pages fetched for this domain.
httpStatusintegerYesHTTP status code returned by the entry page.
messagestringYesDiagnostic error reason when status is "NOT_FOUND_OR_ERROR", otherwise null.
scrapedAtstringNoISO-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)

  1. Open the Actor page in Apify Console.
  2. Enter one or more website URLs or bare domains in Website URLs or Domains (urls).
  3. Optionally adjust Max Pages per Domain (maxPagesPerDomain) and toggle Same-Domain Emails Only (sameDomainEmailsOnly).
  4. 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 ApifyClient
client = 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, Cloudflare data-cfemail attributes, or /.well-known/security.txt. It does not guess email patterns or query third-party people databases.
  • DNS Verification Scope: dnsMail verifies domain-level mail server readiness (MX, SPF, DMARC) via authoritative DNS lookups rather than opening outbound port-25 SMTP RCPT TO handshakes, which are blocked by default on cloud container networks.