Skip to main content

Google Maps Leads Scraper

PyPI Python License: MIT

Turn a Google Maps search into a lead list. Give it a query and a point on the map; get back every business with its name, phone, website, address, rating, review count, opening hours, coordinates and place ID, as JSON or CSV. It can also pull a single place's full details (rating breakdown, plus code, attributes) and its reviews with owner replies.

It runs on the Scrape.do Google Maps API, which returns parsed JSON, so there is no HTML, protobuf or browser automation to maintain.

pip install google-maps-leads-scraper
export SCRAPEDO_TOKEN=your_token
google-maps-leads-scraper search "coffee shop" --ll 30.2672,-97.7431 --pages 6 -f csv -o austin-coffee.csv
ok    'coffee shop' @ 30.2672,-97.7431: 104 place(s)
104 record(s), 60 credits used, saved to austin-coffee.csv

Why not just request google.com/maps?

Google Maps is a JavaScript app. The page you get from requests has no business data in it, and the internal endpoints the app calls (/search?tbm=map, /maps/preview/place) answer in a nested protobuf-over-JSON array with an anti-XSSI prefix and no stable field names. Scripts that send many of them meet the consent wall, CAPTCHAs and rate limits, and the reviews endpoint most old tutorials used (listentitiesreviews) has been retired.

The Scrape.do Google Maps API makes the request from a residential IP and returns clean JSON:

Endpoint Input Returns
/plugin/google/maps/search q, ll, start 20 places per page, about 120 per query
/plugin/google/maps/place place_id or data_cid one place with hours, rating breakdown, attributes
/plugin/google/maps/reviews data_id or place_id, sort_by about 10 reviews per page, owner replies, topics

Every successful call costs 10 credits, so a full page of 20 leads costs 10 credits and 1,000 leads cost about 500. The free plan has 1,000 credits a month.

Command line

# One query around a point, 6 pages (the ~120 place maximum)
google-maps-leads-scraper search "plumber" --ll 40.7128,-74.0060 --pages 6 -f csv -o nyc-plumbers.csv

# The location can be in the query instead
google-maps-leads-scraper search "vegan restaurant in Lisbon" --gl pt

# Several queries across several points, merged without duplicates
google-maps-leads-scraper search "dentist" "orthodontist" \
  --ll 30.2672,-97.7431 --ll 30.3072,-97.7559 --pages 2 -f csv -o dentists.csv

# Full details for places
google-maps-leads-scraper place ChIJ_UbNVbC1RIYRTavD-VMmvZA

# Reviews, newest first, two pages
google-maps-leads-scraper reviews --data-id 0x8644b5b055cd46fd:0x90bd2653f9c3ab4d --sort newest --pages 2 -f csv -o reviews.csv

--ll takes lat,lng, lat,lng,zoom or the @lat,lng,14z form from a Maps URL. search --details also fetches every place's detail page (10 more credits per place).

Python

from google_maps_leads_scraper import GoogleMapsScraper

maps = GoogleMapsScraper(token="YOUR_SCRAPEDO_TOKEN")  # or set SCRAPEDO_TOKEN

places = maps.search("coffee shop", ll="30.2672,-97.7431", pages=3)
for p in places[:3]:
    print(p.name, p.rating, p.reviews, p.phone, p.website)

details = maps.place(places[0].place_id)
print(details.hours)              # Mon: 7 AM–2 PM; Tue: 7 AM–2 PM; ...
print(details.rating_breakdown)   # {'1': 16, '2': 6, '3': 14, '4': 41, '5': 604}

for review in maps.reviews(data_id=places[0].data_id, sort_by="lowest_rating", pages=2):
    print(review.rating, review.date, review.text[:80], "| reply:", bool(review.owner_reply))

print(maps.credits_used)

To cover a whole city, run the query around several points; search_grid does that and drops duplicates by place ID. See examples/leads_grid.py.

Output fields

Places: name, category, categories, rating, reviews, phone, website, address, latitude, longitude, hours, open_state, place_id, data_id, data_cid, plus_code, thumbnail, maps_url. JSON output adds rating_breakdown and attributes (accessibility, service options and so on).

Reviews: place_id, data_id, review_id, rating, date, iso_date, text, likes, author, author_reviews, local_guide, owner_reply, owner_reply_date, link.

place_id feeds place; data_id feeds reviews.

Use it responsibly

Business listings are public, but reviews carry the names of the people who wrote them. Store only what you need, follow the privacy rules that apply to you (GDPR, CCPA), respect opt-outs before cold outreach, and read Google's terms for your use case.

Also available

Tests

python -m unittest discover -s tests

The fixtures are made-up businesses on example.com; the tests never hit the network.

License

MIT

Metadata

Release files for google-maps-leads-scraper 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-maps-leads-scraper 0.1.1
File Size Uploaded Provenance Actions
google_maps_leads_scraper-0.1.1.tar.gz 20.2 kB Without provenance Details for google_maps_leads_scraper-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for google-maps-leads-scraper 0.1.1
File Interpreter ABI Platform Actions
google_maps_leads_scraper-0.1.1-py3-none-any.whl Python 3 none any Details for google_maps_leads_scraper-0.1.1-py3-none-any.whl

Total release size: 34.9 kB

Release files / google_maps_leads_scraper-0.1.1.tar.gz

Download URL google_maps_leads_scraper-0.1.1.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7c3d1657e0b44d78e53f13c63358bfb0bc96406a93ba0d4cbc79731bb1a0c399
BLAKE2b-256 checksum
How to use checksums
f7f0117ae4c2233891a980094c00b04074f59eb8a557042fad0f8f890e94b64a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / google_maps_leads_scraper-0.1.1-py3-none-any.whl

Download URL google_maps_leads_scraper-0.1.1-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
48fd2b86ca31e97fee998b0a63337a56deea577ccb73b4d289fa450787376332
BLAKE2b-256 checksum
How to use checksums
6d55cfe871cd6be8b7893b17b8a8fd12fbfd4685328c0494867a429a5bdc66a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for google-maps-leads-scraper 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page