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.1.tar.gz (8.7 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.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mapscopex-0.1.1.tar.gz
  • Upload date:
  • Size: 8.7 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.1.tar.gz
Algorithm Hash digest
SHA256 6bce469b05e42cf78ad6dfdb207fd5fbfe17049c25c5c653534e2cedd5df3e33
MD5 b93a1409c7b1acfcdafd0169380c0ddd
BLAKE2b-256 3961859cd89495bfbd05faeea48f9bba9c3724c108ca8f492e529fc5a3a1aeea

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapscopex-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: mapscopex-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b9e6c81a1ffc5ca49c085b372faa9e1bdd70dca19054d004ec597b7041e55ce8
MD5 5df5be758c194019d92e0413a4370e3e
BLAKE2b-256 6b9f24560e041fdb64db1d776f7d99c9d635d792e46f4cff7522e9605757e49f

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapscopex-0.1.1-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