MCPcopy Index your code
hub / github.com/Yeshey/Export-Google-Maps-Saved-Places

github.com/Yeshey/Export-Google-Maps-Saved-Places @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
9 symbols 34 edges 1 files 7 documented · 78% updated 11d ago★ 33
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Export-Google-Maps-Saved-Places

Script able to convert Google Maps Links to coordinates, this converts Google Saved Places CSVs from Google takeout into GPX format which can be imported into Organic Maps, OSM, CoMaps, etc.

Purpose

Currently, the only tool that I know that converts google takeout my places CSVs to portable formats is: https://www.takeout-tools.com, which is paid, and only allows 5 conversions for free.
There is also Geo Share, which is the best open source tool out there to convert Google Maps links into links capable of being sent and used by other applications. It unfortunately doesn't support converting whole files or the CSVs from Google Takeout (at least for now, you can track this issue if you're interested)

Thus, I made this script to help people export their Google Maps Saved Places out of Google Maps and into applications like Organic Maps, CoMaps, or OSM!

[!WARNING]
LLMs such as Claude, Kimi, and ChatGPT were used extensively to make this script, use at your own risk!

Usage

To Export your lists from Google Maps you'll have to first get them from Google Takeout, and then feed them to this script

1. Google Takeout

Export Your Saved Places from Google Takeout:

  • Go to Google Takeout
  • Deselect all options (click "Deselect all" at the top)
  • Scroll down and select only "Saved" - this contains your collections of saved places from Google Maps
  • Click "Next step"
  • Choose "Export once" and set the export format to .zip
  • Click "Create export"
  • Wait for the export to complete (you'll receive an email)
  • Download the ZIP file from your email or the Takeout page
  • Unzip the file and locate the "Saved Places" folder

2. Using the Script

If you're in a nix enabled system with flakes, simply move your CSVs to a folder, for example folder takeout and call this script on that folder:

nix run github:Yeshey/Export-Google-Maps-Saved-Places -- takeout

Otherwise, please download the script, download playwright and install playwright browsers and run the script with: python3 main.py "takeout"

It will create a folder out inside your folder with the CSVs where the gpx files will be put. It also creates a merged_all.gpx with all the places from all lists merged into a single one in that same folder.

If the script is interrupted, it may be run again, it will ask if you wish to override the files that already exist, or if you want to continue from where it left of.

In the end you will get a list with all the Places that failed that you should check/add manually.

Options:

  • --debug - Enable debug logging
  • --headless 1- (Default), runs in headless mode
  • --headless 0- Disables headless mode so you can see what is happening in the backend browser.

Notes

The script will use playwright browser backend to get the correct coordinates.
If it isn't able to find coordinates it's probably because it's getting stuck in the consent screen and is not able to find the Button "Accept All". You might have to add what's written in that button (the language of the country the script is running on) to the list REJECT_SUBSTRINGS in the python script (and maybe ACCEPT_SUBSTRINGS). You can run with the option --headless 0 to see the browser and check the language it is in.

Core symbols most depended-on inside this repo

extract_coords
called by 4
main.py
get_broken_link_coords
called by 3
main.py
find_and_click_by_element
called by 2
main.py
create_gpx
called by 2
main.py
get_coordinates_from_url
called by 1
main.py
parse_existing_gpx_outputs
called by 1
main.py
process_csv_file
called by 1
main.py
check_structure
called by 1
main.py

Shape

Function 9

Languages

Python100%

Modules by API surface

main.py9 symbols

For agents

$ claude mcp add Export-Google-Maps-Saved-Places \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact