Bulk website contact scraper for Brazilian B2B lead enrichment. Finds emails, phones, WhatsApp links, contact pages, forms, and social profiles — then exports a CRM-ready CSV (one row per company, 26 columns) that imports directly into Google Sheets, Excel, Pipedrive, HubSpot, or RD Station.
MAJOR: Receita Federal (CNPJ) enrichment. The Actor now detects CNPJs on each website, validates the check digits (módulo 11) to eliminate false positives, and enriches via BrasilAPI with public Receita Federal data: razão social, nome fantasia, CNAE principal + descrição, porte, situação cadastral, município/UF, capital social.
New lead score.leadScore (0–100) combines contactScore (0–75 points from contact channels) + company boost (0–25 points from porte, situação ATIVA, capital social, CNAE verification). Larger, active companies with verified data score higher.
New input flag enrichCnpj (default: true). Disable to skip BrasilAPI lookups and reduce run time.
New CSV columns:cnpj, cnpj_formatted, razao_social, nome_fantasia, porte, situacao_receita, cnae_principal, municipio, uf, capital_social, lead_score. One row now contains contact + company + score — ready to sort by lead_score and start calling.
New Dataset fields:cnpjs[], primaryCnpj, company{}, leadScore. New company view in the Console.
Graceful degradation. BrasilAPI timeouts, 404s, or network failures never fail the run — the contact profile still ships without enrichment.
Per-run CNPJ cache. Repeated CNPJs across websites (e.g., franchise chains) only hit BrasilAPI once.
20 new unit tests (CNPJ validation, extraction, normalization) + 9 integration tests (BrasilAPI real, lead score boost).
0.1.10 — 2026-07-22
NEW: CRM-ready CSV export. Each run now saves contacts.csv in the Key-Value Store with one row per website and 26 stable columns (website, company_name, email_primary, phone_primary, whatsapp_primary, whatsapp_link, social URLs, contact_score, etc.). Import directly into Google Sheets, Excel, Pipedrive, HubSpot, or RD Station — no JSON parsing needed.
CSV uses UTF-8 with BOM so Excel and Google Sheets auto-detect accented characters (São Paulo, Açaí, João) correctly.
Output schema now exposes the CSV download link alongside the JSON dataset and OUTPUT summary.
9 new TDD tests covering flattening, CSV escaping, BOM, null handling, accented characters, and empty rows.
0.1.9
Added opt-in same-origin contact-page discovery with a strict maxSecondaryPages budget.
Merged and deduplicated contact channels into the primary website result instead of emitting extra rows.
Added secondaryPagesScanned, secondaryPageErrors, and secondaryPageUrls to Dataset results and run summaries.
Kept secondary-page failures isolated from otherwise successful primary profiles.
Added TDD coverage for origin restrictions, limits, merging, and deduplication.
0.1.8
Added operational OUTPUT counters for successful URLs, useful contact profiles, emails, phones, WhatsApp links, contact pages, forms, and social profiles.
Defined usefulProfiles as successful results with at least one actionable contact signal (contactScore > 0).