GitHub 火线榜

GitHub 火线榜 · 仓库档案

jinef-john/google-maps-scraper

Google Maps scraper, but it uses HTTP requests instead of a browser (简介来自仓库自身文档。)

数据截至 10月24日jinef-john

最好成绩

#189

被忽视榜 · 活跃却无人问津

100

累计 Star

19

Fork 总数

3

近 30 天在榜天数

把上榜徽章放进你的 README · jinef-john/google-maps-scraper[![把上榜徽章放进你的 README](https://git.vaiox.xyz/api/badge/jinef-john/google-maps-scraper.svg)](https://git.vaiox.xyz/zh/repo/jinef-john/google-maps-scraper)

项目文档

gmaps-request

Fast, lightweight HTTP-based Google Maps scraper for places & reviews.


A request-based scraper that extracts Google Maps place data and reviews without browser automation.

Key features:

  • Concurrency -> Parallel workers with independent sessions
  • Resume support -> Job tracking + per-place review resumption from saved cursors
  • Session persistence -> 0-RTT TLS resumption via session.json
  • Rate limit handling -> Exponential backoff + connection refresh on 429
  • WAL-mode SQLite -> Concurrent reads/writes without lock contention
  • Email extraction -> Fetches the business website and extracts contact emails

Install

pip install -r requirements.txt

Requires Python 3.10+.

Quick Start

# Search + scrape places and reviews
python main.py search "restaurants in Paris" --max-places=20 --max-reviews=50

# Scrape a single place by ID
python main.py place "0x89e377427d7f0199:0x5937c65cee2427f0" --max-reviews=200

# Search only (fast discovery, no details/reviews)
python main.py list "hotels in Dubai" --max-places=30

# Resume an interrupted job
python main.py resume <job_id> --max-reviews=100

# Database stats
python main.py stats

# Extract emails from business websites
python main.py search "hotels in London" --max-places=50 --extract-emails

Commands

Command Description Returns
search Search + full scrape All fields + reviews
place Scrape a single known place All fields + reviews (resumes from DB cursor)
list Search only -> no details/reviews Name, address, rating, coords, categories
resume Resume a job Continues from last saved cursor per place
stats Database statistics Place count, review count, pending jobs

Options

Flag Description Default
--db SQLite database path output/gmaps.db
--max-places Max places to scrape (None = unlimited) unlimited
--max-reviews Max reviews per place (None = all, 0 = skip) unlimited
--workers Concurrent workers 4
--delay Min seconds between requests 2.5
--proxy Proxy URL (socks5://... or http://...) None
--session-file Session persistence path output/session.json
--lang Language code en
--gl Country/region code us
--extract-emails Fetch website & extract email if missing false

Typical Workflows

Discover first, scrape selected places later

python main.py list "coffee shops in Amsterdam" --max-places=20
python main.py place "0x47c609c7..." --max-reviews=200

Scrape details now, reviews later

python main.py search "restaurants in Nairobi" --max-places=20 --max-reviews=0
python main.py resume <job_id> --max-reviews=300

Large-scale scraping

python main.py search "hotels in London" --max-places=100 --max-reviews=50 --workers=8

Extract contact emails from websites

When Google Maps doesn't list an email, the scraper can visit the business website and extract it:

python main.py search "restaurants in Nairobi" --max-places=30 --extract-emails

Works with search, place, and resume.

How Resume Works

  • search / place --> Saves a pagination cursor per place in the database
  • resume <job_id> --> Re-opens places that need more reviews and continues from their saved cursors
  • place repeat runs --> Skips if you already have enough reviews; fetches more if you increased --max-reviews

Disclaimer

This tool is provided for educational and research purposes. By using it, you agree to comply with applicable laws regarding data collection.

当前上榜

  • 189

    被忽视榜 · 活跃却无人问津

    100 星 · 19 fork · 累计 Star(升序)

    被忽视 →

近 30 天势头

累计 Star 走势

名次走势

← 回到榜单