How to Use Proxies for Lead Generation
Business lead generation from public directories, professional networks, and industry databases requires proxy infrastructure to collect data at the scale sales teams need. Proxies distribute requests to avoid rate limits and provide geographic targeting for region-specific business data.
**Disclaimer**: Comply with GDPR, CCPA, and CAN-SPAM regulations. Only collect publicly available business data. Review platform terms before data collection.
Lead Generation Architecture
import httpx
import time
import random@dataclass(frozen=True) class BusinessLead: company_name: str website: str industry: str location: str size_estimate: str source: str collected_at: str
def search_businesses( query: str, location: str, proxy: str, source_url: str, ) -> list[BusinessLead]: """Search business directories for leads.""" from datetime import datetime time.sleep(random.uniform(5.0, 12.0))
with httpx.Client(proxy=proxy, timeout=30, follow_redirects=True) as client: resp = client.get(source_url, params={"q": query, "location": location}, headers={ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Accept": "text/html,application/xhtml+xml", "Accept-Encoding": "gzip, deflate, br", }) # Parse business listings from response return [] ```
Multi-Source Lead Aggregation
LEAD_SOURCES = [
{"name": "yelp", "base_url": "https://www.yelp.com/search"},
{"name": "yellowpages", "base_url": "https://www.yellowpages.com/search"},
{"name": "bbb", "base_url": "https://www.bbb.org/search"},def aggregate_leads( industry: str, location: str, username: str, password: str, ) -> dict[str, list[BusinessLead]]: """Aggregate leads from multiple sources.""" proxy = f"http://{username}-country-us:{password}@gate.hexproxies.com:8080" results: dict[str, list[BusinessLead]] = {}
for source in LEAD_SOURCES: leads = search_businesses(industry, location, proxy, source["base_url"]) results = {**results, source["name"]: leads} time.sleep(random.uniform(10.0, 20.0))
return results ```
Lead Enrichment
@dataclass(frozen=True)
class EnrichedLead:
company_name: str
website: str
tech_stack: list[str]
social_profiles: dict[str, str]def enrich_lead(company_website: str, proxy: str) -> EnrichedLead: """Enrich a lead by analyzing the company website.""" time.sleep(random.uniform(3.0, 7.0))
with httpx.Client(proxy=proxy, timeout=30, follow_redirects=True) as client: resp = client.get(company_website, headers={ "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Accept": "text/html", "Accept-Encoding": "gzip, deflate, br", }) # Analyze HTML for tech stack indicators and social links return EnrichedLead( company_name="", website=company_website, tech_stack=[], social_profiles={}, employee_count_estimate="", ) ```
Compliance Considerations
- Only collect publicly available business data — never scrape private data
- Respect GDPR and CCPA — have a legal basis for data processing
- Provide opt-out mechanisms — honor unsubscribe and data deletion requests
- **Use official APIs** where available for authorized data access
- Rate limit respectfully — do not overload directory platforms
Hex Proxies residential network enables reliable lead generation across business directories with the geographic targeting needed for region-specific prospecting.