google-maps-scraper
Apify-style Google Maps scraper for Rust. Drives a real headless Chrome via the Chrome DevTools Protocol — no API key required.
Why
Until now there has been no production-quality Rust crate for scraping Google Maps. The official Places API is paid, and Apify is JavaScript-only. This crate fills the gap with the same approach used by Apify's compass~crawler-google-places actor, written natively in Rust.
Features
- 🌍 Search Google Maps with arbitrary text queries.
- 🔄 Auto-scrolls the results feed until exhausted.
- 🪟 Clicks each result to grab address + phone + website from the panel.
- 🚪 Auto-dismisses the cookie consent banner on first visit.
- 🛡️ Sets
--disable-blink-features=AutomationControlledto reduce detection. - 📦 Returns clean
Placestructs with German address parsing built-in.
Requirements
- Chrome / Chromium installed locally — unless you connect to a remote Chrome
via
browserless_url/BROWSERLESS_URL(see Remote Chrome), in which case no local browser is needed.- macOS: detected at
/Applications/Google Chrome.app/.... - Linux:
apt install chromium-browser. - Windows: detected in
Program Files.
- macOS: detected at
- Override the binary location with the
CHROMEenv var if needed.
Installation
[]
= "0.3"
= { = "1", = ["macros", "rt-multi-thread"] }
Quick start
use ;
async
Multiple queries in one session
# use ;
#
# async
Results are automatically deduplicated by website domain (or maps URL when no website).
Configuration
# use ;
# use Duration;
#
# async
Set enrich: false for a 5–10× speedup if you only need names + maps URLs (no website / phone).
For high-volume scraping, set proxy (or the PROXY_URL environment variable) to route
Chrome through a residential proxy and reduce the chance of being soft-banned.
Remote Chrome (Browserless) — no local Chrome required
If you don't have Chrome installed locally, point the scraper at a remote Chrome over
the DevTools WebSocket. Set browserless_url (or the BROWSERLESS_URL environment
variable) and MapsScraper::launch will connect to it instead of launching a browser:
# use ;
#
# async
When connecting to a remote Chrome, local launch arguments (headless, proxy, window
size, user agent) are controlled by the remote endpoint — configure those there.
What you get back
Place derives Serialize + Deserialize so you can write straight to JSONL.
Examples
Anti-detection caveats
Google detects bot traffic. Rough survival guide:
- 🟢 1–30 queries per session: usually fine.
- 🟡 30–100 queries: feed may start returning empty. Restart the browser between batches.
- 🔴 100+ queries from one IP: expect to be soft-banned (search returns 0 results). Use a residential proxy or Browserless cloud Chrome.
The crate ships with the most reliable selectors at the time of writing. Google's DOM shifts occasionally — file an issue if the scraper stops returning data.
Comparison with alternatives
| Tool | Lang | Pricing | Notes |
|---|---|---|---|
| Google Places API | any | $32/1000 + $17/1000 details | Official; paid. Full coverage. |
Apify compass~crawler-google-places |
JS | $5/1000 results | Battle-tested. Requires Apify account. |
| google-maps-scraper | Rust | $0 | Self-hosted; brittler; this crate. |
googlescraper (Python) |
Python | $0 | Less maintained. |
Roadmap
- ✅ Proxy support via
ScraperConfig::proxy/PROXY_URL. - ✅ Coordinates (
latitude/longitude) parsed from the maps URL. - ✅ Remote Chrome (Browserless) support via
ScraperConfig::browserless_url/BROWSERLESS_URL. - Headed-mode debugging helper that opens DevTools.
- Richer place data: rating, review count, category, opening hours (#11).
- Concurrent multi-page scraping inside one browser.
- Stealth plugin (
puppeteer-extra-plugin-stealth-equivalent).
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.