Skip to main content

Search Google Maps listings and extract business website emails.

Project description

mapscopex

mapscopex searches Google Maps for businesses and attempts to extract email addresses from their websites.

Install

pip install mapscopex

Public API

from mapscopex import build_search_query, collect_searchprobe, searchprobe
  • searchprobe(keyword, location, max_items=None) streams cumulative results as they are found.
  • collect_searchprobe(keyword, location, max_items=None) waits for the scrape to finish and returns the final list once.
  • build_search_query(keyword, location) normalizes inputs into the Google Maps query string.

Usage

from mapscopex import searchprobe

for results_so_far in searchprobe(
    keyword="lawyers and law firm",
    location="Houston, TX",
    max_items=None,
):
    print(results_so_far[-1])

max_items=None means mapscopex will keep scrolling until Google Maps stops yielding new businesses.

On first use, mapscopex checks whether Playwright Chromium is available. If it is missing, mapscopex attempts to install it automatically:

  • macOS: chromium
  • Windows: chromium
  • Linux: --with-deps chromium, then falls back to chromium if needed

On Linux, --with-deps may still fail if the environment blocks privileged package installation. In that case, the package raises a runtime error with the last Playwright install failure.

If you want the old collect-then-return behavior:

from mapscopex import collect_searchprobe

results = collect_searchprobe(
    keyword="lawyers and law firm",
    location="Houston, TX",
    max_items=None,
)

Output Shape

Each result is a dictionary with these keys:

{
    "name": str,
    "phone": str,
    "website": str,
    "emails": list[str],
}

searchprobe() yields a list of these dictionaries after each new business is added. collect_searchprobe() returns the final list once the scraper stops.

Release Notes

The current package version is 0.1.0. That is a reasonable first public release while the API is still settling. The repository also includes:

  • CI for build plus Playwright bootstrap checks on macOS, Linux, and Windows
  • a tag-based PyPI publish workflow for trusted publishing via GitHub Actions

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

mapscopex-0.1.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

mapscopex-0.1.0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mapscopex-0.1.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mapscopex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fa1be15fa2da2c674443faa7d72b47c1cc2a60483c5233855096884da4523fd4
MD5 2c7fd7a45addb8def3938e5a2f72b746
BLAKE2b-256 608be58d8730d2c959f1dbd42863c212f545eb418a1baf505becd0d48e344613

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapscopex-0.1.0.tar.gz:

Publisher: publish.yml on rohdahal/geoprobe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: mapscopex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mapscopex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5217d6969e6262e8c0562f201f1f36b9edad246a8999baa1c6a9d5f5d2321528
MD5 dc1f7373b5c2127bb97023026477af5e
BLAKE2b-256 519b0b4d29c4b0cc85a3a27df1d6368359cae3e3b323bec6972a0700575717df

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapscopex-0.1.0-py3-none-any.whl:

Publisher: publish.yml on rohdahal/geoprobe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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