Google Maps Scraper
Published by bungkust in bungkust-skills
What this skill does
Scrape lokasi dari Google Maps β coffee shop, restoran, tempat wisata. Trigger: 'scrape google maps', 'cari coffee shop', 'cari tempat makan'
Add Google Maps Scraper to your agent
Review the source and files first. When you are ready, copy the prompt instruction or use the CLI command supported by your environment.
Install with a prompt
Paste this into a compatible coding agent:
add this skill "google-maps-scraper" from https://github.com/bungkust/bungkust-skillsInstall with the CLI
Run this command in a controlled environment after reviewing the repository:
npx skills add https://github.com/bungkust/bungkust-skills --skill google-maps-scraperSkill instructions
πΊοΈ Google Maps Scraper
Scrape data lokasi dari Google Maps tanpa API key. Pakai Playwright untuk bypass bot detection.
Dependencies
pip install playwright
python -m playwright install chromium
Kalau headless server/VPS, butuh extra deps:
sudo apt install -y libnss3 libatk-bridge2.0-0 libdrm2 libxkbcommon0 libgbm1 libasound2
Cara Pakai
CLI (direct)
python gmaps_scraper.py "coffee shop" "Yogyakarta" --max 20
python gmaps_scraper.py "restoran" "Jakarta Selatan" --max 10 -o hasil.csv
python gmaps_scraper.py "tempat wisata" "Bali" --max 15
Via AI Agent
"Cari coffee shop di Jogja dari Google Maps"
"Scrape restoran di Jakarta Selatan rating >4.5"
"Tempat wisata di Bali yang buka 24 jam"
Arguments
| Arg | Default | Description |
|---|---|---|
query | required | Search query (e.g. "coffee shop") |
location | required | Location (e.g. "Yogyakarta") |
--max | 50 | Max results |
--output, -o | auto | Output CSV path |
--headless | True | Run without browser UI |
--no-headless | - | Show browser (debug) |
--delay | 1.5 | Scroll delay (seconds) |
Output Format
CSV/JSON dengan fields:
| Field | Contoh |
|---|---|
| Name | Kopi Kultur |
| Rating | 4.8 |
| Reviews | 1234 |
| Price_range | Rp 25β50 rb |
| Category | Kedai Kopi |
| Address | Jl. Kaliurang KM 5 |
| Phone | 0812-xxxx-xxxx |
| Website | kopikultur.com |
| Hours | Buka Β· Tutup pukul 22.00 |
Teknis
- Buka Google Maps search URL
- Scroll results panel untuk load lebih banyak listing
- Klik setiap card β extract data dari detail panel
- Parse: Name, Rating, Reviews, Price, Category, Address, Phone, Website, Hours
- Save ke CSV + JSON
Limitasi
- Tanpa login Google: max ~20 results per search
- Rate limit: jangan scrape terlalu cepat (default delay 1.5s)
- Data bisa berubah sewaktu-waktu (Google update struktur)
- CSS selectors mungkin perlu update kalau Google Maps redesign
Troubleshooting
| Problem | Fix |
|---|---|
playwright not found | pip install playwright && python -m playwright install chromium |
chromium failed to launch | sudo apt install libnss3 libatk-bridge2.0-0 libdrm2 libxkbcommon0 libgbm1 libasound2 |
timeout | Google Maps loading lambat, coba tambah timeout atau cek network |
no results | Coba query yang lebih spesifik |
0 data / CSS selector error | Google Maps pakai button bukan a β sudah di-fix (auto-detect) |
redirect ke detail page | Auto-retry dengan coordinate URL + search box fallback |
Changelog
2026-04-16 β Robust Selector + Redirect Fix
- Fix: Selector
a[class*="hfpxzc"]β auto-detectbutton(new) /a(old) / aria-label fallback - Fix: Handle redirect ke detail page β auto-retry dengan coordinate URL + search box
- New:
get_listing_cards()β unified card detection - New:
is_detail_page()β detect if redirected to single listing - New: Debug screenshot saved if no cards found
2026-04-16 β URL-Based Extraction (v2)
- Fix: Click-based extraction only got 7 results (DOM breaks after clicking)
- New:
get_card_links()β collect all place URLs first, then visit one-by-one - New:
extract_from_detail()β extract data when already on a place URL - New:
extract_listings_click()β fallback click-based approach - Result: 7 β 45+ results per search
- Default:
--maxchanged from 20 to 50
Made with β€οΈ by @bungkust
Files included
- gmaps_scraper.py
- HOWTO.md
- SKILL.md
More skills
Google Maps Scraper
gosom/google-maps-scraper
No summary provided.
Audit unavailable4.2k installsGoogle Maps Scraper
mahanaicoach/google-maps-scraper-kit
No summary provided.
Audit unavailable750 installsGoogle Maps Scraper
gmapsscraper/google-maps-agent-skills
No summary provided.
Audit unavailable40 installs

