Skip to main content

Business lead scraper CLI powered by Playwright

Project description

🔍 Firmoscope

Business lead scraper CLI powered by Playwright — free, fast, and runs entirely locally.

Made by KPZsProductions


What it does

Firmoscope searches Google Maps for businesses matching your query, then extracts contact details — phone numbers, email addresses, websites, and addresses — and saves them to a CSV file. Optionally filters to businesses without a website (prime leads), queries an AI model to analyse results, or exports directly to Google Sheets.


Installation

Option 1 — pipx (recommended)

pipx install firmoscope
playwright install chromium
firmoscope "Rybnik Mechanicy"

Install pipx first if needed: pip install pipx

Option 2 — pip

pip install firmoscope
playwright install chromium
firmoscope "Rybnik Mechanicy"

Option 3 — manual (no install)

pip install playwright
playwright install chromium
python firmoscope.py

Quick start

# Run interactively
firmoscope

# Run interactively (manual install)
python firmoscope.py

# Run with arguments
firmoscope "Rybnik Mechanicy"
firmoscope "Katowice Restauracje" --limit 30
firmoscope "Gliwice Dentyści" --limit 50 --output leady_dent.csv

# Only businesses without a website (best leads)
firmoscope "Wrocław Hydraulicy" --no-website

# Watch the browser (non-headless)
firmoscope "Kraków Fryzjer" --no-headless

AI mode

Requires OPENROUTER_API_KEY set in your environment.

# One-shot AI question about the results
firmoscope "Rybnik Mechanicy" --limit 10 --ai "które firmy nie mają strony?"

# Interactive chat session
firmoscope "Rybnik Mechanicy" --limit 10 --chat

# Pick a specific model
firmoscope "Rybnik Mechanicy" --chat --model "anthropic/claude-3.5-haiku"

Output

CSV file with UTF-8-BOM encoding (opens cleanly in Excel/LibreOffice):

Column Description
Nazwa Business name
Telefon Phone number
Email Email address
Adres Street address
Strona WWW Website URL
Ma stronę Has website (Tak/Nie)
Link Google Maps Direct Google Maps link

How it works

main()
 └─ run_scraper()          — opens Google Maps, scrolls feed, collects place links
     └─ scrape_business_details()   — extracts phone, address, website, email per place
         └─ try_scrape_website_for_email()  — if no email on Maps, checks /kontakt etc.
  • Browser runs with Polish locale (pl-PL) and a real Chrome user-agent
  • No paid APIs — pure Playwright scraping
  • Zero external dependencies beyond playwright (and optionally prompt_toolkit)

Requirements

  • Python 3.9+
  • playwrightpip install playwright && playwright install chromium
  • prompt_toolkit (optional) — autocomplete in interactive mode
  • OPENROUTER_API_KEY (optional) — AI analysis features

Legal Notice

This tool is provided for educational and legitimate business research purposes only.

  • Firmoscope scrapes publicly visible information from Google Maps. Use of this tool must comply with Google's Terms of Service and any applicable local laws and regulations.
  • The authors and contributors of this project do not condone the use of this software for spam, harassment, unsolicited marketing, or any activity that violates the privacy rights of individuals or organisations.
  • Data collected through this tool may be subject to data protection regulations (e.g. GDPR in the European Union). You are solely responsible for how you store, process, and use any data you collect.
  • Use at your own risk. The authors accept no liability for misuse of this software or for any consequences arising from its use.

Built with ❤️ by KPZsProductions

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

firmoscope-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

firmoscope-0.1.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file firmoscope-0.1.0.tar.gz.

File metadata

  • Download URL: firmoscope-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for firmoscope-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a8309c0605eac286ba42686907c64478d0bcb765d83f165331939201edac1ea9
MD5 bf573c0f9352f1b5cc25ea7c7daf243c
BLAKE2b-256 214e35a8c9f99fa347b8e24b5a9243f278fe347f96f02eddb1fb26952c74cbad

See more details on using hashes here.

File details

Details for the file firmoscope-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: firmoscope-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for firmoscope-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a21acbcbbb6aedb0ef6ed0239df5cb024041a4ba89d4c9842c6dbfb1cc5f3070
MD5 b2876a0c088649c70bf0baeb17713822
BLAKE2b-256 f12fd78ad720e42a1df4c5e7a17fd5599323cfccb86961b9643e0bf5b9fa5f2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page