Building a reliable B2B lead enrichment pipeline in 2026 is much harder than simply running requests.get() on a list of URLs. Most modern company websites split their contact details across /contact, /about-us, footer obfuscation (info [at] company.com), and mailto: / tel: attributes.
In this guide, I will walk through how to build a high-concurrency Python B2B Website Email, Phone & Social Media Scraper that extracts decision-maker contact info and exports directly to a formatted Excel / CSV dashboard.
âš¡ Quick Links (Cloud API, Open-Source & Pro Suite)
If you want to run this immediately in the cloud or download the full multi-threaded CLI + Excel VBA reporting suite:
- â˜ï¸ Run on Apify Cloud (No setup, Pay-Per-Result
$0.002/lead+$5Free Credit): B2B Website Email, Phone & Social Media Scraper on Apify Store - 📦 Download Full Standalone Pro Suite (
$14.99on Gumroad): Python B2B Lead Scraper, Email Extractor & Excel VBA Automation Suite Pro - 💻 GitHub Open-Source Repository: tungnguyen84/b2b-lead-scraper-automation-suite
- 🤠Need a Custom Scraper or B2B Lead List?: Hire me on Fiverr (
@tungnguyen84— 5.0★ Rated)
🧠Architecture of a High-Accuracy B2B Contact Crawler
A production B2B contact extractor needs 4 stages:
-
Homepage Fetch & Metadata Extraction: Grab
<title>,<meta name="description">, and visible text from the landing page. -
Smart Contact Page Discovery: Automatically detect internal links matching
/contact,/about,/team, or/supportand crawl them concurrently. -
Regex + De-obfuscation + False-Positive Filtering: Strip out junk asset matches (
logo@2x.png,sentry@domain.com,example@domain.com) while capturingmailto:and visible emails. -
Social Profile Normalization: Match canonical company profiles on LinkedIn (
/company/), Twitter/X, Facebook, Instagram, YouTube, and TikTok.
Core Python Implementation
import re
from urllib.parse import urljoin, urlparse
import requests
from bs4 import BeautifulSoup
EMAIL_REGEX = re.compile(r'[a-zA-Z0-9._%+\-]+@[a-zA-Z0-9.\-]+\.[a-zA-Z]{2,}')
IGNORE_DOMAINS = {'sentry.io', 'example.com', 'domain.com', 'wixpress.com', 'cloudflare.com'}
IGNORE_EXTS = ('.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.css', '.js')
SOCIAL_PATTERNS = {
'linkedin': re.compile(r'https?://(?:www\.)?linkedin\.com/(?:company|in)/[a-zA-Z0-9_\-]+', re.I),
'twitter': re.compile(r'https?://(?:www\.)?(?:twitter\.com|x\.com)/[a-zA-Z0-9_]+', re.I),
'facebook': re.compile(r'https?://(?:www\.)?facebook\.com/[a-zA-Z0-9.\-_]+', re.I),
'instagram': re.compile(r'https?://(?:www\.)?instagram\.com/[a-zA-Z0-9._]+', re.I),
}
def clean_emails(raw_text: str) -> list[str]:
found = set()
for match in EMAIL_REGEX.findall(raw_text):
email = match.lower().strip('.')
if email.endswith(IGNORE_EXTS):
continue
domain = email.split('@')[-1]
if domain in IGNORE_DOMAINS:
continue
found.add(email)
return sorted(found)
def scrape_b2b_domain(url: str) -> dict:
resp = requests.get(url, timeout=15, headers={'User-Agent': 'Mozilla/5.0'})
soup = BeautifulSoup(resp.text, 'html.parser')
combined_html = resp.text
# Follow /contact or /about link if present
for a in soup.find_all('a', href=True):
href = a['href'].lower()
if any(k in href for k in ('/contact', '/about', '/impressum')):
sub_url = urljoin(url, a['href'])
if urlparse(sub_url).netloc == urlparse(url).netloc:
try:
combined_html += "\n" + requests.get(sub_url, timeout=10).text
except Exception:
pass
break
emails = clean_emails(combined_html)
socials = {
name: sorted(set(pattern.findall(combined_html)))
for name, pattern in SOCIAL_PATTERNS.items()
}
return {
'url': url,
'title': soup.title.string.strip() if soup.title and soup.title.string else '',
'emails': emails,
'socials': socials,
}
🚀 Scaling to 10,000+ Domains via Apify Cloud API
If you don't want to manage proxies, concurrency, or headless browsers locally, I published a ready-to-run Cloud Actor on the Apify Store that handles batch URLs, automatic contact page traversal, and structured JSON/CSV/Excel dataset export:
- 🔗 Apify Actor:
tungnguyen84/b2b-website-email-phone-social-scraper - 🔠Bonus SEO + Sitemap Lead Auditor:
tungnguyen84/website-sitemap-seo-audit-email-scraper
Or grab the Standalone Python + Excel VBA Pro Suite on Gumroad:
👉 Download Python B2B Lead Scraper & Excel VBA Suite Pro ($14.99)
🌐 Live REST APIs on RapidAPI Hub & Instant Download Store
-
RapidAPI Hub (Free Tier
BASIC $0.00/mo->PRO $9.99/mo): - Payhip Instant Download Store (PayPal / Card):
Top comments (0)