
Google Map Exporter — Export Any Google Map to KML, KMZ, or GeoJSON
When you come across a Google Map packed with useful placemarks — incident locations, field reports, points of interest — getting that data out is surprisingly annoying. Google doesn’t offer a native bulk export, and manually copying coordinates one by one is not realistic at scale.
Google Map Exporter solves this with two approaches: a Python CLI for repeatable, scriptable exports and a Chrome extension for one-click downloads straight from your browser.
The project is on GitHub: salaheldinaz/google-map-exporter
How It Works
Google Maps stores all map data in a JavaScript variable called window._pageData embedded in the page source. This includes placemarks (coordinates, names, descriptions), layer definitions, and marker icon references.
Both the CLI and the extension read this raw data, parse it, and reconstruct the map as standard GIS formats.
window._pageData in the browser source — the raw payload the exporter parses.
Output Formats
| Format | Use case |
|---|---|
| KML | Google Earth, QGIS, most GIS tools |
| KMZ | Zipped KML — includes downloaded marker icons packaged inside |
| GeoJSON | Web maps, analysis pipelines, any dev/GIS workflow |
All three formats preserve:
- Placemark name, coordinates, and description
- Layer/folder grouping
- Marker icon metadata (and optionally the icon files themselves)
Python CLI
The CLI is the right tool when you need automation, offline parsing, or want to integrate exports into a pipeline.
Setup
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
playwright install chromium
The CLI tries a plain HTTP fetch first. If the response is too thin (Google often returns a minimal page to scrapers), it falls back to a headless Playwright session.
Usage
# Export a live map URL
python main.py --url "https://www.google.com/maps/d/viewer?mid=..."
# Parse a saved HTML dump (no network needed)
python main.py path/to/saved_page.html
# Set output directory and filename prefix
python main.py --url "..." --output-dir output --prefix my_map
# Skip icon downloading (use remote URLs in the KML instead)
python main.py --url "..." --no-download-icons
Output lands in a timestamped folder under output/ by default. Downloaded icons go into icons/ inside that folder and are automatically packaged into the KMZ.
CLI output after a successful export — timestamped folder, KML/KMZ/GeoJSON files, and downloaded icons.
Chrome Extension
The extension is the faster path when you already have the map open in Chrome and just want to grab the data.
Install
Option A — Download the release (no Node.js required)
- Go to the Releases page and download the latest
.zip. - Unzip it anywhere on your machine.
- Go to
chrome://extensions, enable Developer mode, click Load unpacked, and point it at the unzipped folder.
Option B — Build from source
cd extension
npm install
npm run build
Then load the extension/ folder the same way: chrome://extensions → Developer mode → Load unpacked.
Use
- Open a Google Map in Chrome (viewer or editor URL).
- Click the extension icon.
- Select your formats (KML, KMZ, GeoJSON — any combination).
- Hit Download.
The extension reads window._pageData directly from the live page, runs the same parser as the CLI, and downloads the selected files instantly — no server, no API key, no clipboard gymnastics.
The extension popup — pick your formats, click Download.
Exported files ready to open in Google Earth or QGIS.
Opening the Export in Google Earth
Once you have a KMZ, drop it into Google Earth Pro (File → Open) or drag it into the web version. Layers map to folders, placemarks retain their names and descriptions, and if you exported icons they’ll render with the original markers.
Exported KMZ loaded in Google Earth — original layers, names, and marker icons intact.
Opening the Export in QGIS
GeoJSON drops straight into QGIS via Layer → Add Layer → Add Vector Layer, or just drag the file onto the canvas. The layerName property on each feature lets you filter or style by the original map layer.
GeoJSON export in QGIS — each feature carries the original layer name, name, description, and icon URL.
Notes and Limitations
- Map structure can change. Google occasionally updates the
_pageDataformat. If the CLI produces zero placemarks, try saving the page as HTML and passing the file path instead, or switchplaywright_headlesstoFalseto watch what the browser loads. - Extension needs a live page. The popup reads
window._pageDatafrom the active tab. If the popup spins forever, reload the map tab and reopen the extension. - Terms of service. This tool works on any map you can view in a browser. Use it for maps you have the right to access and export.