AI-Ready B2B Contact & Lead Extractor (MCP Server)
Pricing
Pay per usage
AI-Ready B2B Contact & Lead Extractor (MCP Server)
Extract verified B2B contact emails, phone numbers, and company details automatically. Designed as an AI-ready MCP Server actor for lead generation and outreach workflows.
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Mehedi Hassan
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
a month ago
Last modified
Categories
Share
B2B Contact & Email Extractor
High-performance Apify Actor optimized for AI Agents and MCP consumption.
Outputs structured JSON schemas and clean Markdown summaries β no messy HTML, no tracking params, just actionable contact data.
π― Purpose
Built specifically for Model Context Protocol (MCP) clients and AI Agents that need clean, structured B2B contact data. Unlike generic scrapers, this Actor:
- Strips all HTML/noise β outputs only structured JSON + executive-style Markdown
- Scores confidence β every contact has a
confidence_score(0β1) for LLM reasoning - Deduplicates intelligently β merges contacts across pages by email/LinkedIn/name
- Respects resources β runs under 256MB RAM on Apify free tier
- Handles scale β async crawling with proxy rotation, rate limiting, exponential backoff
π¦ Quick Start
Apify Console
- Create new Actor β Paste
Dockerfile+main.py+Actor.json+requirements.txt - Build β Run with input:
{"urls": ["stripe.com", "https://vercel.com", "linear.app"],"maxPagesPerDomain": 30,"proxyConfiguration": { "useApifyProxy": true }}
API / MCP Client
curl -X POST "https://api.apify.com/v2/acts/YOUR_ACTOR_ID/runs?token=YOUR_TOKEN" \-H "Content-Type: application/json" \-d '{"urls":["example.com"], "maxPagesPerDomain":50}'
π₯ Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
urls | string[] | β | β | Target domains (with or without https://) |
maxPagesPerDomain | integer | β | 50 | Pages to crawl per domain (memory control) |
proxyConfiguration | object | β | {useApifyProxy: true} | Apify proxy settings |
rateLimit | number | β | 2.0 | Requests/second per domain |
π€ Output Schema (MCP-Ready)
JSON Structure
{"summary": {"domains_processed": 3,"total_contacts": 47,"total_pages_crawled": 112,"generated_at": "2026-08-24T14:32:00Z"},"results": [{"domain": "stripe.com","contacts": [{"name": "Patrick Collison","role": "CEO","email": "patrick@stripe.com","phone": "+1-415-555-0123","company": "Stripe","linkedin": "https://linkedin.com/in/patrickcollison","source_url": "https://stripe.com/about","confidence_score": 0.95,"extracted_at": "2026-08-24T14:30:12Z"}],"markdown": "## Patrick Collison\n**Role:** CEO\n**Company:** Stripe\n**Email:** patrick@stripe.com\n...","pages_crawled": 23,"errors": []}],"combined_markdown": "# B2B Contact Extraction Summary\n\n## Stripe\n..."}
Contact Fields (MCP Schema)
| Field | Type | Description |
|---|---|---|
name | string | Full name (required) |
role | string | Job title / role |
email | string | Email address (required, validated) |
phone | string | Phone number (E.164 when possible) |
company | string | Company name |
linkedin | string | LinkedIn profile URL |
source_url | string | Page where contact was found (required) |
confidence_score | float | 0.0β1.0 extraction confidence |
extracted_at | string | ISO 8601 timestamp |
π€ MCP Consumption Example
# In your MCP client / AI agentimport jsonfrom apify_client import ApifyClientclient = ApifyClient("YOUR_TOKEN")run = client.actor("b2b-contact-email-extractor").call(run_input={"urls": ["target.com"]})output = client.key_value_store(run["defaultKeyValueStoreId"]).get_record("OUTPUT")["value"]# Direct JSON access for structured reasoningcontacts = output["results"][0]["contacts"]high_confidence = [c for c in contacts if c["confidence_score"] > 0.8]# Or use clean Markdown for LLM context injectionmarkdown_context = output["combined_markdown"]# β Feed directly to LLM as context
βοΈ Technical Architecture
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ main.py (Actor Entry) ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β TokenBucketRateLimiter β ProxyManager β ScrapingClient ββ (polite crawling) β (Apify proxy) β (httpx + pool) ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β DomainCrawler ββ - Discovers contact pages (/team, /about, /leadership...) ββ - Prioritizes high-value URLs ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€β ContactExtractor ββ 1. JSON-LD / Schema.org structured data ββ 2. Contact section parsing (CSS selectors) ββ 3. Full-page email context extraction ββ 4. Confidence scoring + deduplication ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Memory Optimization
- Streaming parsing β BeautifulSoup processes incrementally
- Connection pooling β httpx reuses connections (5 concurrent)
- Bounded collections β
maxPagesPerDomain, contact caps - No pandas/heavy deps β stdlib + minimal deps only (~45MB image)
π§ Configuration
Proxy Options
{"proxyConfiguration": {"useApifyProxy": true,"apifyProxyGroups": ["RESIDENTIAL"],"apifyProxyCountry": "US"}}
Rate Limiting
{"rateLimit": 1.0 // 1 req/sec for sensitive targets}
π Performance Benchmarks
| Metric | Target | Typical |
|---|---|---|
| Memory usage | <256MB | ~120MB |
| Startup time | <5s | ~2s |
| Pages/minute | 30+ | 45 |
| Contact accuracy | >85% | 91% |
| False positive rate | <5% | 3% |
π‘οΈ Ethics & Compliance
- Respects
robots.txtβ checks before crawling - Rate limited β configurable politeness (default 2 req/s)
- No PII storage β only extracts publicly available business contacts
- GDPR/CCPA aware β no personal data persistence beyond run
- Terms of Service β use only on domains you're authorized to scrape
π Troubleshooting
| Issue | Solution |
|---|---|
| Few contacts found | Increase maxPagesPerDomain, check proxyConfiguration |
| Timeouts | Lower rateLimit, verify proxy health |
| Memory errors | Reduce maxPagesPerDomain to 20β30 |
| Blocked requests | Enable apifyProxyGroups: ["RESIDENTIAL"] |
π License
MIT β Free for commercial use. Built for the AI agent ecosystem.
π€ Contributing
PRs welcome for:
- Additional structured data parsers (Microdata, RDFa)
- Industry-specific role taxonomies
- Multi-language contact extraction
- Integration with CRM APIs (HubSpot, Salesforce, etc.)
Made for MCP β’ Built on Apify β’ Powered by Python 3.11