Salaheldinaz
Table of contents
Google Map Exporter — Export Any Google Map to KML, KMZ, or GeoJSON

Google Map Exporter — Export Any Google Map to KML, KMZ, or GeoJSON

OSINT / GEOINT Tool

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.

Screenshot placeholder — annotated view of _pageData structure in browser DevTools window._pageData in the browser source — the raw payload the exporter parses.


Output Formats

FormatUse case
KMLGoogle Earth, QGIS, most GIS tools
KMZZipped KML — includes downloaded marker icons packaged inside
GeoJSONWeb 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.

Screenshot placeholder — CLI running, showing parsed placemarks and output file paths 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)

  1. Go to the Releases page and download the latest .zip.
  2. Unzip it anywhere on your machine.
  3. 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

  1. Open a Google Map in Chrome (viewer or editor URL).
  2. Click the extension icon.
  3. Select your formats (KML, KMZ, GeoJSON — any combination).
  4. 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.

Screenshot placeholder — extension popup showing format checkboxes and Download button The extension popup — pick your formats, click Download.

Screenshot placeholder — downloaded files in Finder/Explorer after export 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.

Screenshot placeholder — KMZ loaded in Google Earth showing placemarks and layers 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.

Screenshot placeholder — GeoJSON layer loaded in QGIS with attribute table visible 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 _pageData format. If the CLI produces zero placemarks, try saving the page as HTML and passing the file path instead, or switch playwright_headless to False to watch what the browser loads.
  • Extension needs a live page. The popup reads window._pageData from 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.

Repo

github.com/salaheldinaz/google-map-exporter