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 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.

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.

searchprobe() is a stream, you can stop early and keep the partial results already received:

from mapscopex import searchprobe

latest_results = []

for results_so_far in searchprobe("lawyers", "Houston, TX", max_items=None):
    latest_results = results_so_far

    if len(results_so_far) >= 3:
        break

print(latest_results)

If you want the 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.2. That is a reasonable initial public releases while the API is still settling.

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.2.tar.gz (8.5 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.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mapscopex-0.1.2.tar.gz
  • Upload date:
  • Size: 8.5 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.2.tar.gz
Algorithm Hash digest
SHA256 89bb70444e522788af56336903a115f1ffda8dfc6825856880e50de6b09da6c0
MD5 dfd9b3c8c53e7151d617a59e612f4762
BLAKE2b-256 fe5161651f5d01ff12a6a547a3c51d52e58cb9349b824c6b940137169f70f61b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: mapscopex-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3f1fab43d6bd33df45cc7a639ff60d3357c01bfabb5b21eaaff6135ec253f17e
MD5 0a41b237a6864e3c1e0f4858182344c3
BLAKE2b-256 2a938760e77adf5836e14fd7789968b436da49b2b4cd9b725401f72ea0e943a6

See more details on using hashes here.

Provenance

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