ZonicIsAlive
← all projects

leadminer

πŸ” Google Maps B2B lead scraper β€” extract emails, phones, socials & export to CSV/JSON

Pythonβ˜… 0updated Sep 1, 2026view on github β†—

🎯 Google Maps B2B Lead Generation Scraper

A high-performance, production-ready Google Maps scraper and lead enrichment pipeline engineered for B2B sales teams, agencies, and marketers. It extracts comprehensive business profiles from Google Maps and automatically visits business websites to discover direct email addresses, social media links (LinkedIn, Instagram, Facebook, Twitter/X, TikTok), and contact pages.


🌟 Key Features

  • Google Maps Data Extraction:
    • Business Name & Primary Category
    • Star Rating & Review Counts
    • Verified Phone Numbers
    • Full Addresses (Street, City, State, Postal Code, Country)
    • Official Website URLs
    • Operating Hours & Current Status (e.g. Open β‹… Closes 9 PM)
    • Geographic Coordinates (Latitude & Longitude)
    • Claimed / Verified Business Status
  • Automatic Website Lead Enrichment:
    • Asynchronously crawls discovered websites to find direct business emails (info@, contact@, sales@, etc.).
    • Extracts active social media profiles (LinkedIn, Instagram, Facebook, Twitter/X, YouTube, TikTok).
    • Automatically identifies dedicated /contact, /contact-us, and /about pages.
  • Deduplication Engine:
    • Automatically removes duplicates across multiple search queries and regional keywords.
  • Multiple Export Formats:
    • CSV: Standard UTF-8 BOM encoding ready for cold outreach tools (Instantly, Apollo, Lemlist, Smartlead, HubSpot).
    • Excel (.xlsx): Styled headers, auto-adjusted column widths, and clean formatting.
    • JSON / JSONL: Structured data for backend developer pipelines.
  • Two User Interfaces:
    • CLI Tool: Real-time terminal progress bars, colored output tables, and customizable parameters.
    • Web UI Dashboard: Interactive Streamlit application to search, preview tables, and download leads with 1 click.

πŸš€ Quick Start

1. Installation

  1. Clone or navigate to the repository:

    cd Scrapper
    
  2. Create and activate a virtual environment:

    python3 -m venv .venv
    source .venv/bin/activate   # On Windows: .venv\Scripts\activate
    
  3. Install dependencies and Playwright browser:

    pip install -r requirements.txt
    playwright install chromium
    

πŸ’» Usage

Option A: Command Line Interface (CLI)

1. Single Query Search

Scrape the top 20 dentists in Austin, TX and enrich with emails/socials:

python main.py -q "Dentists in Austin, TX" -l 20 --enrich -o outputs/austin_dentists.csv

2. Batch Search Queries from a File

Scrape multiple queries specified in a file (e.g. sample_queries.txt):

python main.py -f sample_queries.txt --limit 50 --format xlsx -o outputs/b2b_leads.xlsx

3. CLI Command Options:

FlagShortDescriptionDefault
--query-qSingle Google Maps search queryNone
--file-fPath to text file with one query per lineNone
--limit-lMaximum leads to extract per query (0 for all)20
--enrich / --no-enrichCrawl websites for emails & social media handlesTrue
--captcha-solverEnable Bit Solver extension to auto-solve CAPTCHAsFalse
--solver-extBit Solver extension (captchasonic or nopecha)captchasonic
--solver-pathCustom directory path to solver extensionBit Solver/extensions/...
--proxySingle HTTP/SOCKS5 proxy (http://user:pass@host:port or host:port:user:pass)None
--proxy-filePath to file with rotating proxy list (one per line)None
--formatExport format: csv, xlsx, json, allcsv
--output-oDestination filepath for exported fileoutputs/leads_<date>.csv
--headless / --no-headlessToggle headless browser modeTrue (headless)
--concurrencyConcurrent workers for website crawling10
--delayDelay between map interactions in seconds1.0

4. Examples with Proxies & Bit Solver

# Scrape with single proxy and Bit Solver (CaptchaSonic)
python main.py -q "Real Estate in Miami, FL" -l 30 --proxy "http://user:pass@proxy.example.com:8000" --captcha-solver

# Scrape with rotating proxy file and NopeCHA solver
python main.py -f sample_queries.txt --proxy-file proxies.txt --captcha-solver --solver-ext nopecha

Option B: Interactive Web UI Dashboard (Streamlit)

Launch the interactive web dashboard:

streamlit run app.py

Then open your browser at http://localhost:8501. You can:

  1. Enter search queries or paste a list of queries.
  2. Toggle Proxy and Bit Solver (Captcha) settings in the sidebar.
  3. Configure limit sliders and enrichment settings.
  4. Watch the real-time scraping progress.
  5. Preview the interactive lead data table.
  6. Download leads directly as CSV, Excel (.xlsx), or JSON.

πŸ“ Project Structure

Scrapper/
β”œβ”€β”€ main.py                     # CLI entry point
β”œβ”€β”€ app.py                      # Streamlit interactive web dashboard
β”œβ”€β”€ sample_queries.txt          # Ready-to-use sample queries
β”œβ”€β”€ requirements.txt            # Python dependencies
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ config.py               # Constants, User-Agents, contact regex patterns
β”‚   β”œβ”€β”€ models.py               # Pydantic schemas (BusinessLead, ScrapeConfig)
β”‚   β”œβ”€β”€ maps_scraper.py         # Async Playwright Google Maps scraper
β”‚   β”œβ”€β”€ enricher.py             # Async website crawler for emails & socials
β”‚   β”œβ”€β”€ exporter.py             # CSV, XLSX, JSON exporters
β”‚   └── utils.py                # URL cleaning, coordinates parsing, deduplication
└── tests/
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ test_enricher.py        # Email/social regex & utility tests
    └── test_models_exporter.py # Data models & file export tests

πŸ§ͺ Running Tests

Run the test suite with pytest:

pytest -v tests/

πŸ“„ Output Data Schema

The generated files include the following fields:

Field NameDescriptionExample
Business NameOfficial name of businessATX Family Dental
CategoryPrimary industry categoryDentist
RatingGoogle Maps star rating4.9
Review CountTotal customer reviews154
PhoneClean formatted phone number+1 512-717-3147
EmailPrimary direct business emailinfo@atxfamilydental.com
All EmailsComma-separated list of all emailsinfo@atxfamilydental.com, contact@atxfamilydental.com
WebsiteClean official website URLhttps://www.atxfamilydental.com
LinkedInLinkedIn company/profile linkhttps://www.linkedin.com/company/...
InstagramInstagram profile linkhttps://www.instagram.com/atxfamilydental/
FacebookFacebook page URLhttps://www.facebook.com/...
Twitter/XTwitter/X profile linkhttps://twitter.com/...
YouTubeYouTube channel linkhttps://youtube.com/...
TikTokTikTok account linkhttps://tiktok.com/@...
Contact PageDirect link to contact pagehttps://www.atxfamilydental.com/contact/
AddressFull physical address1700 S 1st St, Austin, TX 78704, United States
CityExtracted cityAustin
StateExtracted stateTX
Postal CodeExtracted ZIP/Postal Code78704
CountryExtracted countryUnited States
StatusOperating hours/statusClosed Β· Opens 8 AM
Is ClaimedVerified Google listingYes / No
Latitude / LongitudeGeolocation coordinates30.2482229, -97.7559705
Google Maps URLPlace link on Google Mapshttps://www.google.com/maps/place/...
Search QueryKeyword query usedDentists in Austin, TX
Enrichment StatusStatus of website crawlingenriched